202301EngMath2Mid1sol_4
202301EngMath2Mid1sol_4
2023/04/13, 19:00–21:30
a) (10) Show that for any v ∈ V, there exist unique vectors w ∈ W and z ∈ W⊥
such that v = w + z. Furthermore, explain that w is the best approximation of
v on W.
(sol)
(existence) Since W is a finite dimension, let {v1 , v2 , ..., vk } be an orthonormal
Pk
basis for W. Let w = i=1 ⟨v, vi ⟩ vi , then w ∈ W.
For any jD(1 ≤ j ≤ k), E DP E
Pk k
⟨z, vj ⟩ = (v − i=1 ⟨v, vi ⟩ vi ), vi = ⟨v, vj ⟩ − i=1 ⟨v, vi ⟩ vi , vj
Pk
= ⟨v, vj ⟩ − i=1 ⟨v, vi ⟩ ⟨vi , vj ⟩ = ⟨v, vj ⟩ − ⟨v, vj ⟩ = 0
Therefore, z ∈ W⊥ (4 point)
(uniqueness) Suppose v = w + z = w′ + z ′ , where w, w′ ∈ W and z, z ′ ∈ W⊥ .
Then w − w′ = z ′ − z ∈ (W ∩ W⊥ ) = {0}.
Therefore, w = w′ , z = z ′ .(3 point)
(best approximation) For any x ∈ W,
||v − x||2 = ||w + z − x||2 = ||(w − x) + z||2 = ||w − x||2 + ||z||2 ≥ ||z||2 = ||v − w||2
This inequility is an equality, when ||w − x||2 + ||z||2 = ||z||2 .
It follows that ||w − x||2 = 0, and hence w = x.(3 point)
⊥
b) (5) Show that W⊥ = W. (Caution: It’s not guaranteed that V is finite-
dimensional.)
(sol)
If w ∈ W, then w is orthogonal to all elements of W⊥ . Therefore, w ∈ (W⊥ )⊥ .
∴ W ⊂ (W⊥ )⊥ (3 point)
/ W, there exist z ∈ W⊥ , which is ⟨w, z⟩ =
If w ∈ / (W⊥ )⊥ .
̸ 0. Therefore w ∈
∴ (W⊥ )⊥ ⊂ W(2 point)
1
3. Consider z = (1 2 2)t ∈ R3 .
3
a) (5) Find the Householder matrix Hz , the matrix representing the symmetry send-
ing z to −z, and fixing all the vectors orthogonal to z.
(sol)
7 −4 −4
9 9 9
Hz x = x − 2 ⟨x, z⟩ z = −4 1 −8 x(5 point)
9 9 9
−4 −8 1
9 9 9
b) (5) Define T(v) = v × z. Find the matrix representation of T with respect to the
standard ordred basis S.
(sol)
2 −2
î ĵ k̂ 0 3 3
Tz (v) = v1 −2 1 v(5
v2 v3 =
3 0 3
point)
1 2 2 2 −1
3 3 3 3 3 0
π
c) (10) Let T be the rotation about the axis z of the angle (counterclockwise).
2
Find the matrix representation of T with respect to S.
(sol)
Supposeorthnormal basis β= {x, y, z}.
cos π2 − sin π2 0 0 −1 0
π
[T]β =
sin 2 cos π2 0 = 1 0 0(3 point)
0 0 1 0 0 1
0 −1 0 xt
β t t t
[T]S = [I]Sβ [T]β [I]S = x y z t
1 0 0 y = −xy +yx +zz (3 point)
0 0 1 zt
Since (−xy + yx )z = 0,(−xy + yx )x= y, (−xyt + yxt )y = −x,
t t t t
−2 2
0 3 3
−xyt + yxt = −[Tz ]S = 3
2
0 −1
3
−2 1
0
3 3
1 1 2 2
3 9 9 9
zzt = 2 1
3 3
2
3
2
3
=
9
2 4
9
4
9
2 2 4 4
3 9 9 9
−2 2 1 2 2 1 −4 8
0 3 3
9 9 9 9 9 9
[T]S = 2 −1 + 2 4 4 = 8 4 1 (4 point)
3 0 3 9 9 9 9 9 9
−2 1 2 4 4 −4 7 4
3 3 0 9 9 9 9 9 9
2 −1 −3
4. 3 3 −2. That is, find
a) (10) Give the QR-decomposition of the matrix A =
6 0 2
an orthogonal matrix Q (with determinant 1) and an upper-triangular matrix R
satisfying A = QR. You don’t have to show its uniqueness.
(sol)
2 −1 −3
a1 = 3 , a2 = 3 , a3 = −2
6 0 2
Use Gram Schmidt
Orthogonalization
Process,
2 2
1
1
u1 = a1 = 7 3 , e1 = 7 3
6 6
−3 −3
⟨u1 ,a2 ⟩ 3
1
u2 = a2 − ||u1 ||2 u1 = 7 6 , e2 = 7 6
−2 −2
−6 −6
⟨u1 ,a3 ⟩ ⟨u2 ,a3 ⟩
4
1
u3 = a3 − ||u1 ||2 u1 − ||u2 ||2 u2 = 7 −2 , e3 = 7 −2
3 3
2 −3 −6
Q = e1 |e2 |e3 = 71 3 6 −2 (5 point),
6 −2 3
a1 · e1 a2 · e1 a3 · e1 7 1 0
R= 0 a2 · e2 a3 · e2 = 0 3 −1(5 point)
0 0 a3 · e3 0 0 4
b) (10) Explain that Q in a) represents a rotation, and determine the axis, and angle
of rotation.
(sol)
Since QQT = QT Q = I, Q is orthogonal and det(Q) = 1 , Q is rotation matrix.
(4 point)
det(Q − λI) = (−343λ2 + 196λ − 343)(λ − 1) = 0
eigenvalue
λ=1
3 6 3 6
−5 −3 −6 −5 −3 −6 1 5 5 1 5 5
−14 −28
Q−I = 3 −1 −2 → 3 −1 −2 → 3 −1 −2 → 0
5 5
6 −2 −4 0 0 0 0 0 0 0 0 0
1 35 65 1 0 0
→ 0 1 2
→ 0 1 2
0 0 0 0 0 0
0
1
eigenvector v1 = 5 2
√
−1
Since Qv1 = v1 , axis of rotation is v1 .(3 point)
1
v2 = 0
is perpendicular to v1 .
0
2
7 2
3
7 , cos θ = Qv2 · v2 =
Qv2 = 7
6
7
Therefore, rotation angle θ = arccos 27 . (3 point)
2 −1 1
5. a) (10) Give the spectral decomposition of the matrix A =
−1 2 .
1
1 1 2
(sol)
2−λ −1 1
det(A − λI) = −1 2−λ 1 = −λ(λ − 3)2
1 1 2−λ
λ1 = 0
−1 −1
2 −1 1 1 2
1
2 1 2
1
2 1 −1
2
1
2
3 3
A−λ1 I = −1 2 1 → −1 2 1 → −1 2 1 → 0 2
2
1 1 2 1 1 2 0 3 3 0 3 3
1 −12
1
2 1 0 1
→ 0 1 1 → 0 1 1
0 0 0 0 0 0
1
1
v1 = 3 1
√
(2 point)
−1
λ2 = 3
−1 −1 1 1 1 −1
A − λ2 I = −1 −1 1 → 0 0 0
1 1 −1 0 0 0
1 1
1
1
v2 = 2 −1(2 point), v3 = 6 1(2 point)
√ √
0 2
A = λ1 v1 · v1t + λ2 v2 · v2t + λ2 v3· v3t
1 1 −1 1 −1 0 1 1 2
= λ1 13
1 1 −1 + λ2 1 −1 1 0 + λ2 1 1 1 2(4 point)
2 6
−1 −1 1 0 0 0 2 2 4
1 0 1
b) (10) Find the Moore-Penrose pseudoinverse of B = 1 −1 0.
0 1 1
(sol)
2 −1 1
BT B = −1 2 1 = A . As obtained in a) eigenvalue λ1 = 0 , λ2 = 3 ,
1 1 2
1 1 1
v1 = √1
1 , v2 = √1 −1, v3 = √1 1
3
2 6
−1 0 −2
1 1 1
1 1
1 1
1
u 2 = √λ B · v 2 = √6
2 , u3 = λ2 B · v3 = 2 0, u1 = 3 −1
√ √ √
2
−1 1 −1
√1 √1 √1 0 0 0
−13 2
6 2
P √
U = √3 √6
0 (2 point) ,
= 0
3 0 (2 point),
−1 −1 1
√
√ √ √ 0 0 3
3 6 2
√1 √1 √1
13 −1
2 6
V = √1 (2 point)
√3 √
2 6
−1 √2
√
3
0
6
√1 √1 √1 √1 −1 −1 1 1
0 0 0 √ √ 0
P† 13 2 6 13 3 3 3 3
B† = V U† = √
3
−1
√
2
√1
6
0 √1
3
0 √6
√2
6
−1
√
6
=
0
−1
3
1
3
−1 2 √1 √1 √1 1 1
√
3
0 √
6
0 0 3 2
0 2 3 0 3
(4 point)
c) (10) Consider the inconsistent linear system Bx = (2 2 2)t . Find the least
square error solution x0 of the minimal norm. That is, find x0 minimizing
||Bx − (2 2 2)t ||2 , and explain your solution has the minimal norm.
(sol)
4
2 3
z= 2, x0 = B † z = 0 (5 point)
4
2 3
Since Bx0 = BB † z, x0 is the orthogonal projectionofz on R(T)(5 point)
2
Therefore, Bx0 is the vector in R(T) nearest z = 2
2
Therefore,
2
u∇ udv = (u∇u) · ds − |∇u|2 dv.
D ∂D D
(point 5)
π 2π 2
6 6 cos2 θ cos ϕ 2
(∇ · F)dv = ( sin θ + )R sin θdRdϕdθ
D 0 0 0 R R sin θ
π
6
2π 2
= (6R sin2 θ + R cos θ cos2 ϕ)dRdϕdθ
0 0 0
π
6
2π
= (12 sin2 θ + 2 cos θ cos2 ϕ)dϕdθ
0 0
π
6
= (24π sin2 θ + 2π cos θ cos2 ϕ)dθ
0
√
= 2π 2 − 3 3π + π
(sol2)
∂D = ∂Dtop + ∂Dside
π
6
2π π
6
2π
F·ds = 2
(3 sin θR̂+cos ϕθ̂)·(R sin θdϕdθR̂) = 2
12 sin2 θdϕdθ
∂Dtop 0 0 0 0
π
6 √
= 24π sin2 θdθ = 2π 2 − 3 3π
0
2π 2 2π 2
1
F·ds = (3 sin θR̂+cos2 ϕθ̂)·(R sin θdRdϕθ̂) = R cos2 ϕdRdϕ
∂Dside 0 0 0 0 2
2π
= cos2 ϕdϕ = π
0
√
F · ds = F · ds + F · ds = 2π 2 − 3 3π + π
∂D ∂Dtop ∂Dside