(1) Which of the following statements are true and which are false? Justify your answer. (a) The product of two orthogonal n×n matrices is orthogonal. Solution. True. Let A and B be two orthogonal matrices of the same size. Then AT A = B T B = I. It follows that (AB)T (AB) = B T (AT A)B = B T B = I. So AB is orthogonal. (b) Two matrices with the same characteristic polynomials are similar. Solution. False. 1 A= 0 Let 0 1 1 and B = 1 0 1 Then det(λI − A) = det(λI − B) = (λ − 1)2 . But A and B are not similar. Otherwise, B = P −1 AP for an invertible matrix P . But P −1 AP = P −1 P = I and B 6= I. Contradiction. (c) For two n × n invertible matrices A and B, AB and BA are similar. Solution. True since AB = B −1 (BA)B. (d) rank(A) = rank(A2 ) for every square matrix A. Solution. False. Let 0 1 A= 0 0 Then rank(A) = 1 but A2 = 0 and rank(A2 ) = 0. (e) For a Householder matrix A and two vectors u and v, if Au = v, then Av = u. Solution. True. Since A is a Householder matrix, A is symmetric and orthogonal. Therefore, A2 = AT A = I. Consequently, Au = v ⇒ A2 u = Av ⇒ u = Av (f) If A is diagonalizable, so is AT . Solution. True. Since A is diagonalizable, there is an invertible matrix P such that P AP −1 = D is diagonal. It follows that DT = (P AP −1 )T = (P −1 )T AT P T = (P T )−1 AT P T 1 2 Since D = DT is diagonal, AT is diagonalizable. (2) Show that two symmetric matrices are similar if and only if they have the same characteristic polynomials. Proof. Let A and B be two symmetric matrices. Suppose that A and B are similar. Then A = P BP −1 for an invertible matrix P . Then det(λI − A) = det(λI − P BP −1 ) = det(P (λI − B)P −1 ) = det(P ) det(λI − B) det(P −1 ) = det(λI − B) Therefore, A and B have the same characteristic polynomials. On the other hand, suppose that A and B have the same characteristic polynomials. Let det(λI − A) = det(λI − B) = (λ − λ1 )(λ − λ2 )...(λ − λn ) where λ1 , λ2 , ..., λn are the eigenvalues of A and B. Since A and B are symmetric, they are diagonalizable. exist invertible matrices P and Q such that λ1 λ1 λ λ2 2 and QBQ−1 = P AP −1 = . .. .. . λn There λn Hence P AP −1 = QBQ−1 ⇒ A = P −1 QBQ−1 P = (P −1 Q)B(P −1 Q)−1 So A and B are similar. (3) Let u = (1, 1, 1) and v = (0, −1, −1) be two vectors in R3 . (a) Find the hyperplane W = {a1 x1 + a2 x2 + a3 x3 = 0} such that u is the reflection of v with respect to W . Solution. We have W = w⊥ where w = u − v = (1, 2, 2). So W = {x1 + 2x2 + 2x3 = 0}. (b) Let T : R3 → R3 be the reflection with respect to the hyperplane obtained in part (a). Find the matrix [T ]B representing T with respect to the standard basis B. 3 Solution. The corresponding Householder matrix is T 1 w w 2 [T ]B = I − 2 = I − 2 1 2 2 ||w|| ||w|| 9 2 1 2 2 7/9 −4/9 −4/9 2 = I − 2 4 4 = −4/9 1/9 −8/9 9 2 4 4 −4/9 −8/9 1/9 (4) Let Q(x1 , x2 , x3 ) = (x1 + x2 + x3 )2 + (x1 − x2 )2 be a quadratic form in the three variables x1 , x2 and x3 . (a) Find a 3 × 3 symmetric matrix A such that Q(x1 , x2 , x3 ) = xT Ax, x1 where x = x2 . x3 Solution. We have 2 0 1 Q(x1 , x2 , x3 ) = 2x21 + 2x22 + x23 + 2x1 x3 + 2x2 x3 = xT 0 2 1 x 1 1 1 (b) Find a 3 × 3 orthogonal matrix P such that P T AP is diagonal. Solution. Note that (1, 1, 1) and (1, −1) are orthogonal. Therefore, √ √ √ 1/√3 1/ √3 1/ 3 P T = 1/ 2 −1/ 2 0 a b c Since P T is orthogonal, a+b+c = a−b = 0 and a2 +b2 +c2 = 1. Therefore, √ √ √ 1/√3 1/ √3 1/ 3 P T = 1/√2 −1/√ 2 0√ 1/ 6 1/ 6 −2/ 6 and hence √ √ √ 1/√3 1/ √2 1/√6 P = 1/√3 −1/ 2 1/ √6 1/ 3 0 −2/ 6 4 (c) Let x =P y. What is Q in terms of y1 , y2 and y3 , where y1 y = y2 ? y3 Solution. We have Q(x1 , x2 , x3 ) = xT Ax = yT P T AP y = 3y12 + 2y22 (d) Find the maximum and minimum values of Q(x1 , x2 , x3 ) subject to the constraint x21 + x22 + x23 = 1 and where these extreme values are achieved. Solution. We have 0 ≤ 3y12 + 2y22 ≤ 3(y12 + y22 + y32 ) Therefore, Qmin = 0 when y1 = y2 = 0 and y3 = ±1, i.e., √ 1/√6 x1 0 x2 = P 0 = ± 1/ 6 √ ±1 x3 −2/ 6 and Qmax = 3 when y1 = ±1 and y2 = y3 = 0, i.e., √ 1/√3 ±1 x1 x2 = P 0 = ± 1/ 3 √ 0 x3 1/ 3 1 −1 . (5) Let A = −1 1 (a) Find an invertible matrix P such that P AP −1 is diagonal. Solution. The characteristic polynomial of A is det(λI − A) = λ(λ − 2). For λ = 0, the corresponding eigenspace is 1 null(−A) = Span{ } 1 For λ = 1, the corresponding eigenspace is 1 null(2I − A) = Span{ } −1 Let −1 1 −1 −1 1/2 1/2 1 1 = P = =− 1/2 −1/2 1 −1 2 −1 1 5 Then P AP −1 1/2 1/2 1 −1 1 1 0 0 = = 1/2 −1/2 −1 1 1 −1 0 2 (b) Find A2009 . Solution. Since PA 2009 P −1 = (P AP −1 2009 ) 0 0 = 2009 0 2 we have A 2009 0 0 =P P 0 22009 1 1 0 0 1/2 1/2 = 1 −1 0 22009 1/2 −1/2 2008 2 −22008 = −22008 22008 −1 Alternatively, we may apply the Cayley-Hamilton theorem: A2 = 2A. It follows that An = 2n−1 A. Therefore, 2008 2 −22008 2009 2008 A =2 A= −22008 22008 (6) Let P2 be the vector space of polynomials in x of degree at most 2 and let T : P2 → P2 be the map given by T (f (x)) = f (1 − x). (a) Show that T is a linear transformation. Proof. For all f (x) and g(x) in P2 , T (f (x)+g(x)) = (f +g)(1−x) = f (1−x)+g(1−x) = T (f (x))+T (g(x)) For all f (x) ∈ P2 and λ ∈ R, T (λf (x)) = λf (1 − x) = λT (f (x)) Therefore, T is a linear transformation. 6 (b) Find the matrix [T ]S representing T with respect to the basis S = {1, x, x2 }. Solution. We have T (1) = 1, T (x) = 1 − x and T (x2 ) = (1 − x)2 . Therefore, 1 1 [T (1)]S = [1]S = 0 , [T (x)] = [1 − x]S = −1 0 0 and 1 [T (x2 )]S = [(1 − x)2 ]S = [1 − 2x + x2 ]S = −2 1 It follows that 1 1 1 [T ]S = 0 −1 −2 0 0 1 (c) Let B = {1, x − 1, (x − 1)2 }. Find the transition matrix PS→B and the matrix [T ]B representing T with respect to B. Solution. Since 1 1 [1]B = 0 , [x]B = [1 + (x − 1)]B = 1 0 0 and 1 [x2 ]B = [(1 + (x − 1))2 ]B = [1 + 2(x − 1) + (x − 1)2 ]B = 2 1 we have 1 1 1 [PS→B ] = 0 1 2 0 0 1 Since 1 −1 [T (1)]B = [1]B = 0 , [T (x − 1)] = [−x]B = [−1 − (x − 1)]B = −1 0 0 7 and 1 2 2 2 [T ((x − 1) )]B = [x ]B = [1 + 2(x − 1) + (x − 1) ]B = 2 1 we have 1 −1 1 [T ]B = 0 −1 2 0 0 1 (d) Does there exist a basis B such that [T ]B is diagonal? If yes, find such a basis B. If no, justify your answer. Solution. Such a basis exists if and only if [T ]S is diagonalizable. The matrix [T ]S has two eigenvalues 1 and −1. For λ = 1, the corresponding eigenspace is 0 1 null(I − [T ]S ) = Span{0 , 1 } −1 0 For λ = −1, the corresponding eigenspace is 1 null(−I − [T ]S ) = Span{ −2} 0 Therefore, [T ]S has three linearly independent eigenvectors and is hence diagonalizable. The corresponding basis B is {1, x − x2 , 1 − 2x}. (7) Do the following: (a) Find the least squares solution of 1 0 8 1 1 x1 = 0 x2 1 0 0 Solution. The associated normal system is 1 0 8 1 1 1 x 1 1 1 3 1 x1 8 1 0 ⇔ 1 1 = = 0 1 0 x2 0 1 0 1 1 x2 0 1 0 0 So the least squares solution is x1 = 4 x2 = −4 8 (b) Express w = (8, 0, 0) in the form w = w1 + w2 , where w1 lies in the subspace W of R3 spanned by the vectors u1 = (1, 1, 1) and u2 = (0, 1, 0) and w2 is orthogonal to W . Solution. Note that w1 = ProjW w = Projcol(A) w where 1 0 A = 1 1 1 0 By part (a), w1 = x1 u1 + x2 u2 = (4, 0, 4) and w2 = w − w1 = (4, 0, −4)