Ma 309: Matrix Algebra Worked Solutions to Homework Assignment 2 Prof. Wickerhauser Exercise 20 of Section 1.3, p.65. Use the matrix from Exercise 22 for both A and B. Exercise 21 of Section 1.3, p.65. There are many possibilities, but perhaps the simplest is A = 1 0 B = 0 0 C = 0 0 0 0 1 0 1 1 Then AC=0 and BC=0, though A!=B. Exercise 22 of Section 1.3, p.65. Any symmetric 2x2 matrix A may be written as A= a b b c for some real numbers a,b,c. If A*A=0, then a*a+b*b a*b+b*c = 0 0 b*a+c*b b*b+c*c 0 0 From the diagonal terms a*a+b*b=0 and b*b+c*c=0, we conclude that a=b=c=0, so A=0. Hence there are no nonzero symmetric 2x2 matrices solving A*A=0. Exercise 27 of Section 1.3, p.66. (a) B' = (A+A')' = A'+(A')' = A'+A = A+A' = B C' = (A-A')' = A'-(A')' = A'-A = -(A-A') = -C (b) If B is symmetric then so is 0.5*B. If C is skew-symmetric then so is 0.5*C. Finally, given any nxn matrix A, we may write A = 0.5*(A+A') + 0.5*(A-A'), which by part (a) is the sum of a symmetric and a skew-symmetric matrix. Exercise 31 of Section 1.3, p.66. (a) 1--2 |\ |\ | \| \ | 4 \ | / \ |/ \ 5--------3 (b) There are zero walks of length 2 from v2 to v3. There are three walks of length 2 from from v2 to v5. (c) Using MatLab we get >> A = [0 1 0 1 1; 1 0 1 1 0; 0 1 0 0 1; 1 1 0 0 1; 1 0 1 1 0] 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 1 1 0 >> A*A 3 1 2 2 1 1 3 0 1 3 2 0 2 2 0 2 1 2 3 1 1 3 0 1 3 >> A*A*A 4 7 2 5 7 7 2 6 7 2 2 6 0 2 6 5 7 2 4 7 7 2 6 7 2 The second row of A*A has a 0 in column three and a 3 in column 5, confirming the count from part (b). The second row of A*A*A shows that there are 6 walks of length 3 from v2 to v3, and 2 walks of length 3 from v2 to v5. Exercise 33 of Section 1.3, p.66. Expanding the product yields a11 a12 = a11 a12 a*a11 a*a12+b a21 a21*a12/a11+b This will equal A if we choose b=a22-a21*a12/a11, which we may do since a11 != 0. Exercise 3(c) of Section 1.4, p.76. 1 0 0 0 1 0 0 2 1 Exercise 4(c) of Section 1.4, p.76. 0.5 0 0 0 1 0 0 0 1 Exercise 7(d) of Section 1.4, p.77. Start with 0 0 0 -2 1 2 0 0 0 4 1 -2 0 0 0 -6 -3 4 Row elimination, keeping track of the factors: 0 0 0 -2 1 2 2 0 0 0 3 2 -3 0 0 0 -6 -2 0 0 0 -2 1 2 2 0 0 0 3 2 -3 2 0 0 0 2 This leaves U at right. Invert and add ones to get L on the left: 1 0 0 -2 1 2 -2 1 0 0 3 2 3 -2 1 0 0 2 These evidently multiply together to give A=LU. Exercise 9(b) of Section 1.4, p.77. Use the formula a b inverts to d/D -b/D c d -c/D a/D where D = a*d-b*c, to get 3 -5 -1 2 since D = 2*3-1*5 = 1. Exercise 9(e) of Section 1.4, p.77. Use row reduction to get the inverse 1 -1 0 0 1 -1 0 0 1 Exercise 18 of Section 1.4, p.78. (a) Let Dij be a coefficient of D and Eij a coefficient of E. If D and E are diagonal matrices, then Dij=0 unless i=j, and likewise Eij=0 unless i=j. The ij coefficient of the matrix product in either order, (DE)ij or (ED)ij, is thus 0 unless i=j, and then it is Dii*Eii or Eii*Dii, respectively. But Dii*Eii=Eii*Dii, since ordinary multiplication is commutative, and the second expression is (ED)ii, the ii coefficient of the matrix product taken in the other order. Hence (ED)ii=(DE)ii for all i=1,...,n, and (ED)ij=(DE)ij=0 if i != j. (b) This may be proved directly, using the properties A*(c*B)=c*(A*B)=(c*A)*B for real c and matrices A,B, and A*(A^j)=A^(j+1)=(A^j)*A for any matrix A and any nonnegative integer j. By these, and by the distributive law of matrix multiplication over matrix addition, we compute A*B = A*(a0*I+a1*A+...+ak*A^k) = a0*A + a1*A^2 + ...+ ak*A^(k+1) = (a0*I)*A + (a1*A)*A + ...+ (ak*A^k)*A = (a0*I + a1*A + ...+ ak*A^k)*A = B*A Exercise 19 of Section 1.4, p.79. Since A is symmetric, A'=A. Since I is symmetric, I'=I. Thus I = I' = [A*A^(-1)]' = [A^(-1)]'*A' = [A^(-1)]'*A Since inverses are unique, [A^(-1)]' = A^(-1). Hence A^(-1) is also symmetric. Exercise 1 of Section 1.5, p.87. (a) ( I A^(-1) ) (b) I (c) A'A A' A^(-1) A I (d) AA'+I (e) I A^(-1) A I Exercise 11 of Section 1.5, p.89. From block multiplication we get / A11 A12 \ / X C \ = / A11*X A11*C+A12*Y \ \ 0 A22 / \ 0 Y / \ 0 A22*Y / This will be the (2n)x(2n) identity matrix if A11*X=I and A22*Y=I are both nxn identity matrices, and A11*C+A12*Y=0. The first will hold if X = A11^(-1) and Y=A22^(-1). The second will hold if C = -A11^(-1)*A12*A22^(-1). Exercise 12 of Section 1.5, p.89. A^2 = / B 0 \ = B / I 0 \ A^4 = [A^2]^2 = / B^2 0 \ \ 0 B / \ 0 I / \ 0 B^2 / Exercise 13 of Section 1.5, p.90. (a) Using B=I in Exercise 12 gives / 0 I \ / 0 I \ / I 0 \ \ I 0 / \ I 0 / = \ 0 I / so the matrix is its own inverse. (b) The inverse must also be lower triangular. Trial multiplication gives / I 0 \ / I 0 \ / I 0 \ \ B I / \ X I / = \ B+X I / Hence to get the identity at right we need to set X = -B, so the inverse is / I 0 \ \ -B I / Exercise 18 of Section 1.5, p.91. Following the hint, let x = ej. Then (0,0,...,0)' = 0 = Ax = (aj1,aj2,...,ajn)', so aji=0 for all i=1,2,...,n. But j was arbitrary, so aij=0 for all i,j=1,...,n. Thus A=0.