A matrix, as opposed to the matrix of movie fame, is an array of numbers. You will often see a matrix referred to as an (m x n) matrix where m and n denote the number of rows and columns, respectively. Matrix multiplication is not commutative.

Here's your math lesson for the day.

In order to multiply 2 matrices, the number of columns in the first matrix must equal the number of rows in the second matrix. If you have an (m x n) matrix multiplying an (r x s) matrix, you must have n = r. The funny thing is that if you switch the order so that you're multiplying the same (r x s) matrix by the same (m x n) matrix, then you need s = m.

Here's an example: if matrix A is a (3 x 3) matrix and matrix B is a (3 x 1) matrix, you can multiply A by B – a (3 x 3) multiplying a (3 x 1), where n and r both equal 3. But you can’t commute the two matrices. Multiplying B by A is undefined since you have a (3 x 1) multiplying a (3 x 3) and n = 1 while r = 3.

But what if you have two matrices with the same number of rows and columns? Shouldn't they be commutative? First, you need to know how matrix multiplication is performed. The simple (text book) definition looks like this:

For a matrix A = (a

_{ij}) and a matrix B = (b

_{ij}), the product AB is defined as

In math speak that makes very little sense. It looks something like this.

Nasty! Let’s try an example with numbers. I’m going to use (2 x 2) matrices A and B where

When you multiply AB, you get

And when you multiply BA, you get

So, for this example, you can see that AB is not equal to BA. There are occasional instances where AB will equal BA, but this is not generally true.

Just to briefly return to the Fundamental Theorem of Arithmetic where this started. The theorem orders the prime factors. This is important within the proof - order matters - but I think we’ll get to that tomorrow.

Reference: Johnson, L.W., Riess, R.D. & Arnold, J.T. (2002). Introduction to Linear Algebra (5th ed.). Boston, MA: Addison-Wesley.

*Math*

## 4 comments:

Run, Run for your life!!! I remember doing those things. Yuck. Here is a question I bet you can answer... why when you add 2 even numbers you get an even number, 2 odd numbers you get an even number but an odd and an even gives you an odd number... so why are there not more even numbers? GRIN Bet you weren't expected that huh?

LOL - I was not thinking of matrices when I asked that question... just simple integers. And thus I have not done math in many years - as you can tell by my imprecise question. *grin*

I always like matrix multiplication, but I can never remember the order of it for longer than the chapters I studied while using it. Oh well...

vw - look for the answers to your questions either later tonight or tomorrow night. I'm going to take the time to present the proofs with "ordinary English translations" LOL

Teresa - if I'm not doing matrix multiplication, I have to look it up too. Although after creating the graphics for this post, I might remember it for a tad longer than usual. LOL

Most people only think of ordinary numbers (integers, rationals, reals) when they think of commutativity and associativity. The idea that there are other numbers that don't fit the rules we learned in school is ... well, strange.

Post a Comment