Math 317: Linear Algebra Exam 3 Solutions Fall 2015 Name: *No notes or electronic devices. You must show all your work to receive full credit. When justifying your answers, use only those techniques that we learned in class up to Section 5.1. I am thinking of the number thirty seven. Unless otherwise stated, you do not have to simplify your answers. Good luck! 1. Suppose that A is a 4 × 4 matrix with rows a, b, c and d such that det A = 5. That is, a b A= c d (a) (10) Calculate det B if 3a + b + d b B= c+d d Using the linearity in rows property for determinants and the fact that if a matrix has a row of zero entries then its determinant is 0, we obtain 3a + b + d 3a b d b 0 0 b det B = det c + d = det c + det d + det 0 d d 0 0 a b = 3 det c = 3(5) = 15. d (b) (5) Calculate det A−1 or explain why it does not exist. det A−1 = 1 1 = det A 5 (c) (5) Calculate det AB (if possible). If it is not possible, explain why. det AB = det A det B = (5)(15) = 75 1 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 2. Let V = Span (v1 = (1, 0, 1, 0), v2 = (0, 1, 4, 2)) ⊂ R4 . (a) (5) Find an orthogonal basis for V . We apply the Gram-Schmidt procedure on the basis for V . To begin, 1 0 we let w1 = 1 . A vector w2 that is in V and is orthogonal to w1 is 0 given by v2 · w1 w2 = v2 − w1 kw1 k2 1 0 −2 1 4 0 1 = 4 − 2 1 = 2 , 0 2 2 so that {v1 , v2 } is an orthogonal basis for V . (b) (5) Find a basis for V ⊥ . To find a basis for V ⊥ , we find a matrix A so that V = R(A). Then 1 0 1 0 V ⊥ = N (A). To begin, we write A = . Since rank(A) = 2, 0 1 4 2 we have that x3 and x4 are the free variables. Thus, x1 = −x3 and x2 = −4x3 − 2x4 , and a basis for V ⊥ = N (A) is given by −1 0 −4 −2 B = , . 1 0 0 1 (c) (5) Find the projection of (1, 1, 1, 1) on V ⊥ . Hint: Use the orthogonal basis you obtained in (a) to your advantage. Following the hint, we first find the projection of (1, 1, 1, 1) on V . Since we have an orthogonal basis for V , we have that projV (b) = projw1 (b) + projw2 (b) = b · w1 b · w2 w1 + w2 2 kw1 k kw2 k2 2 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 1 −2 7/13 2 0 + 3 1 = 3/13 . = 2 1 13 2 19/13 0 2 6/13 Now, we use the fact that projV ⊥ (b) = b − projV (b) to obtain 1 7/13 6/13 1 3/13 10/13 projV ⊥ (b) = 1 − 19/13 = −6/13 . 1 6/13 7/13 3 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 3. Let A be an n × n matrix and let Rn×n denote the space of all n × n matrices. (a) (5) Define the trace of a matrix A. trace(A) = Pn i=1 aii , where aii denotes the diagonal entries of A. (b) Let < A, B >= trace(AB). Show that <A, B > is not an inner product on 1 1 Rn×n . Hint: Consider < A, A > for A = . −2 1 Proof : We observe the that with A given to us in thehint, that < −1 2 1 1 1 1 A, A >= trace = trace = −2 6≥ 0. −2 1 −2 1 −4 −1 Hence, < A, B >= trace(AB) is not an inner product on Rn×n . 4 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 4. (15 points) Find the QR-factorization of the following matrix: 1 1 A= 1 1 2 4 . 2 4 Solution: We begin by finding an orthonormal basis for C(A). To this regard, we have that 1 1 1 1 1/2 1/2 q1 = √ = . 12 + 12 + 12 + 12 1/2 1/2 q2 is then given by v2 − (q1 · v2 )q1 kv2 − (q1 · v2 )q1 k (2, 4, 2, 4) − ((1/2, 1/2, 1/2, 1/2) · (2, 4, 2, 4))(1/2, 1/2, 1/2, 1/2) = k(2, 4, 2, 4) − ((1/2, 1/2, 1/2, 1/2) · (2, 4, 2, 4))(1/2, 1/2, 1/2, 1/2)k (2, 4, 2, 4) − 6(1/2, 1/2, 1/2, 1/2) = k(2, 4, 2, 4) − 6(1/2, 1/2, 1/2, 1/2)k −1/2 1/2 (−1, 1, −1, 1) = p = (−1)2 + 12 + (−1)2 + 12 −1/2 1/2 q2 = From our definition, we have that r11 = 2 = r22 and r12 = 6. Thus the QR factorization for A is given by 1 1 A= 1 1 2 1/2 −1/2 1/2 1/2 2 6 4 = = QR 2 1/2 −1/2 0 2 4 1/2 1/2 5 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 1 1 3 5. (20, 5 each) Let V ⊂ R be the plane spanned by v1 = 0 and v2 = 1. 2 0 (a) Find a vector v3 so that V ⊥ = span(v3 ). Note that B = {v1 , v2 , v3 } is a basis for R3 . We find A so that V = R(A). Then V ⊥ = N (A). Let a matrix 1 0 2 A = . rank(A) = 2 since the vectors (that make up A) 1 1 0 are linearly independent and so we have one free variable x3 . Solving the associated homogenous system of equations gives x1 = −2x 3 and −2 x1 = −x2 = −2x3 =⇒ x2 = 2x3 . Thus we can take v3 = 2 . 1 (b) Let T2 : R3 → R3 be the linear transformation which reflects x ∈ R3 over V . Find [T2 ]B , the matrix of T2 with respect to the basis B. Recalling that T2 (x) = projV (x) − projV ⊥ (x), we have that (T2 (v1 ))B = (v1 − 0)B = 1v1 + 0v2 + 0v3 (T2 (v2 ))B = (v2 − 0)B = 0v1 + 1v2 + 0v3 (T2 (v3 ))B = (0 − v3 )B = 0v1 + 0v2 − 1v3 , 1 0 0 so that [T2 ]B = 0 1 0 . 0 0 −1 (c) Use the change of basis formula to compute [T2 ]stand . That is, compute the standard matrix of T2 . You do not need to carry out the matrix multiplication/inversion. The change of basis formula tells us that [T2 ]stand = P [T2 ]B P −1 where the columns of P form a basis for B. Thus, we have that [T2 ]stand −1 1 1 −2 1 0 0 1 1 −2 = 0 1 2 0 1 0 0 1 2 . 2 0 1 0 0 −1 2 0 1 (d) Calculate det [T2 ]stand . 6 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 By the change of basis formula, [T2 ]stand is similar to [T2 ]B . Thus, they have the same determinant (since the determinant is a similarity invariant). [T2 ]B is a diagonal matrix and hence its determinant is the product of its diagonal entries. Thus, det [T2 ]stand = det[T2 ]B = (1)(1)(−1) = −1. 7 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 6. (5 points each) Determine if the following statements are true or false. If the statement is true, give a brief justification. If the statement is false, provide a counterexample or explain why the statement is not true. (a) Suppose that the columns of A contain a basis for a subspace V ⊂ Rm . If A = QR where Q is an orthogonal matrix and R is an upper triangular matrix with positive diagonal entries, then the projection matrix (which projects any x ∈ Rn onto V ) is given by PV = QQT . True. Recalling that the projection matrix PV is given by PV = A(AT A)−1 AT (and that QT Q = I), we have that PV = = = = = = A(AT A)−1 AT QR((QR)T QR)−1 (QR)T QR(RT QT QR)−1 RT QT QR(RT R)−1 RT QT QR(R)−1 (RT )−1 RT QT QQT (b) det(A + B) = det A + det B for any two n × n matrices A and B. 1 0 0 False. As a counterexample, let A = and B = 0 0 0 det(A + B) = det(I2×2 ) = 1, but det A = det B = 0 since A singular. 0 . Then 1 and B are (c) There is a nonsingular matrix P such that 2 2 1 1 P =P . 0 4 0 5 2 2 1 1 False. If this were true, then would be similar to . How0 4 0 5 ever, the determinants (product of the diagonal entries since these matrices are upper triangular) of the two matrices are not equal, and hence cannot be similar to each other, since the determinant is a similarity invariant. (d) Suppose that A and B are n × n matrices such that trace(A) = trace(B). Then A is similar to B. 8 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 False. The two matrices in part(c) work as a counterexample. 9 Math 317: Linear Algebra Exam 3 Solutions Fall 2015 7. (5 points) (Bonus): I am thinking of a number between 1-100. What is it? 37. See the directions. 10