Math 2270 Spring 2004 Homework 15 Solutions Section 5.4

advertisement
Math 2270 Spring 2004
Homework 15 Solutions
Section 5.4) 20, 22, 23, 26, 30
(20)
AT A =
"
1 1 0
1 0 1
T
(A A)
~x∗ = (AT A)−1 AT~b =
1
3

"
#"
2 −1
−1 2

−1
#


"
#
1 1
2 1


 1 0 =
1 2
0 1
1
=
3
"
1 1 0
1 0 1
2 −1
−1 2
#


"
#"
#
"
#
3
1
2 −1
6
2


=
 3 =
6
2
3 −1 2
3




#




−1
4
3
1 1 " #
3
2



 




∗
~b − A~x =  3  −  1 0 
= 3 − 2 = 1 

2
1
2
3
0 1
3

 


 

1
−1

 

 1  ·  1  = −1 + 1 = 0
0
1
1
−1

 

 1  ·  0  = −1 + 1 = 0
1
1
(22)
AT A =
"
3 5 4
2 3 5
T
−1
(A A)
~x∗ = (AT A)−1 AT~b =
1
219
"

38 −41
−41 50


#
"
#
3 2
50 41


 5 3 =
41 38
4 5
1
=
219
#"


"
3 5 4
2 3 5
38 −41
−41 50
#


"
#"
#
"
#
5
1
38 −41
68
3


=
 9 =
47
−2
219 −41 50
2


#





#
0
5
5
3 2 "
5
3



 


 
~b − A~x∗ = 
=  9 − 9 =  0 
 9 − 5 3 
−2
0
2
2
4 5
2
The least squares solution is the exact solution, so the error is zero.
1
Math 2270 Spring 2004
Homework 15 Solutions
(23)
AT A =
T
(A A)
1
28
~x∗ = (AT A)−1 AT~b =
"
−1
"
1 2 1
1 8 5
1
=
56
45 −11
−11
3
"
#


"
#
1 1
6 22


 2 8 =
22 90
1 5
90 −22
−22
6
#"
1 2 1
1 8 5
#
#
1
=
28
"
45 −11
−11
3
#


"
#"
#
"
#
1
1
45 −11
0
0


=
 −2  =
3
0
0
28 −11
3
Here we notice that the vector ~b is perpendicular to the im(A). Finding the least squares
solution involves projecting the vector ~b onto the subspace spanned by the columns of A.
Since ~b is perpendicular to im(A), the orthogonal projection is the zero vector.
(26)





66 78 90
1 2 3
1 4 7




T
A A =  2 5 8   4 5 6  =  78 93 108 

90 108 126
7 8 9
3 6 9





1
1
1 4 7





T~
A b =  2 5 8  0  =  2 
3
0
3 6 9




1 13/11 15/11 | 1/66
66 78 90 | 1




78
93
108
|
2
 →  0 9/11 18/11 | 9/11  →

0 18/11 36/11 | 18/11
90 108 126 | 3




1 0 −1 | −7/6
1 13/11 15/11 | 1/66


2 |
1 
1
2 | 1 

→ 0 1
 0
0 0 0 |
0
0
1
2 | 1




1
−7/6



∗
1  + r  −2 
~x = 

1
0
where r is an arbitrary constant.
2
Math 2270 Spring 2004
Homework 15 Solutions
(30) We have the following system of four equations:
f (0) = c0 = 0
f (0) = c0 = 1
f (1) = c0 + c1 = 1
This system is definitely inconsistent (look at the first two equations). We turn the system
of equations into a matrix equation.



AT A =
"
1 1 1
0 0 1
~x∗ = (AT A)−1 AT~b =
#
1
2


"
#
1 0
3 1


 1 0 =
1 1
1 1
"
1 −1
−1 3
#"

0

~b = 
 1 
1
1 0


A= 1 0 
1 1
1 1 1
0 0 1
(AT A)−1
#
1
=
2
"
1 −1
−1 3
#

"
#"
#
"
#
0
1
1 −1
2
1/2


=
 1 =
1
1/2
2 −1 3
1

The line that fits the data points the best has a slope of 1/2 and a y-intercept of 1/2, or
f ∗ (t) = 12 + 12 t. If you draw a picture, you will notice that this lines goes exactly through
the point (1,1), and splits the difference between the points (0,0) and (0,1).
3
Download