Linear algebra & matrix multiplication

Disclaimer: this is not for homework, rather a request for clarification of a rather basic concept

In my linear algebra book, it states at the columns of AB (A and B are matrices) are just combinations of the columns of A. How? I know there are multiple ways of visualizing matrix multiplication but I’m just not seeing this one.

I’ve always only been able to multiply matrices by going across the row of the left matrix and multiplying by the same column of the second. This isn’t helpful in visualizing the columns, though.

For example, I get the following perfectly:

  | 8 2 8 |
A=| 2 1 1 |
  | 4 2 7 |

  | x1 |
B=| x2 |
  | x3 |
        |8|      |2|      |8|
AB = x1*|2| + x2*|1| + x3*|1|
        |4|      |2|      |7|

I think it’s just when B is more than a column vector, I get confused. And quickly.

It also says that the columns of AB are simply matrix A times the columns of B. Why doesn’t that mean that the columns of AB are combinations of the columns of B?

The book also states there’s a column-row picture for matrix multiplication in that the columns of A are multiplied by the rows of B, but it states no more and gives no examples. Help? I’m an engineering student and this abstract material is killing me. :smack:

Trying to write this out with the limitations of our typeface isn;t worth it.

My first suggestion is to get va good book on linear algebra. There are plenty of them out there.

You can also go to internet sites, of which there are many. The first refuge, of course, is Wikipedia, which gives you this:
Which is pretty good.

Cal’s link has a pretty neat picture showing it graphically, but when you have more than one column in B, you just take each column piecewise and do the matrix multiplication, and then add the answers element wise. I’m not sure what you’re asking when you say AB should be combination of columns of B, since you’ve multiplied the vector* B* by the matrix **A **already.

I can’t explain it conceptually, but if you just do what you wrote in your code three times (assuming B is 3x3), and then add all 3 matrices up element wise, you should come up with the proper answer.

ETA: Here’s another handy reference, I just found out about wikibooks recently:

It’s a bit broken right now, but there’s a good example of an mxn * nxo matrix.

Think of it this way. If I let v_1,v_2,…,v_m denote the columns of A (so that we think of A as a row whose entries are these column vectors) and the left column of B is b_11, b_21,…,b_m1, then the left column of AB is the linear combination b_11v_1 + b_21v_2 + … + b_m1v_m. The second column of AB is similarly a linear combination of the columns of A using the second column of B as the coefficients and so on.

Of course, you could equally well say that the rows of AB are linear combinations of those of B, using the elements of the rows of A as coefficients. As a matter of pedagogy (I taught linear algebra more times than I care to think), I don’t find this approach to matrix multiplication as particularly helpful. At any rate, I hope the explanation is useful.

The more explanations the better, right? I’ll just extend your example a little, which means less work for me ;).

Let’s let

    | 8 2 8 |
A = | 2 1 1 |
    | 4 2 7 |

    | x1 |       | y1 |
X = | x2 |   Y = | y2 |
    | x3 |       | y3 |

where x1, y1, etc., are specific real numbers. Then, as you wrote, AX is the following linear combination of the columns of A, which I’ll call C1.

             |8|      |2|      |8|
C1 = AX = x1*|2| + x2*|1| + x3*|1|
             |4|      |2|      |7|

Similarly, AY is the following linear combination of the columns of A, which I’ll call C2.

             |8|      |2|      |8|
C2 = AY = y1*|2| + y2*|1| + y3*|1|
             |4|      |2|      |7|

Now suppose that I have a 3x2 matrix Z whose columns are X and Y:

               | x1 y1 |
Z = | X  Y | = | x2 y2 |
               | x3 y3 |

Compute the matrix product AZ in the way that you’re used to, and you’ll get a matrix whose columns are precisely C1 and C2.

AZ = | C1 C2 |

Since C1 and C2 were linear combinations of columns of A, you can say the same about the columns of the matrix product AZ.

There is no spoon.

Thanks for all the replies! I think I get it now.