DOC PREVIEW
UIUC MATH 415 - lecture26

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ReviewLet W be a subspace of Rn, and x in Rn(but maybe not in W ).v1v2xˆxx⊥Let xˆbe the orthogonal projection of x onto W .(vector in W as close as possible to x)• If v1,, vmis an orthogonal b asis of W , thenxˆ=x · v1v1· v1v1proj. o f x on to v1++x · vmvm· vmvmproj. of x on to vm.• The decomposition x = xˆin W+ x⊥in W⊥is uni que.Least squaresDefinition 1. xˆis a least squares solution of the system Ax = b if xˆis such thatAxˆ− b is as small as possible.• If Ax = b is consistent, then a l e ast squares solution xˆis justan ordinary s olution.(in that case, Axˆ− b = 0)• Interesting case: Ax = b is inconsistent.(in other words: the system is overdetermined)Idea. Ax = b is consistentb is in Col(A)So, if Ax = b is inconsistent, we• replace b with its projection bˆonto Col(A),• and solve Axˆ= bˆ. (consistent by construction!)AxbArmin [email protected] 2. Find th e least squares solution to Ax = b, whereA =1 1−1 10 0, b =211.Solution. Note that the columns of A are orthogonal.[Otherwise , we co uld not proceed in th e same way.]Hence, the projectionbˆof b onto Col(A) isbˆ=211·1−101−10·1−101−10+211·110110·110110=121−10+32110=210.We have already solved Axˆ= bˆin the process: xˆ=1/23/2.The normal equat ionsThe following result provides a straightforward recip e (thanks to the FTLA) to find lea stsquares solutions for any matrix.[The previous example was only simple because the columns ofA were or tho gon al.]Theorem 3. xˆis a least squares solution of Ax = bATAxˆ= ATb (the normal equations)Proof.xˆis a least squares solution of Ax = bAxˆ− b is as sma ll as possibleAxˆ− b is orthogonal to Col(A)GFTLAAxˆ− bis in Nul(AT)AT(Axˆ− b) = 0ATAxˆ= ATb Armin [email protected] 4. (again) F ind the least squares solution to Ax = b, whereA =1 1−1 10 0, b =211.Solution.ATA =1 −1 01 1 01 1−1 10 0=2 00 2ATb =1 −1 01 1 0211=13The normal equations ATAxˆ= ATb are2 00 2xˆ=13.Solving, we fi nd (again) xˆ=1/23/2.Example 5. Find th e least squares solution to Ax = b, whereA =4 00 21 1, b =2011.What is the projection of b onto Col(A)?Solution.ATA =4 0 10 2 14 00 21 1=17 11 5ATb =4 0 10 2 12011=1911The normal equations ATAxˆ= ATb are17 11 5xˆ=1911.Solving, we fi nd xˆ=12.The projection ofb onto Col(A) is Axˆ=4 00 21 112=443.Just to make sure: why is Axˆthe projection of b onto Col(A)?Be cause, for a least squares solutionxˆ, Axˆ− b is as small as possible.Armin [email protected] projection bˆof b onto Col(A) isbˆ= Axˆ, with xˆsuch that ATAxˆ= ATb.If A has full column rank, this is (columns of A i ndependent)bˆ= A(ATA)−1ATb.Hence, the projection matrix for proj e c ting onto Col(A) isP = A(ATA)−1AT.Application: least squares linesExperimental data:(xi, yi)Wanted: paramete r s β1, β2such that yi≈ β1+ β2xifor all i0 2 4 6 8024This approximation should be so thatSSres=Xi[yi− (β1+ β2xi)]2residual sum of squaresis as smal l as possible .Example 6. Find β1, β2such t hat the line y = β1+ β2x best fits the data points (2, 1),(5, 2), (7, 3), (8, 3).Solution. The equations yi= β1+ β2xiin matrix form:1 x11 x21 x31 x4design m atrix Xβ1β2=y1y2y3y4ob servationvector yArmin [email protected], we nee d to find a least-squares solution to1 21 51 71 8β1β2=1233.XTX =1 1 1 12 5 7 81 21 51 71 8=4 2222 142XTy =1 1 1 12 5 7 81233=957Solving4 2 222 1 42βˆ=957, we findβ1β2=2/75/14.Hence, the least squares line isy =27+514x.0 2 4 6 8024Armin


View Full Document

UIUC MATH 415 - lecture26

Documents in this Course
disc_1

disc_1

2 pages

Load more
Download lecture26
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view lecture26 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lecture26 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?