# 369 Midterm 3 Your Name: Instructions:

advertisement ```369 Midterm 3
Your Name:
Instructions: This test contains 5 questions. Each question is worth 20 points. Read each
question carefully before responding. Give justifications to all of your responses, unless
otherwise specified. No calculators are allowed. One standard sized page of notes with
writing on one side is allowed.
1
1. Find the QR-factorization of


2 1 0
A = 1 2 0 .
0 0 1
Solution. The factorization is
√
√
 √

 √
5 4/√5 0
2/√5 −1/√ 5 0
A = 1/ 5 2/ 5 0  0 3/ 5 0 .
0
0
1
0
0
1
2
2. Let


2/3
0√ 4
A =  1/2 1/√2 5 .
−1/2 1/ 2 6
and let A = QR be the QR-factorization of A. What is the (2, 3)-entry of R?
Note: you do NOT have to compute the whole QR-factorization.
Solution. The (2, 3) entry of R is u2 &middot; v3 , where u1 , u2 , u3 are the columns of Q in the QRfactorization. Note that u2 is equal to the second column of A, since it is a unit vector orthogonal
to the first column. Thus,
  

0√
4
√
(2, 3) entry of R = 1/√2 &middot; 5 = 11/ 2.
6
1/ 2
3
3. Use Gram-Schmidt to find a vector orthogonal to span{v1 , v2 }, where
 
 
1
0
v1 = 1 , v2 = 2 .
0
1
 
0
Solution. Using Gram-Schmidt on v1 , v2 and v3 = 0 (which is not in span{v1 , v2 }), we find
1
 
1
w1 = 1 ,
0
 
−1
w2 =  1  ,
1
and w3 is orthogonal to span{v1 , v2 }.
4


1/3
w3 = −1/3 ,
2/3
4. Find x ∈ R2 that minimizes |Ax − b|, where


1 0
A = 1 2  ,
0 1
 
1
b = 2 .
1
Solution. The solution x satisfies Rx = Qt b where
√ 
 √
1/√2 −1/√ 3
Q = 1/ 2 1/√3 
0
1/ 3
is obtained by normalizing w1 , w2 from Problem 3, and
√ √ 2 √2
t
.
R=QA=
0
3
From this we get x =
5/6
.
2/3
5
5. Let u, v ∈ Rn be orthogonal unit vectors, and let w ∈ Rn be another vector. Prove that
w − proju w − projv w is orthogonal to span{u, v} (or equal to 0).
Solution. Since u, v are unit vectors, w − proju w − projv w = w − (w &middot; u)u − (w &middot; v)v. Since
(w − (w &middot; u)u − (w &middot; v)v) &middot; u = w &middot; u − (w &middot; u)(u &middot; u) − (w &middot; v)(v &middot; u) = w &middot; u − w &middot; u = 0
(w − (w &middot; u)v − (w &middot; v)v) &middot; v = w &middot; v − (w &middot; u)(u &middot; v) − (w &middot; v)(v &middot; v) = w &middot; v − w &middot; v = 0,
w − proju w − projv w is (zero or) orthogonal to both u and v, hence orthogonal to span{u, v}.
6
```