Review for Midterm 3• Bring a number 2 pencil to the exam!• Extra help session: today and tomorrow, 4–7pm, in AH 441• Room assignments for Thursday, Nov 20, 7- 8:1 5pm:◦ if your last name starts with A-E: 213 Greg Hall◦ if your last name starts with F-L: 100 Greg Hall◦ if your last name starts with M-S h : 66 Library◦ if your last name starts with Si-Z: 103 Mumford Hall• Big topics:◦ Orthogonal projections◦ Least squares◦ Gram–Schmidt◦ Determinants◦ Eigenvalues and eigenvectorsOrthog onal projections• If v1,, vnis an orthogonal basis of V , and x is in V , thenx = c1v1++ cnvnwith cj=hx, vjihvj, vji.• Suppose that V is a subspac e of W , and x is in W , then the orthogonal projectionof x onto V is given byxˆ= c1v1++ cnvnwith cj=hx, vjihvj, vji.◦ The basis v1,, vnhas to be orthogo n al for this form ula!!◦ This decomposes x = xˆin V+ x⊥in V⊥, where the error x⊥is orthogonal to V . (thisdecom position is unique)v1v2xˆxx⊥Ar min [email protected]◦ The corresponding projection matrix represents xxˆwith respect to thestandard basis.Example 1.(a)What is the orth ogo n al projection of110onto span(100,010)?Solution: The proj e c tion is110.(b) What is the orthogonal projection of110onto span(1−10,1−11)?Solution: The proj e c tion is000.Wrong approach!!h110,1−10ih1−10,1−10i1−10+h110,1−11ih1−11,1−11i1−11=000This is wrong because1−10,1−11are not orthogonal. ( See next example!)(c) What is the orthogonal projection of1−10onto span(1−10,1−11)?Solution: The proj e c tion is1−10.Wrong!!h1−10,1−10ih1−10,1−10i1−10+h1−10,1−11ih1−11,1−11i1−11=1−10+231−11Corrected:1−10,1−111−10,001(for instan ce, using G ram –Schm idt)h1−10,1−10ih1−10,1−10i1−10+h1−10,001ih1−11,001i001=1−10+ 0001(d) What is the projection matrix correspondin g to orthogonal projection ontospan(010,110)?Solution: The proj e c tion matrix is1 0 00 1 00 0 0.What would Gram–Schmidt do?010,110010,100(e) What is the orthogonal projection of111onto span(010,110)?Ar min [email protected]: The proj e c tion is1 0 00 1 00 0 0111=110.• The space of all nice functions wi th period 2π has the natural inner product hf ,gi =R02πf(x)g(x)dx.[in Rn: hx, yi = x1y1++ xnyn]• The functions1, cos (x), sin (x), cos (2x), sin (2x),are an orthogonal basis for this spa ce.• Expanding a function f(x) in this basis produces its Fourier seriesf(x) = a0+ a1cos(x) + b1sin(x) + a2cos(2x) + b2sin(2x) +Example 2. How can we compute b2?Solution.b2sin(2x) is the orthogonal projection of f onto the span of sin (2x).Hence:b2=hf(x), sin (2x)ihsin (2x), sin (2x)i=R02πf(x)sin(2x)dxR02πsin2(2x)dxLeast squares• xˆis a least squares solution of the system Ax = b.xˆis such that Axˆ− b is as small as possible.ATAxˆ= ATb (the normal equations)Example 3. Find the least squares line for the data points (2, 1), (5, 2), (7, 3), (8, 3).Solution.Looking for β1, β2such that the line y = β1+ β2x best fits the data.The equationsyi= β1+ β2xiin matrix form:1 x11 x21 x31 x4design matrix Xβ1β2=y1y2y3y4ob servationvector yAr min [email protected], we ne ed to find a least squares solution to1 21 51 71 8β1β2=1233.XTX =1 1 1 12 5 7 81 21 51 71 8=4 2222 142XTy =1 1 1 12 5 7 81233=957Solving4 2222 142βˆ=957, we findβ1β2=2/75/14.Gram–SchmidtRecipe. (Gram–Schmidt orthonormalization)Given a basisa1,, an, produce an orthonormal ba sis q1,, qn.b1= a1, q1=b1kb1kb2= a2− ha2, q1iq1, q2=b2kb2kb3= a3− h a3, q1iq1− ha3, q2iq2, q3=b3kb3k• An orthogonal matrix is a square matrix Q with orthonormal columns.Equivalent ly,QTQ = I (also true for non-square matrices).• Apply Gram–Schmidt to the (in dependent) column s of A to obtain the QR decom-positionA = QR.◦ Q has orthonormal columns (the output vectors of Gram–Schmidt)◦ R = QTA is upper triangularAr min [email protected] 4. Find the QR decompos ition of A =1 12 00 1.Solution. We apply Gram–Schmidt to the co lumns of A:15√120= q1101− h101, q1iq1=101−15√15√120=4/5−2/51,19/5p4/5−2/51= q2Hence: Q = [q1q2] =15√445√25√−245√0545√And: R = QTA =15√25√0445√−245√545√1 12 00 1=55√15√0945√Determin ants• A is invertibledet (A)0• det (AB) = det (A)det(B)• det (A−1) =1det (A)• det (AT) = det (A)• The determinant is characterized by:◦ the normalization det I = 1,◦ and how it is affected by elementary row operations:− (replac ement) Add one row to a multiple of ano ther row.Does not change the determinant.− (interchange) Interc hange two row s.Reverses the sign of the determ inant.− (scaling) Multiply all entries i n a row by s.Multiplies the det e rminant bys.1 2 3 40 2 1 50 0 2 10 0 3 5@R4→R4−32R31 2 3 40 2 1 50 0 2 10 0 072= 1 · 2 · 2 ·72= 14Ar min [email protected]• Cofactor expansion is another way to compute determinants.12 03−1 220 1= −2 ·−3 221+ (−1) ·10+2 1− 0 ·1032−= − 2 ·
View Full Document