Math 415 - Midterm 3Thursday, November 20, 2014Circle your section:Philipp Hieronymi 2pm 3pmArmin Straub 9am 11amName:NetID:UIN:Problem 0. [1 point] Write down the number of your discussion section (for instance, AD2or ADH) and the first name of your TA (Allen, Anton, Mahmood, Michael, Nathan, Pouyan,Tigran, Travis).Section: TA:To be completed by the grader:0 1 2 3 4 5 6 ShortsP/1 /? /? /? /? /? /? /? /?Good luck!1Instructions• No notes, personal aids or calculators are permitted.• This exam consists of ? pages. Take a moment to make sure you have all pages.• You have 75 minutes.• Answer all questions in the space provided. If you require more space to write youranswer, you may continue on the back of the page (make it clear if you do).• Explain your work! Little or no points will be given for a correct answer with noexplanation of how you got it.• In particular, you have to write down all row operations for full credit.Problem 1. Let A =1 −11 01 11 2and b =50510. Find a least squares solution of Ax = b.Solution. We have to solve ATAˆx = ATb:ATA =1 1 1 1−1 0 1 21 −11 01 11 2=4 22 6and,ATb =1 1 1 1−1 0 1 250510=2020.Since4 2 202 6 20R2→R2−1/2R1−−−−−−−−−→4 2 200 5 10,we obtainˆx =42.Problem 2. Let W = span0101,0111.(a) Find an orthonormal basis for W .(b) What is the orthogonal projection of1210onto W ?(c) Write1000as the sum of a vector in W and a vector in W⊥.(d) Find the projection matrix corresponding to orthogonal projection onto W .2Solution.(a) We apply Gram-Schmidt to {v1, v2} =0101,0111. We have:u1=v1kv1k=0101k0101k=01√201√2and,u2=v2− (u1· v2)u1kv2− (u1· v2)u1k=0111− (01√201√2·0111)01√201√2k0111− (01√201√2·0111)01√201√2k=0010k0010k=0010Hence,01√201√2,0010is an orthonormal basis for W .(b) Using the orthonormal basis {u1, u2} for W , we find that the orthogonal projection ofw =1210onto W is(w · u1)u1+ (w · u2)u2=0111.(c)1000is orthogonal to W , therefore we have:1000=1000+0000,3where1000is orthogonal to W and0000is in W. (Hence, the projection of1000ontoW is0000.)(d) We know that W = Col(0 01√200 11√20). Since the columns of Q =0 01√200 11√20are orthonormal,the projection matrix onto W is:QQT=0 01√200 11√2001√201√20 0 1 0=0 0 0 00120120 0 1 0012012Here, we used Problem 4(a) from discussion problem set 11. However, you do not needto know this formula. An alternative way to compute the projection matrix is to projectthe standard unit vectors onto W. The results are the columns of the projection matrix.Observe how, in particular, the first column matches the observation in the previousproblem that the first standard basis vector gets projected to zero.[Note: once we have the projection matrix, we can also find the projection in part (b) bymultiplication with the projection matrix, i.e.,0 0 0 00120120 0 1 00120121210.]Problem 3. Find the QR decomposition of A =4 25 00 0 −23 −25 0.Solution. We start with the columns of A(= [v1v2v3]) and we use Gram-Schmidt to find thecolumns of Q(= [q1q2q3]):q1=v1kv1k=403k403k=45035and,q2=v2− (q1· v2)q1kv2− (q1· v2)q1k=250−25− (45035·250−25)45035k250−25− (45035·250−25)45035k=210−28k210−28k=21350−2835=350−454and,q3=v3− (q1· v3)q1− (q2· v3)q2kv3− (q1· v3)q1− (q2· v3)q2k=0−20− (45035·0−20)45035− (350−45·0−20)350−45k0−20− (45035·0−20)45035− (350−45·0−20)350−45k=0−20k0−20k=0−10Hence,Q =453500 0 −135−450Finally:R = QTA =45035350 −450 −1 04 25 00 0 −23 −25 0=5 5 00 35 00 0 2Problem 4. Find the least squares line for the data points (1, 1), (2, 1), (3, 4), (4, 4).Solution. We have to find a and b (where the least squares line is y = ax + b) so thatabisthe least squares solution of:Ax =1 12 13 14 1x =1144= bWe have to solve ATAˆx = ATb:ATA =1 2 3 41 1 1 11 12 13 14 1=30 1010 4ATb =1 2 3 41 1 1 11144=3110we have:30 103110 4 10R1→R1−3R2,R1↔R2−−−−−−−−−−−−→10 4 100 −2 1Hence,ˆx =65−12Therefore, the least squares line for the given data is y =65x −12.5Problem 5.(a) Let A =a b cd e fg h i. Write down the cofactor expansion of det(A) along the secondcolumn.(b) Let A = [a1a2a3] and B = [b1b2b3] be two 3 ×3-matrices. Suppose that det(A) = 5and b1= a1, b2= a1+ 2a2, b3= a3. What is det(B)?(c) Find det1 1 1 11 1 4 41 −1 2 −21 −1 8 −8.(d) Find det0 0 3 10 0 2 22 −1 1 11 0 −1 0.Solution.(a) We have:det(A) = −b det(d fg i) + e det(a cg i) − h det(a cd f)(b) We have:AC2→2C2,C2→C2+C1−−−−−−−−−−−−→ BThe first column operation multiplies the determinant by 2, and the second
View Full Document