Math 317: Linear Algebra Homework 9 Solutions

advertisement
Math 317: Linear Algebra
Homework 9 Solutions
The following problems are for additional practice and are not to be turned in: (All
problems come from Linear Algebra: A Geometric Approach, 2nd Edition by ShifrinAdams.)
Exercises: Section 4.2: 1–6, 8, 9
Turn in the following problems.
1. Section 4.2, Problem 2d
We apply the Gram-Schmidt procedure to obtain an orthronormal basis {q1 , q2 , q3 }
or the subspace spanned by the vectors: v1 = (−1, 2, 0, 2), v2 = (2, −4, 1, −4), v3 =
(−1, 3, 1, 1). To begin we let,
 
−1
2
 
0
2
  

−1
−1/3


1 2 
v1
 =  2/3  .
= 
=p
q1 =
kv1 k
3 0   0 
(−1)2 + 22 + 02 + 22
2
2/3
q2 is then given by (noting that kq1 k2 = 1 and so there is no denominator):




 
2
−1/3
0
−4
 2/3 
0
  − (−6) 

 
 
1
 0 
1
0
0
−4
2/3
0
v2 − (q1 · v2 ) q1


 = √
=  
=
q2 =
1 .
2
2 + 02 + 1 2 + 02
kv2 − (q1 · v2 ) q1 k
−1/3
0
−4
 2/3 
0
  − (−6) 

 1 
 0 
−4
2/3 q3 is given by
1
Math 317: Linear Algebra
Homework 9 Solutions
v3 − (q1 · v3 ) q1 − (q2 · v3 ) q2
kv3 − (q1 · v3 ) q1 − (q2 · v3 ) q2 k
 


 
−1
−1/3
0
3
 2/3 
0
  − (3) 

 
1
 0  − (1) 1
1
2/3
0


 
=  
−1
−1/3
0  3 
 2/3 
0
  − (3) 

 
 1 
 0  − (1) 1
1
2/3
0  
0
1
 


0
0
 1/2 
−1
.
= p
=
02 + 12 + 02 + (−1)2  0 
−1/2
q3 =
2. Section 4.2, Problem 6 (Hint: Find a matrix A so that V = R(A). Finding a basis
for the orthogonal complement of V should now be straightforward.)
(a) Let V = span (v1 = (1, 0, 1, 1), v2 = (0, 1, 0, 1)). To find an orthogonal basis
for V , {w1 , w2 } we apply the Gram-Schmidt procedure letting,
w1
 
1
0

= v1 = 
1
1
w2
 
  

0
1
−1/3
1 1 0  1 
(w1 · v2 )

  

w1 = 
= v2 −
0 − 3 1 = −1/3
2
kw1 k
1
1
2/3
1
0
1
1
(b) To find a basis for V , we let V = R(A) so that A =
.
−1/3 1 −1/3 2/3
Then V ⊥ = (R(A))⊥ = N (A). So to find a basis for V ⊥ is equivalent to
finding a basis for N (A). To this extent, we solve Ax = 0 to obtain
⊥
x1 + x3 + x4 = 0
−(1/3)x1 + x2 − (1/3)x3 + (2/3)x4 = 0 =⇒ −x1 + 3x2 − x3 + 2x4 = 0
2
Math 317: Linear Algebra
Homework 9 Solutions
Since the rank of V is 2, there are two free variables (x3 , x4 ) and so we
obtain
x1 = −x3 − x4 and 3x2 = x1 + x3 − 2x4 = (−x3 − x4 )+ x3− 2x4 =−3x4 =⇒
−1
−1
0
−1

 
x2 = −x4 . Thus a basis for N (A) is given by y1 = 
 1  , y2 =  0 .
0
1
(c) To find an v ∈ V and a w ∈ V ⊥ such that x = v + w for any x ∈ R3 , we
recall that x = projV (x) + projV ⊥ (x) where projV (x) ∈ V and projV ⊥ (x) ∈
V ⊥ . From (a), we have an orthogonal basis for V and so
projV (x) = projw1 (x) + projw2 (x),
where {w1 , w2 } is an orthogonal basis for V . So, we have
v = projV (x) = projw1 (x) + projw2 (x)
w2 ·x
w1 ·x
= kw
2 w1 + kw k2 w2
1k
2
 
1


