Example: confidence

18.06 Quiz 2 April 7, 2010 Professor Strang

Quiz 2 April 7, 2010 Professor StrangYour PRINTED name recitation number or instructor (33 points)(a) Find the matrixPthat projects every vectorbinR3onto the line in the direction ofa= (2,1,3).SolutionThe general formula for the orthogonal projection onto the column space of amatrixAisP=A(ATA) ,A= 213 so thatP=114 4 2 62 1 36 3 9 Remarks: Since we re projecting onto a one-dimensional space,ATAis just a number and wecan write things likeP= (AAT)/(ATA).This won t work in general. You don t have to know the formula to do this. Theithcolumn ofPis, pretty muchby definition, the projection ofei(e1= (1,0,0),e2= (0,1,0),e3= (0,0,1)) onto theline in the direction ofa. And this is something you should know how to do withouta : There was some leniency for computational errors, but otherwise there weren tmany opportunities for partial (b) What are the column space and nullspace ofP? Describe them geometrically and alsogive a basis for each column space is theline inR3in the direction ofa= (2,1,3).

The diagonal entries of Padd up to . Solution The diagonal entries of Padd up to 1 = the sum of the eigenvalues Since P is a projection, it’s only possible eigenvalues are = 0 (with multiplicity equal to the dimension of the nullspace, here 2) and = 1 (with multiplicity equal to the dimension

Tags:

  Entire

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of 18.06 Quiz 2 April 7, 2010 Professor Strang

1 Quiz 2 April 7, 2010 Professor StrangYour PRINTED name recitation number or instructor (33 points)(a) Find the matrixPthat projects every vectorbinR3onto the line in the direction ofa= (2,1,3).SolutionThe general formula for the orthogonal projection onto the column space of amatrixAisP=A(ATA) ,A= 213 so thatP=114 4 2 62 1 36 3 9 Remarks: Since we re projecting onto a one-dimensional space,ATAis just a number and wecan write things likeP= (AAT)/(ATA).This won t work in general. You don t have to know the formula to do this. Theithcolumn ofPis, pretty muchby definition, the projection ofei(e1= (1,0,0),e2= (0,1,0),e3= (0,0,1)) onto theline in the direction ofa. And this is something you should know how to do withouta : There was some leniency for computational errors, but otherwise there weren tmany opportunities for partial (b) What are the column space and nullspace ofP? Describe them geometrically and alsogive a basis for each column space is theline inR3in the direction ofa= (2,1,3).

2 One basis forit is 213 and there s not really much choice in giving this basis (you can rescale by a non-zero con-stant).The nullspace is theplane inR3that is perpendicular toa= (2,1,3)( , 2x+y+z= 0.)One basis for it is 30 2 , 120 though there are a lot of different looking choices for it (any two vectors that are perpendic-ular toaand not in the same line will work).RUBRIC: 6 points for giving a correct basis, and 4 points for giving the complete geometricdescription. Note that it is not correct to say ,N(P) =R2. It is correct to say thatN(P)is a (2-dimensional) plane inR3, but this is not a complete geometric description unless yousay (geometrically)whichplane it is: the one perpendicular toa/to the line througha.(c) What areallthe eigenvectors ofPand their corresponding eigenvalues? (You can usethe geometry of projections, not a messy calculation.) The diagonal entries ofPadd diagonal entries ofPadd up to1 = the sum of the eigenvaluesSincePis a projection, it s only possible eigenvalues are = 0 (with multiplicity equal tothe dimension of the nullspace, here 2) and = 1 (with multiplicity equal to the dimensionof the column space, here 1).

3 So, a complete list of eigenvectors and eigenvalues is: = 0 with multiplicity 2. The eigenvectors for = 0 are precisely the vectors in thenull space. That is, all linear combinations of[3 0 2]Tand[ 1 2 0]T. = 1 with multiplicity 1. The eigenvectors for = 1 are precisely the vectors in thecolumn space. That is, all multiples of[2 1 3] : 2 points for the sum of eigenvalues, 4 points for a full list (with multiplicities)of eigenvalues, and 4 points for a complete description of all eigenvectors. In light of theemphasized all, you d lose 1 point if you gave two eigenvectors for = 0 and didn t saythat all (at least non-zero) linear combinations were also eigenvectors for = (34 points)(a)p=A xis the vector inC(A) nearest to a given independent columns,what equation determines x? What are all the vectors perpendicular to the errore=b A x? What goes wrong if the columns ofAare dependent?Solution xis determined by the equation x= (ATA) 1 ATb(sinceAhas independentcolumns,ATAis invertible whether or notAis square).

4 The vectors perpendicular to anarbitrary error vector are the elements of the column space ofA. If the columns ofAaredependent,ATAis no longer invertible, and there is no unique nearest vector ( there aremultiple solutions).RUBRIC: 4 points for the determining equation (1 point off for actually invertingATAor saying that it was invertible), 3 points for identifying the column space, and three pointsfor identifying the multiple solutions (1 point off if you just say thatATAis not invertible).Note that you cannot writeA 1 BasBA: this only works for numbers because multiplicationand division are commutative, which is not true for matrices.(b) SupposeA=QRwhereQhas orthonormal columns andRis upper triangular xandpin terms ofQandRandb(notA).SolutionSinceQTQ=IandR is invertible, we obtain x= (ATA) 1 ATb= ((QR)T(QR)) 1(QR)Tb= (RTQTQR) 1 RTQTb=R 1(RT) 1 RTQTb=R 1 QTbp= (QR) x=QQTbNote thatQQTis not the identity matrix in : 6 points for finding x, 4 points forp.

5 One point off from each if the equations arenot simplified, more points off for bad form, having variables other thanQ,Randb, etc.(c) Ifq1andq2are any orthonormal vectors inR5,give a formula for the projectionpof anyvectorbonto the plane spanned byq1andq2(writepas a combination ofq1andq2).Solutionp= (qT1b)q1+ (qT2b) : little partial credit. If you identified the difference betweenbandpinstead, youmay have gotten some (33 points) This problem is about thenbynmatrixAnthat has zeros on its maindiagonal and all other entries equal to MATLABAn= eye (n) ones (n).(a) Find the determinant is a suggested approach:Start by adding all rows (except the last) to the last row, and then factoring out aconstant. (You could checkn= 3 to have a start on part b.)SolutionFollowing the hint, add all of the rows to the last row (which does not change thedeterminant). Thus the matrix becomes 0 1 1 1 10 1 1 1 10 (n 1) (n 1) (n 1) (n 1).

6 Next, pull out the factor of (n 1) from the last row. As the determinant is linear ineach row separately, we get 0 1 1 1 10 1 1 1 10 (n 1) (n 1) (n 1) (n 1) = (1 n) 0 1 1 1 10 1 1 1 10 1 .Next, add the last row back to each of the other rows (which again keeps the determinantthe same). So now we want to find(1 n) 1 0 0 00 1 0 00 0 1 1 1 1 .This matrix is lower triangular. So its determinant is the product of the entries on itsdiagonal. Thus the above quantity is (1 n).Alternately, one can find the determinant of the matrix by finding all its ones(n), we know thatN(An I) =N( ones(n)). The latter nullspacehas dimensionn 1. Thus 1 is an eigenvalue of multiplicityn 1, and the correspondingeigenvectors are all the nonzero vectors whose entries add up to addition, all of the rows ofAnadd up to 1 n.

7 So 1 nis an eigenvalue with eigenvector(1,1,..,1). Thus we have found all of the eigenvectors and eigenvalues. The determinantis the product of the eigenvalues, so it is 1n 1 (1 n) or 1 : 2 points for following the hint, 2 points for pulling out the factor of (1 n)correctly, 2 points for adding the last row to the other rows, 2 points for the correct answer.(b) For any invertible matrixA,the (1,1) entry ofA 1is the ratio the (1,1) entry ofA s rule givesA 1=1|A|CTwhereCis the cofactor matrix, whose (i,j) entryis ( 1)i+j|Mij|whereMijis the submatrix obtained by deleting rowiand columnjof the(arbitrary) invertible matrixA. Thus the entry withi=j= 1 is|M11|/|A|.In the case whereA=An, the submatrixM11isAn 1; so the desired formula is|An 1|/|An|.Now,|An|= 1 nby part (a). So|A4|= 3 and|A3|= 2. Thus the (1,1) entry ofA 14is 2 : 5 points for the correct ratio, 5 points for the correct application to the currentproblem.

8 If the wrong ratio was given, then no credit was given for applying it.(c) Findtwo orthogonal eigenvectorswithA3x=x.(So = 1 is a double eigenvalue.)SolutionIn solution 2 of part (a) above, we saw that the eigenvectors are all the nonzerovectors whose entries add up to 0. Two obvious such vectors are (1, 1,0) and (0,1, 1),but there are many more linearly independent , (1, 1,0) and (0,1, 1) are not orthogonal! So we must find another pair. Wecan use the Gram Schmidt process to get orthogonal vectors, or we can just try to guess twoorthogonal vectors whose entries add up to 1. For example, (1, 1,0) and (1,1, 2) work.(Note that the vectors are not required to have unit length.)RUBRIC: up to 5 points for a correct method, 2 points for finding linearly independentvectors, 3 points for orthogonality.(d) What is the third eigenvalue ofA3and a corresponding eigenvector?SolutionIn solution 2 of part (a) above, we saw that the third eigenvalue is 2 and acorresponding eigenvector is (1,1,1).

9 Another way to proceed is to notice that the trace ofA3is 0. However, the trace is thesum of the eigenvalues, and two of them are 1. So the third must be 2. Alternatively, inpart (a), we saw that|A3|= 2. However, the determinant is the product of the eigenvalues,and two of them are 1. So the third must be third way to proceed is to find the characteristic polynomial ofA3, which is 3 3 + 1 is a double root, we can find the third root by dividing twice by : 5 points for the eigenvalue, 5 points for a corresponding Professor EdelmanQuiz 2 November 7, 2012 Grading1234 Your PRINTED name is:Please circle your recitation:1 T 9 2-132 Andrey Grinshpun2-349 3-7578agrinshp2 T 10 2-132 Rosalie Belanger-Rioux 2-331 3-5029robr3 T 10 2-146 Andrey Grinshpun2-349 3-7578agrinshp4 T 11 2-132 Rosalie Belanger-Rioux 2-331 3-5029robr5 T 12 2-132 Geoffroy Horel2-490 3-4094ghorel6 T 1 2-132 Tiankai Liu2-491 3-4091tiankai7 T 2 2-132 Tiankai Liu2-491 3-4091tiankai1 (27 pts.)

10 Pis anyn nProjection Matrix. Compute the ranks ofA,B,andCbelow. Your methodmust be visibly correct for every suchP,not just one ) (8 pts.)A= (I P) a projection matrix,P2=P, so(I P)P=P P2=P P= 0and has ) (10 pts.)B= (I P) P.(Hint: SquaringBmight be helpful.)B2= (I 2P)2=I2 4P+ 4P2=I. The rank ofIisn. The rank ofB2is at most therank ofBand the rank ofBis at mostn, soBmust have ) (9 pts.)C= (I P)2012+ Pis a projection matrix, so(I P)2012=I PandP2012=P, so the abovesimplifies toI, which has (22 pts.)Consider a4 4matrixA= 0x y zx1 0 0y0 1 0z0 0 1 .a) (17 pts.) Compute|A|,the determinant ofA,in simplest answer isdetA= x2 y2 z2. But before we discuss how to get this answer, I dlike to call your attention to that fact that the expression x2 y2 z2is symmetric inthe three variablesx, y, z. That is to say, if we swap the roles of any two of these variables,the expression as a whole is unchanged. Why might we have predicted thatdetAhas thisproperty?


Related search queries