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.
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:
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:
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.