Pre-lecture: the goal f or todayWe wish to write linear system s simply asAx = b.For in stance:2x1+3x2= b13x1+x2= b22 33 1·x1x2=b1b2Why?• It’s concise.• The compactness al so sparks associ ations and ideas!◦ For instance, can we solve by dividing by A? x = A−1b?◦ If Ax = b and Ay = 0, then A(x + y) = b.• Leads to mat rix calculu s and deeper und er standing.◦ multiplying, i nverting, or factoring matric esMatrix operationsBasic notationWe will use the following notations for anm × n matrix A (m rows, n columns).• In terms of the columns of A:A = [a1a2an] =| | |a1a2an| | |• In terms of the entries of A:A =a1,1a1,2a1,na2,1a2,2a2,n am,1am,2am,n, ai,j=entry ini-th row,j-th columnMatrices, just like vectors, are added and scaled componentwise.Example 1.(a)1 05 2+2 33 1=3 38 3Ar min [email protected](b) 7 ·2 33 1=14 2121 7Matrix times vectorRecall that(x1, x2,, xn) solves th e l inear system with augmented matrix[A b] =| | | |a1a2anb| | | |if and only ifx1a1+ x2a2++ xnan= b.It is therefore natural to de fi ne the product of matrix times vector asAx = x1a1+ x2a2++ xnan, x =x1xn.The system of linear equations with augmen te d matri x [A b] can be written inmatrix form compactly as Ax = b.The product of a matrix A with a vector x is a linear combinatio n of the col u mns ofA with weights given by the entries of x.Example 2.(a)1 05 2·21= 215+ 102=212(b)2 33 1·01=31(c)2 33 1·x1x2= x123+ x231=2x1+ 3x23x1+ x2This illustrates that linear systems can be simply e xpressed as Ax = b:2x1+3x2= b13x1+x2= b22 33 1·x1x2=b1b2(d)2 33 11 −1·11=540Ar min [email protected] 3. Suppose A is m × n and x is in Rp. Under which condition does Ax makesense?We need n = p. (Go through the definition o f A x to m ake sure you see w hy!)Matrix times matrixIfB has just one column b, i.e. B = [b], then AB = [Ab].In general, the pro duct of matrix times matrix is giv en byAB = [Ab1Ab2Abp], B = [b1b2bp].Example 4.(a)1 05 2·2 −31 2=2 −312 −11because1 05 2·21= 215+ 102=212and1 05 2·−32= −315+ 202=−3−11.(b)1 05 2·2 −3 11 2 0=2 −3 112 −11 5Each column of AB is a linear comb ination of the colu mns of A with weights givenby the corresponding c olumn of B.Remark 5. The defi nition of the matrix product is inevitable from the multi plication ofmatrix times vector and the f a c t that we wantAB to be defined such th at (AB)x =A(Bx).A(Bx) = A(x1b1+ x2b2+)= x1Ab1+ x2Ab2+= (AB)x if the columns of AB are Ab1, Ab2,Example 6. Suppose A is m × n and B is p × q.(a) Under whic h condition does AB make sense?We need n = p. (G o through the boxed characterization of A B to m ake sure you see why!)(b) What are the dimensions of AB in that case?AB is a m × q matrix.Ar min [email protected] propertiesExample 7.(a)2 33 1·1 00 1=2 33 1(b)1 00 1·2 33 1=2 33 1This is the 2 × 2 identity matrix.Theorem 8. Let A, B, C be matrices o f appropriate size. Then:•A(BC) = (AB)C associative•A(B + C) = AB + AC left-distributive•(A + B)C = AC + BC right-distributiveExample 9. However, matrix multiplication is not commutative!(a)2 33 1·1 10 1=2 53 4(b)1 10 1·2 33 1=5 43 1Example 10. Also, a product ca n be zero even though none of the f actors is:2 03 0·0 02 1=0 00 0Transpose of a matrixDefinition 11. The transpose ATof a ma trix A is the matrix whose columns areformed from the corresponding rows of A. rows ↔ columnsExample 12.(a)2 03 1−1 4T=2 3 −10 1 4(b) [x1x2x3]T=x1x2x3(c)2 33 1T=2 33 1A matrix A i s called symmetric if A = AT.Ar min [email protected] problems• True or false?◦ AB has as many co lumns as B.◦ AB has as many r ows as B.The following practice problem illustrates the rule(AB)T= BTAT.Example 13. Consider the mat ricesA =1 20 1−2 4, B =1 23 0.Compute:(a) AB =1 20 1−2 41 23 0=(b) (AB)T= (c) BTAT=1 32 01 0 −22 1 4=(d) ATBT=1 0 −22 1 41 32 0= W hat’s that fishy sm ell?Ar min
View Full Document