Math 140 sections 6.4−7.
Sec 6.4, 6.5:
1. Diagonalize the following symmetric matrix:
3 −2 4
A = −2 6 2 .
4 2 3
Solution: We have
λ−3 2 −4
|λI − A| = 2 λ−6 −2 = (λ + 2)(λ − 7)2 .
−4 −2 λ − 3
Thus, the eigenvalues of A are,
λ1 = −2, λ2 = λ3 = 7.
Solve (A − λI)x = 0 separately λ1=−2, λ2 = 7 and λ3 = 7 :
for
−5 2 −4 a 0 2
(A + 2I)x = 2 −8 −2 b = 0 yields an eigenvector x1 = 1 for λ1 =
−4 −2 −5 c 0 −2
−2,
4 2 −4 a 0 1
(A − 7I)x = 2 1 −2 b = 0 yields two eigenvectors x2 = −2 and
−4 −2 4 c 0 0
1
x3 = 0for λ2 = λ3 = 7.
1
Note that x2 and x 3 are not orthogonal,
so we use G-S to make them orthogonal and
1 4
we get: x2 = −2 and x3 = 2.
0 5
It’s clear that x1 , x2 and x3 are orthogonal but not yet orthonormal. Divide these
eigenvectors by their length to get unit vectors,
√ √
2/3 1/ √5 4/√45
x1 = 1/3 , x2 = −2/ 5 , and x3 = 2/√45 .
−2/3 0 5/ 45
Then put these unit vectors to the columns of Q,
√ √
2/3 1/ √5 4/√45
Q = 1/3 −2/ 5 2/√45 ,
−2/3 0 5/ 45
and diagonalize matrix A by
−2 0 0
Λ = QT AQ = 0 7 0 .
0 0 7
1
Math 140 sections 6.4−7.2
2. Decide whether the following matrices are positive definite, positive semi-definite, or
neither.
2 −1 −1
(a) A = −1 2 −1
−1 −1 2
Solution: We have
λ−2 1 1
|λI − A| = 1 λ−2 1 = λ(λ − 3)2 .
1 1 λ−2
Thus, the eigenvalues of A are,
λ1 = 0, λ2 = λ3 = 3.
All eigenvalues of A are greater than or equal to 0, which means that matrix A is
positive semi-definite.
2 −1 −1
(b) B = −1
2 1
−1 1 2
Solution: We have
λ−2 1 1
|λI − B| = 1 λ−2 −1 = (λ − 4)(λ − 1)2 .
1 −1 λ − 2
Thus, the eigenvalues of A are,
λ1 = 4, λ2 = λ3 = 1.
All eigenvalues of B are more than 0, which means that matrix A is positive
definite.
2
0 1 2
(c) C = 1 0 1
2 1 0
0 1 2 x
Solution: Set D= 1 0
1 and no zero vector x = y . We have
2 1 0 z
0 1 2 0 1 2
T T
x Cx = x 1 0 1 1 0 1 x = (Dx)T Dx = (2x+y)2 +(y+2z)2 +(x+z)2 > 0
2 1 0 2 1 0
It means that matrix C is positive definite.
2
Math 140 sections 6.4−7.2
3. Suppose each “Gibonacci” number Gk+2 is the average of the two previous numbers
Gk+1 and Gk . Then Gk+2 = 21 (Gk+1 + Gk ):
(a) Starting with initial conditions G0 = 0 and G1 = 1, list the elements up to G6 of
the sequence.
Solution: We have
G2 = 1/2, G3 = 3/4, G4 = 5/8, G5 = 11/16, G6 = 21/32.
(b) Express the given sequence as uk+1 = Auk . Clearly indicate the matrix A, as well
as the vectors uk+1 , uk , and the vector of initial conditions u0 .
Solution: Set
Gk Gk+1
uk = , uk+1 = ,
Gk+1 Gk+2
so
G0
uk+1 = Auk , u0 = ,
G1
0 1
Where A = .
1/2 1/2
(c) Find a formula for uk+1 in terms of the initial conditions u0 . Hint: Diagonalize
A.
Solution: We have
λ −1
|λI − A| = = (λ + 1/2)(λ − 1).
−1/2 λ − 1/2
Thus, the eigenvalues of A are,
λ1 = −1/2, λ2 = 1.
−2 −1
Further more, the eigenvectors are x1 = and x2 = with corresponding
1 −1
eigenvalues. So put the eigenvectors to the columns of Q,
−2 −1
Q= ,
1 −1
and substitute A = QΛQ−1 into iteration equation,
k k −1 −2 −1 (−1/2)k 0 −1/3 1/3 0
uk+1 = Auk = A u0 = QΛ Q u0 = .
1 −1 0 1 −1/3 −2/3 1
3
Math 140 sections 6.4−7.2
Sec 7.1, 7.2:
1. Consider the matrix
1 4
A= .
2 8
(a) Compute AT A, and find its eigenvalues λ1 and λ2 , such that λ1 > λ2 . What are
the singular values? What is the matrix Σ, such that A = U ΣV T .
Solution: Set
T 1 2 1 4 5 20
A A= = ,
4 8 2 8 20 80
and we have the eigenvalues of AT A are,
λ1 = 85, λ2 = 0.
√
√
85 0
The singular values σ1 = 85 and σ2 = 0, and Σ = .
0 0
(b) Compute the unit eigenvectors v 1 and v 2 , which correspond to eigenvalues λ1 and
λ2 , respectively. Which matrix of the SVD do these column vectors correspond
to?
Solution: Solve (ATA − λI)v= 0 separately
for λ1 = 85 and λ2 = 0:
T −80 20 a 0 a
(A A − 85I)v1 = = yields an eigenvector v1 = =
20 −5 b 0 b
√
1/√17
for λ1 = 85,
4/ 17
√
T 5 20 a 0 a 4/ √17
(A A−0I)v2 = = yields an eigenvector v2 = =
20 80 b 0 b −1/ 17
for λ2 = 0,
It’s clear that v1 and v2 are linearly independent unit eigenvectors of AT A.
In addition,
AT A = (U ΣV T )T (U ΣV T ) = V ΣU T U ΣV T = V Σ2 V T
Thus, the column vectors about eigenvectors correspond to the matrix V of SVD.
4
Math 140 sections 6.4−7.2
2. Consider the matrix
1 1 0
A= .
0 1 1
(a) Compute AT A and find its eigenvalues.
Solution: Set
1 0 1 1 0
1 1 0
AT A = 1 1 = 1 2 1 ,
0 1 1
0 1 0 1 1
and we have
λ−1 −1 0
T
|λI − A A| = −1 λ − 2 −1 = λ(λ − 1)(λ − 3).
0 −1 λ − 1
Thus, the eigenvalues of AT A are,
λ1 = 0, λ2 = 1, λ3 = 3.
(b) Compute AAT and find its eigenvalues.
Solution: Set
1 0
T 1 1 0 2 1
AA = 1 1 =
,
0 1 1 1 2
0 1
and we have
λ−2 −1
|λI − AAT | = = (λ − 1)(λ − 3).
−1 λ − 2
Thus, the eigenvalues of AAT are,
λ1 = 1, λ2 = 3.
5
Math 140 sections 6.4−7.2
(c) Compute the eigenvectors of AT A.
Solution: Solve (AT A − λI)v = 0 separately
forλ1= 3, λ2 = 1and λ3 = 0 :
−2 1 0 a 0
T
λ1 = 3: (A A − 3I)v1 = 1 −1 1
b = 0 yields an eigenvector
0 1 −2 c 0
√
1 1/√6
v1 = 2 → 2/√6.
1 1/ 6
0 1 0 a 0
T
λ2 = 1: (A A − I)v2 = 1 1 1
b = 0 yields an eigenvector
0 1 0 c 0
√
1 1/ 2
v2 = 0 →
0√ .
−1 −1/ 2
1 1 0 a 0
T
λ3 = 0: (A A − 0I)v3 = 1 2 1 b = 0 yields an eigenvector
0 1 1 c 0
√
1 1/ √3
v3 = −1 → −1/√ 3.
1 1/ 3
It’s clear that v1 , v2 and v3 are linearly independent eigenvectors of AT A.
(d) Compute the eigenvectors of AAT .
Solution: The eigenvectors of AAT are the same as the left singular vectors u1
and u2 . √
1/ 6 √
√
1 1 1 1 0 2/ 6 = 1/√2
u1 = σ1 Av1 = √3 √
0 1 1 1/ 2
1/ 6
√
1/ 2 √
1 1 1 0 1/ √2
u2 = σ1 Av2 = 0√ =
0 1 1 −1/ 2
−1/ 2
It’s clear that u1 and u2 are linearly independent eigenvectors of AAT .
6
Math 140 sections 6.4−7.2
(e) Find orthonormal bases for the four fundamental subspaces of A.
Solution: Combine (c) and (d), the following results can be√ showed.
√
1/√2 1/ √2
For the column space, the orhomnormal bases are u1 = , u2 = .
1/ 2 −1/ 2
For the left nullspace, the only element in this spaceis 0.√ √
1/√6 1/ 2
For the row space, the orhomnormal bases are v1 = 2/√6 , v2 =
0√ .
1/ 6 −1/ 2
√
1/ √3
For the nullspace, the orhomnormal bases is v3 = −1/√ 3 .
1/ 3
(f) Write A = U ΣV T .
Solution: Combine (b), (c) and (d), and set the following matrices.
√ √ √
√ √ 1/√6 1/ 2 1/ √3 √
1/√2 1/ √2 3 0 0
U= , V = 2/√6 0√ −1/√ 3 and Σ =
1/ 2 −1/ 2 0 1 0
1/ 6 −1/ 2 1/ 3
√ √ √
√ √ √ 1/ 6 2/ 6 1/ √6
1/√2 1/ √2 3 0 0 √
Thus A = U ΣV T = 1/√2 0√ −1/√ 2 =
1/ 2 −1/ 2 0 1 0
1/ 3 −1/ 3 1/ 3
1 1 0
.
0 1 1