Docsity

Solutions to Projection and Least Square Problems, Study notes of Linear Algebra

Toggle sidebar
bg1
1
Examples of projection/least square problems
Problem 1. Let S=R(A), where
A=
−1−4
−1−3
2−3
and b=
−1
2
2
.
Find the projection pand residual rof bon S.
Solution. We have that
ATA=6 1
1 34and ATb=3
−8.
Solving the linear system ATAc =ATbin cwe obtain c= [110/203,−51/203]T. Hence
p=Ac = [94/203,43/203,373/203]T
and
r=b−p= [−297/203,363/203,33/203]T.
Problem 2. Find the least square linear fit to the data
x−1 0 1 2
y−2−1 0 3 .
Solution. Let
A=
1−1
1 0
1 1
1 2
and b=
−2
−1
0
3
.
We have that
ATA=4 2
2 6and ATb=0
8.
Solving the linear system ATAc =ATbin cwe obtain c= [−4/5,8/5]T. Hence
y= (−4/5)x+ 8/5
is the least square linear fit to the data.
pf2

Partial preview of the text

Download Solutions to Projection and Least Square Problems and more Study notes Linear Algebra in PDF only on Docsity!

Examples of projection/least square problems

Problem 1. Let S = R(A), where

A =

 (^) and b =

Find the projection p and residual r of b on S.

Solution. We have that

AT^ A =

[

]

and AT^ b =

[

]

Solving the linear system AT^ Ac = AT^ b in c we obtain c = [110/ 203 , − 51 /203]T^. Hence

p = Ac = [94/ 203 , 43 / 203 , 373 /203]T

and r = b − p = [− 297 / 203 , 363 / 203 , 33 /203]T^.

Problem 2. Find the least square linear fit to the data

x − 1 0 1 2 y − 2 − 1 0 3.

Solution. Let

A =

 and b =

We have that

AT^ A =

[

]

and AT^ b =

[

]

Solving the linear system AT^ Ac = AT^ b in c we obtain c = [− 4 / 5 , 8 /5]T^. Hence

y = (− 4 /5)x + 8/ 5

is the least square linear fit to the data.

Problem 3. Let

A =

 (^) and b =

Find the least square solution to the system Ax = b.

Solution. We have that

AT^ A =

[

]

and AT^ b =

[

]

Solving the linear system AT^ Ax = AT^ b in x we obtain that

x = [1/ 2 , 1 /2]T

is the least square solution to Ax = b.