DOC PREVIEW
UIUC MATH 415 - math415-ds-10-sol

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

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 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 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Preparation problems for the discussion sections on November 4th and 6th1. Let A =0 1−2 22 2and b =110. Find the least squares solutionbx of Ax = b.Solution: We first calculate ATA and ATb:ATA =0 −2 21 2 20 1−2 22 2=8 00 9,ATb =0 −2 21 2 2110=−23.Now we have to solve8 00 9bx =−23.It is easy to check that thenbx =−1413.2. A scientist tries to find the relation between the mysterious quantities x and y. She measuresthe following values:x | 1 | 2 | 3 | 4−− −− −− −− −−y | 2 | 5 | 9 | 17(i) Suppose that y is a linear function of the form a + bx. Set up the system of equationsto find the coefficients a and b.(ii) Find the best estimate for the coefficients.(iii) Same question if we suppose that y is a quadratic function of the a + bx + cx2.Solution: a. We set up the equation as follows:1 11 21 31 4ab=25917.b. We calculate1 11 21 31 4T1 11 21 31 4=1 1 1 11 2 3 41 11 21 31 4=4 1010 30and1 11 21 31 4T25917=1 1 1 11 2 3 425917=33107Now we solve4 10 3310 30 107R2→R2−2.5R1−−−−−−−−→4 10 330 5 24.5R1→R1−2R2−−−−−−−→4 0 −160 5 24.5.1Hence a = −4 and b = 4.9.c. We set up the equation as follows:1 1 11 2 41 3 91 4 16abc=25917.We calculate1 1 11 2 41 3 91 4 16T1 1 11 2 41 3 91 4 16=1 1 1 11 2 3 41 4 9 161 1 11 2 41 3 91 4 16=4 10 3010 30 10030 100 354and1 1 11 2 41 3 91 4 16T25917=1 1 1 11 2 3 41 4 9 1625917=33107375.One can row reduce4 10 30 3310 30 100 10730 100 354 375−→1 0 0 2.250 1 0 −1.350 0 1 1.25.So a = 2.25, b = −1.35 and c = 1.25.3. The system of the equations Ax = b withA =1 −11 01 11 2, b =50510,is not consistent.(i) Find the least squares solutionbx for the equation Ax = b.(ii) Determine the least squares line for the data points (−1, 5), (0, 0), (1, 5), (2, 10).Solution:(i) We first calculate ATA and ATb:ATA =1 1 1 1−1 0 1 21 −11 01 11 2=4 22 6,ATb =1 1 1 1−1 0 1 250510=2020.Now we have to solve4 22 6bx =2020.We have4 2 202 6 20R2→R2−1/2R1−−−−−−−−−→4 2 200 5 10.2Hence,bx =42.(ii) Denoting the least squares line as y = ax + b, we have to findbaso that1 −11 01 11 2bais the closest possible value to50510. From the first part,ba=42. Hence, the leastsquares line is y = ax + b = 2x + 4.4. Let v1=1011, v2=1000and v3=210−1. Using Gram-Schmidt, find an orthonormal basisfor W = Span(v1, v2, v3), using v1, v2, and v3.Solution: Setu1=v1kv1k=1011k1011k=1√301√31√3Thenu2=v2− (u1· v2)u1kv2− (u1· v2)u1k=1000− (1√301√31√3·1000)1√301√31√3k1000− (1√301√31√3·1000)1√301√31√3k=230−13−13k120−12k=r32230−13−13=2√60−1√6−1√63Finally,u3=v3− (u1· v3)u1− (u2· v3)u2kv3− (u1· v3)u1− (u2· v3)u2k=210−1− (1√301√31√3·210−1)1√301√31√3− (2√60−1√6−1√6·210−1)2√60−1√6−1√6k210−1− (1√301√31√3·210−1)1√301√31√3− (2√60−1√6−1√6·210−1)2√60−1√6−1√6k=r230112−12=02√61√6−1√6Now {u1, u2, u3} is an orthonormal basis of W .5. Let A =1 11 −1.(i) Calculate ATA. What does this tell you about the columns of A?(ii) Find an orthonormal basis {q1, q2} for Col(A) (starting with the columns of A!). PutQ =q1q2 . What is Q−1?Solution:(i) We have:ATA =1 11 −11 11 −1=2 00 2Since only entries on the main diagonal are nonzero, columns of A are orthogonal toeach other.(ii) Since we already know that columns of A are orthogonal to each other, to find anorthonormal basis for Col(A) it is enough to divide each column by its length. Hence:(note that for non-zero vectors, orthogonality implies linear independence)Q =1√21√21√2−1√2Q is an orthogonal matrix, so:Q−1= QT=1√21√21√2−1√26. Let A =1 1 20 0 11 0 0. Find the QR decomposition of A: write A = QR where Q is a matrixwith orthonormal columns and R is an upper triangular matrix.4Solution: Let W be the column space of A. Then W = span(101,100,210). By applyingthe Gram-Schmidt process to these vectors, we have:u1=v1kv1k=101k101k=1√201√2Thenu2=v2− (u1· v2)u1kv2− (u1· v2)u1k=100− (1√201√2·100)1√201√2k100− (1√201√2·100)1√201√2k=120−12k120−12k=1√20−1√2.Finally,u3=v3− (u1· v3)u1− (u2· v3)u2kv3− (u1· v3)u1− (u2· v3)u2k=210− (1√201√2·210)1√201√2− (1√20−1√2·210)1√20−1√2k210− (1√201√2·210)1√201√2− (1√20−1√2·210)1√20−1√2k=010.Therefore, by using the Gram-Schmidt


View Full Document

UIUC MATH 415 - math415-ds-10-sol

Documents in this Course
disc_1

disc_1

2 pages

Load more
Download math415-ds-10-sol
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 math415-ds-10-sol 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 math415-ds-10-sol 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?