If A and B are matrices, then the product AB is: AB = (A*b1 A*b2 ... A*bm) [formula 1] where b1 .. bm are the columns of B. Note that A*b1 is a linear combination of the columns of A. For instance, if b1 = ( 3 ) ( 4 ) ( 5 ) then A*b1 is 3*Col1(A) + 4*Col2(A) + 5*Col3(A). So A*b1 = A*Col1(B) = Col1(AB) is a linear combination of the columns of A. Likewise, every column of AB is a linear combination of the columns of A. Another way to say this is that the SPAN of the columns of AB is contained in the SPAN of the columns of B. ============================================ A second formula for the matrix-matrix product is this. Suppose the rows of A are a1, a2, .. so that A equals ( a1 ) ( a2 ) ( .. ) ( an ) Here a1 is not a scalar, but it is a row-vector a1 = (* ... *) Then we can write AB as ( a1*B ) ( a2*B ) ( .. ) [formula 2] ( an*B ) How do you multiply a row-vector times a matrix? Well, if a1 = (5 8) for example, then a1*B = 5*Row1(B) + 8*Row2(B) which is a linear combination of the rows of B. So the rows of AB are: a1 * B ... an * B and each row of AB is a linear combination of the rows of B. Another way to say that is that the SPAN of the rows of AB is contained in the SPAN of the rows of B. ============================================ A third formula for the matrix-matrix product is this: Denote A_ij as the entry in Row i and Column j. Then (how do you remember this formula? Well, remember that row is usually left and column is usually right, so we need the i'th row of A and the j'th column of B in this formula) (AB)_ij = Row_i(A) times Col_j(B) Now Row_i(A) = (A_i1 A_i2 A_i3 ....) and the entries of Col_j(B) are B_1j, B_2j, ... So (AB)_ij = A_i1 * B_1j + A_i2 + B_2j + ... [formula 3] ( for that formula to make sense, the number of entries of Row_i(A) must be the same as the number of entries of Row_j(B) ). ============================================ A fourth way to define the matrix-matrix product is this: If A,B are matrices, then we can interpret them as linear maps. So we can take the composition of these linear maps (AB means: first apply B, then apply A). So ABx = A(Bx) for any vector x). But for any linear map from R^n to R^m we had a formula for its matrix. That formula will give us a formula for AB. (this is how we defined AB in class). ============================================ Exercises: First, make sure to memorize formulas 1,2,3 above, and the fact that matrix-multiplication comes from composition. Next, if you didn't already know matrix-multiplication, you should practice some (e.g. Ex 1 - Ex 11). Also, you should practice all 3 formulas (1,2,3 above) because for some situations one formula is more convenient, and for other situations other formulas are better. Turn in: Ex 10 and Ex 12 plus explain why what you see there can only be possible when the linear map A is not injective. If you're not 100% sure that you can correctly multiply matrices, then turn in a matrix-multiplication exercise as well (e.g. Ex 5 or 6). To prepare for next class, do the following: Try to understand the following: Pick an elementary row operation, say: R2 <--- R2 + 5*R1. Let I be the identity matrix and let B be an arbitrary matrix. Say that your elementary row operation applied to B gives B'. Say that your elementary row operation applied to I gives E. Now try to figure out this: why should B' be the same as E*B ? Another way to say this is: B = I*B on the left-hand side B, apply your elementary row-operation, but on the right-hand side, apply the same row-operation not to B but to I. Then the left side becomes B' and the right side becomes E*B. Why should those be equal?