1 ,x2 ,x3 ,x4 ) 0
= (1,0,1,1)·(x
12 +02 +12 +12
1 +
1


−1/3


(−1/3,1,−1/3,2/3)·(x1 ,x2 ,x3 ,x4 )  1 
2
2
2
2
(−1/3) +1 +(−1/3) +(2/3) −1/3
2/3


(6/15)x1 − (3/15)x2 + (6/15)x3 + (3/15)x4
(−3/15)x1 + (9/15)x2 − (3/15)x3 + (6/15)x4 

=
 (6/15)x1 − (3/15)x2 + (6/15)x3 + (3/15)x4 
(3/15)x1 + (6/15)x2 + (3/15)x3 + (9/15)x4
w = projV ⊥ (x) = x − v where v is given above.
3. Section 4.2, Problem 10
Proof : Suppose that v1 , . . . , vk ∈ Rn forms an orthronormal set and that
kxk2 = (x · v1 )2 + . . . + (x · vk )2 .
We prove that k = n and hence the set forms an orthronormal basis for Rn .
Since v1 , . . . , vk ∈ Rn forms an orthronormal set, it is linearly independent.
Thus we know k cannot be greater than n, since we have proven (in a previous
3
Math 317: Linear Algebra
Homework 9 Solutions
homework assignment) that any set in Rn containing more than n vectors is
linearly dependent. If k < n, then V 6= Rn and so since Rn = V + V ⊥ (by
the fundamental theorem of linear algebra) there is a nonzero vector x ∈ V ⊥ .
Recalling that x ∈ V ⊥ =⇒ x · vi = 0 for each vi ∈ V , we have that kxk2 =
(x · v1 )2 + . . . + (x · vk )2 = 0 =⇒ kxk2 = 0 =⇒ x = 0, which contradicts
the assumption that x was a nonzero vector. Thus k = n and since we have a
linearly independent set of n vectors in Rn , we know that this set will form an
(orthronormal) basis for Rn .
4. Section 4.2, Problem 11
(a) Proof : To prove that A−1 = AT , we verify that AT A = I where I denotes
the identity matrix. To this extent, we note that [AT A]ij = aTi aj where ai
denotes the ith column of A and aTi is the ith row of AT . Noting that since
the columns of A form an orthronormal set, we have that aTi aj = ai · aj = 0
when i 6= j and aTi aj = ai · aj = 1 if i = j. So [AT A]ii = 1 and [AT A]ij = 0
when i 6= j and so AT A = I =⇒ A−1 = AT .
(b) Using part (a) above, we note that aTi aj = ai · aj = 0 when i 6= j and
aTi aj = ai · aj = kai k2 since the columns of A form an orthogonal set.
So AT A is the diagonal matrix whose ith diagonal term is given by kai k2 .
That is AT A = diag {ka1 k2 , . . . , kan k2 }. Thus, if we multiply both sides by
diag {1/ka1 k2 , . . . , 1/kan k2 }, we obtain
diag {1/ka1 k2 , . . . , 1/kan k2 } AT A
= diag {1/ka1 k2 , . . . , 1/kan k2 } diag {ka1 k2 , . . . , kan k2 } = I,
so A−1 = diag {1/ka1 k2 , . . . , 1/kan k2 } AT .

1
1
5. Let A = 
1
0

 
0 −1
1
1
2 1
 and b =  .
1
1 −3
1 1
1
(a) Determine the QR factorization of A.
(b) Use the QR factors from part (a) to determine the least squares solution to
Ax = b.
To find the QR factorization for A, we begin by finding an othronormal basis for
the columns of A. To this extent, we apply the Gram-Schmidt procedure to the
columns of A by first letting
4
Math 317: Linear Algebra
Homework 9 Solutions
q1 = √
 
1
1
 
1
0
12 + 12 + 12 + 02
.
q2 is given by
√
√
√
√
(0, 2, 1, 1) − 3(1/ 3, 1/ 3, 1/ 3, 0)
a2 − (q1 · a2 ) q1
√
√
√
√
=
q2 =
ka2 − (q1 · a2 ) q1 k
k(0, 2, 1, 1) − 3(1/ 3, 1/ 3, 1/ 3, 0)k
√ 

−1/√ 3
 1/ 3 

=
 0 .
√
1/ 3
Finally we have that q3 is given by
a3 − (q1 · a3 ) q1 − (q2 · a3 ) q2
ka3 − (q1 · a3 ) q1 − (q2 · a3 ) q2 k
√
√
√
√
√
√
√
√
(−1, 1, −3, 1) − (− 3)(1/ 3, 1/ 3, 1/ 3, 0) + 3(−1/ 3, 1/ 3, 0, 1/ 3)
√
√
√
√
√
√
√
√
=
k(−1, 1, −3, 1) − (− 3)(1/ 3, 1/ 3, 1/ 3, 0) + 3(−1/ 3, 1/ 3, 0, 1/ 3)k
 √ 
1/√6
 1/ 6 
√ 
=
−2/ 6
0
√
√ 
 √
√ 
√ √
1/√3 −1/√ 3 1/√6
3
3
−

1/ 3 1/ 3
√3
√
1/
6



√ and R = 0
So, Q =  √
3 √3 .
1/ 3
0√
−2/ 6
0
0
6
0
1/ 3
0
6. (a) Explain what happens when the Gram-Schmidt process is applied to an orthonormal set of vectors.
Nothing! The resulting orthonormal set is the same as the original.
(b) Explain what happens when the Gram-Schmidt process is applied to a linearly
dependent set of vectors.
It breaks down at the first vector such that xk ∈ span {x1 , . . . , xk−1 } because
if
xk ∈ span {x1 , . . . , xk−1 } = span {q1 , . . . , qk−1 } ,
5
Math 317: Linear Algebra
Homework 9 Solutions
then we have that xk =
0
k0k
Pk−1
i=1
(qi · xk )qi and so qk =
Pk−1
xk − i=1
(qi ·xk )qi
Pk−1
kxk − i=1 (qi ·xk )qi k
=
which is not defined.
6
Download