Linear Algebra: Orthogonal Vectors & QR Factorization
Linear Algebra: Orthogonal Vectors & QR Factorization
UNIT - II
LINEAR ALGEBRA - II
Introduction
This section deals with the study of orthogonal and orthonormal vectors which forms the
basis for the construction of an orthogonal basis for a vector space. The Gram-Schmidt
process is applied to construct an orthogonal basis for the column space of a given matrix
and further to decompose a given matrix to the form A = QR, where Q has orthonormal
column vectors and R is an upper triangular invertible matrix with positive entries along
the diagonal. This section also deals with finding the Eigenvalues and Eigenvectors of a
square matrix, which is applied to diagonalize a square matrix A as D = P −1 AP . Further
the singular value decomposition is studied wherein, a given matrix is resolved as a product
of an orthogonal matrix (U), a diagonal matrix(Σ ) and an orthogonal matrix V T .
Example. Show that {( √311 , √111 , √111 ), (− √16 , √26 , √16 ), (− √166 , − √466 , √766 )} is an orthonormal
basis for R3 , where
3 2 1
v1 · v2 = − √ + √ + √ = 0
66 66 66
3 4 7
v1 · v3 = − √ −√ +√ =0
726 726 726
1 8 7
v2 · v3 = √ −√ +√ =0
396 396 396
Thus {v1 , v2 , v3 } is an orthogonal set.
9 1 1
v1 · v1 = + + =1
11 11 11
2 4 1
v2 · v2 =
+ + =1
6 6 6
1 16 49
v3 · v3 = + + =1
66 66 66
which shows that v1 , v2 , v3 are unit vectors. Thus {v1 , v2 , v3 } is an orthonormal set. Since
the set is linearly independent and consists of three vectors form a basis for R3 .
Definition. A square matrix P with real entries and satisfying the condition P −1 = P T is
called an orthogonal matrix. That is P P T = I.
cos θ − sin θ −1 cos θ sin θ T cos θ sin θ
Example. Let P = . Then P = and P = .
sin θ cos θ − sin θ cos θ − sin θ cos θ
Clearly P −1 = P T . Therefore P is an orthogonal matrix.
1 2 2
3
− 3 3
Example. The matrix A = 23 − 13 − 23 is an orthogonal matrix, since
2 2 1
3 3 3
1 2 2
1 2 2
3 3 3 3
− 3 3
1 0 0
AT A = − 23 − 13 23 32 − 13 − 23 = 0 1 0. The row vector of A, namely ( 31 , − 23 , 32 ),
2
3
− 23 13 2
3
2
3
1
3
0 0 1
2 1 2 2 2 1
( 3 , − 3 , − 3 ) and ( 3 , 3 , 3 ) are orthonormal. So are the column vectors of A.
Note:
Let P be an n × n matrix with real entries. Then P is orthogonal if and only if the row
(column) vectors of A form an orthonormal basis for Rn .
Orthogonal Projections
Given a non-zero vector ~u in Rn , consider the problem of decomposing a vector ~y in Rn into
the sum of two vectors, one a multiple of ~u and the other orthogonal to ~u. We wish to write
~y = ŷ + ~z (1)
where ŷ = α~u, for some scalar α and ~z is some vector orthogonal to ~u.
Given any scalar α, let ~z = ~y − α~u, so that 1 is satisfied. Then ~y − ŷ is orthogonal to ~u iff
= ~y · ~u − α(~u · ~u)
That is, 1 is satisfied with ~z orthogonal to ~u iff
~y · ~u ~y · ~u
α= and ŷ = ~u
~u · ~u ~u · ~u
The vector ŷ is called the orthogonal projection of ~y onto ~u, and the vector ~z is called the
component of ~y orthogonal to ~u.
Example. Let ~y = (7, 6) and ~u = (4, 2). The orthogonal projection of ~y onto ~u is given by,
~y · ~u 40
ŷ = ~u = ~u = 2~u = 2(4, 2) = (8, 4)
~u · ~u 20
Note:
1. The orthogonal projection of ~y onto a subspace W spanned by orthogonal vectors
~y · u~1 ~y · u~2
{u1 , u2 } is given by ŷ = u~1 + u~2 .
u~1 · u~1 u~2 · u~2
2. The distance from a point ~y in Rn to a subspace W is defined as the distance from ~y
to the nearest point in W .
(−1, −5, 10) · (5, −2, 1) (−1, −5, 10) · (1, 2, −1)
ŷ = (5, −2, 1) + (1, 2, −1)
(5, −2, 1) · (5, −2, 1) (1, 2, −1) · (1, 2, −1)
= (−1, −8, 4)
~y − ŷ = (−1, −5, 10) − (−1, −8, 4) = (0, 3, 6)
√ √ √
The distance from ~y to W is 0 + 32 + 62 = 45 = 3 5.
Exercise:
1. Determine which set of vectors are orthogonal.
2. Show that {(2, −3), (6, 4)} forms an orthogonal basis for R2 .
3. Show that {(1, 0, 1), (−1, 4, 1), (2, 1, −2)} forms an orthogonal basis for R3 .
3
√ − √1 − √1
11 6 66
4. Show that the matrix U = √111 √26 − √466 is an orthogonal matrix.
√1 √1 − √766
11 6
6. Let u1 = (2, 5, −1), u2 = (−2, 1, 1) and y = (1, 2, 3). Find the orthogonal projection of
y onto Span{u1 , u2 }.
Gram-Schmidt Orthogonalization
The Gram-Schmidt process is a simple algorithm for producing an orthogonal or orthonormal
basis for any non-zero subspace of Rn . The construction converts a skewed set of axes into
a perpendicular set.
Gram-Schmidt process
Given a basis {x1 , x2 , . . . , xp } for a subspace W of Rn . Define,
v1 = x1
x2 · v1
v2 = x2 − v1
v1 · v1
x3 · v1 x3 · v2
v3 = x3 − v1 − v2
v1 · v1 v2 · v2
..
.
xp · v 1 xp · v2 xp · vp−1
vp = vp − v1 − v2 − · · · − vp−1
v1 · v1 v2 · v2 vp−1 · vp−1
Example. Let W = Span{v1 , v2 , v3 }, where v1 = (0, 1, 2), v2 = (1, 1, 2), v3 = (1, 0, 1). Con-
struct an orthogonal basis {u1 , u2 , u3 } for W .
Solution: Let u1 = v1 .
v2 · u1 (1, 1, 2) · (0, 1, 2)
u2 = v2 − u1 = (1, 1, 2) − (0, 1, 2) = (1, 0, 0)
u1 · u1 (0, 1, 2) · (0, 1, 2)
v3 · u1 v3 · u2
u3 = v3 − u1 − u2
u1 · u1 u2 , u2
(1, 0, 1) · (0, 1, 2) (1, 0, 1) · (1, 0, 0)
= (1, 0, 1) − (0, 1, 2) − (1, 0, 0)
(0, 1, 2) · (0, 1, 2) (1, 0, 0) · (1, 0, 0)
2 2 1
= (1, 0, 1) − (0, 1, 2) − (1, 0, 0) = 0, − , .
5 5 5
QR Factorization
If A is an m × n matrix with linearly independent columns, then A can be factored as
A = QR, where Q is an m × n matrix whose columns form an orthonormal basis for Col(A)
and R is an n × n upper triangular invertible matrix with positive entries on its diagonal.
1 0 0
1 1 0
Example. Find a QR factorization of A =
1
1 1
1 1 1
x2 · v1 (0, 1, 1, 1) · (1, 1, 1, 1)
v2 = x2 − v1 = (0, 1, 1, 1) − (1, 1, 1, 1)
v1 · v1 (1, 1, 1, 1) · (1, 1, 1, 1)
3 3 1 1 1
= (0, 1, 1, 1) − (1, 1, 1, 1) = − , , ,
4 4 4 4 4
x3 · v1 x3 · v2
v3 = x3 − v1 − v2
v1 · v1 v2 · v2
3 1 1 1
(0, 0, 1, 1) · − , , ,
(0, 0, 1, 1) · (1, 1, 1, 1) 4 4 4 4 3 1 1 1
= (0, 0, 1, 1) − (1, 1, 1, 1) − − , , ,
(1, 1, 1, 1) · (1, 1, 1, 1) 3 1 1 1 3 1 1 1 4 4 4 4
− , , , · − , , ,
4 4 4 4 4 4 4 4
2 2 3 1 1 1 2 1 2
= (0, 0, 1, 1) − (1, 1, 1, 1) − − , , , = 0, − , ,
4 3 4 4 4 4 3 3 3
3 1 1 1 2 1 2
Therefore
n (1, 1, 1, 1), − , ,
4 4 4 4
, , 0, − ,
3 3 3
, forms
o an orthogonal basis for Col(A) and
1 1 1 1 3 1 1 1 2 1 1
( 2 , 2 , 2 , 2 ), (− √12 , √12 , √12 , √12 ), (0, − √6 , √6 , √6 ) forms an orthonormal basis for Col(A).
Therefore
√
1/2 −3/√ 12 0√
1/2 1/ 12 −2/ 6
Q= √ √
1/2 1/ 12 1/
√ √6
1/2 1/ 12 1/ 6
We have A = QR =⇒ QT A = QT QR =⇒ Q T
A = IR
T
=⇒ Q A = R i.e., R = Q A.
T
1 0 0
1/2√ 1/2
√ 1/2
√ 1/2
√ 1 1 0 2 3/2 √ 1
√
∴ R = −3/ 12 1/ √ 12 1/ √12 1/ √12 1 1 1 = 0 3/ 12 2/ √12 .
0 −2/ 6 1/ 6 1/ 6 0 0 2/ 6
1 1 1
1 2 5
−1 1 −4
−1 4 −3.
Example. Find a QR factorization of A =
1 −4 7
1 2 1
Solution: Let {x1 , x2 , x3 } be the columns of the matrix A. Let v1 = x1 = (1, −1, −1, 1, 1)
3 −7 8
Solution: Let {x1 , x2 , x3 } be the columns of A, where x1 = (3, 1, −1, 3), x2 = (−5, 1, 5, −7), x3 =
(1, 1, −2, 8).
1 −4 −3
Solution: Let {x1 , x2 , x3 } be the columns of A, where x1 = (−1, 3, 1, 1), x2 = (6, −8, −2, −4), x3 =
(6, 3, 6, −3). Let v1 = (−1, 3, 1, 1).
x2 · v 1 (6, −8, −2, −4) · (−1, 3, 1, 1)
v2 = x2 − v1 = (6, −8, −2, −4) − (−1, 3, 1, 1)
v1 · v1 (−1, 3, 1, 1) · (−1, 3, 1, 1)
−36
= (6, −8, −2, −4) − (−1, 3, 1, 1) = (3, 1, 1, −1)
12
x3 · v1 x3 · v2 (6, 3, 6, −3) · (−1, 3, 1, 1)
v3 = v1 − v2 = (6, 3, 6, −3) − (−1, 3, 1, 1)
v1 · v1 v2 · v2 (−1, 3, 1, 1) · (−1, 3, 1, 1)
(6, 3, 6, −3) · (3, 1, 1, −1)
− (3, 1, 1, −1)
(3, 1, 1, −1) · (3, 1, 1, −1)
6 30
= (6, 3, 6, −3) − (−1, 3, 1, 1) − (3, 1, 1, −1) = (−1, −1, 3, −1)
12 12
Therefore {(−1, 3, 1, 1), (3, 1, 1, −1), (−1, −1, 3, −1)} is an orthogonal basis for the column
space of the given matrix.
Exercise
1. Let W = Span{v1 , v2 }, where v1 = (1, 1) and v2 = (2, −1). Construct an orthogonal
basis {u1 , u2 } for W .
2. Find the orthonormal basis for the subspace spanned by the vectors u1 = (1, −4, 0, 1),
u2 = (7, −7, −4, 1).
1 3 5
−1 −3 1
3. Find the QR factorization of the matrix A = 0 2 3
1 5 2
1 5 8
Answer
3 3
1. v1 = (1, 1), v2 = ( , − )
2 2
2. v1 = (1, −4, 0, 1), v2 = (5, 1, −4, −1)
Y = AX (2)
carries the column vector X into the column vector Y by means of the square matrix A.
In practice it is often required to find such vectors which transform into themselves or to a
scalar multiple of themselves. Let X be such a vector which transforms into λX by means
of the transformation 2. Then, λX = AX or AX − λIX = 0 or
[A − λI]X = 0 (3)
which will have a non-trivial solution only if the coefficient matrix is singular. i.e, |A − λI| =
0. This is called the characteristic equation of the transformation and is same as the char-
acteristic equation of the matrix A. It has n roots and corresponding to each root, the
x1
x2
equation (3)( or equation (4)) will have a non-zero solution, x = .. , which is known as
.
xn
the Eigenvector or latent vector.
Observation 1: Corresponding to n distinct Eigenvalues, we get n independent Eigenvec-
tors. But when two or more Eigenvalues are equal, it may or may not be possible to get
1/2 1/2
Example. Find the Eigenvalues and Eigenvectors of the matrix A = .
1/2 1/2
1 1
−λ
Solution: |A − λI| = 0 =⇒ 2
1=⇒ λ2 − λ = 0 =⇒ λ = 0, λ = 1.
1
2
− λ 2
2
−1/2 1/2 x1 0
For λ = 1, (A − λI)X = 0 =⇒ = =⇒ −x1 + x2 = 0 =⇒ x2 = x1
1/2
−1/2 x 2 0
1
Letting x1 = 1 =⇒ x2 = 1 ∴ X =
1
1/2 1/2 x1 0
For λ = 0, (A − λI)X = 0 =⇒ = =⇒ x1 + x2 = 0 =⇒ x2 = −x1
1/2 1/2 x 2 0
1
Letting x1 = 1 =⇒ x2 = −1 ∴ X = .
−1
0 −1
Example. Find the Eigenvalues and Eigenvectors of the matrix A =
1 0
−λ −1
Solution: |A − λI| = 0 =⇒ =⇒ λ2 + 1 = 0 =⇒ λ = +i, λ = −i.
1
−λ
−i −1 x1 0
For λ = i, (A − λI)X = 0 =⇒ = =⇒ −ix1 − x2 = 0 =⇒ x2 = −ix1
1 −i x2 0
1
Letting x1 = 1 =⇒ x2 = −i ∴ X =
−i
i −1 x1 0
For λ = −i, (A − λI)X = 0 =⇒ = =⇒ ix1 − x2 = 0 =⇒ x2 = ix1
1
i x 2 0
1
Letting x1 = 1 =⇒ x2 = i ∴ X =
i
3 4 2
Example. Find the Eigenvalues and Eigenvectors of the matrix A = 3 5 4.
0 1 2
3−λ 4 2
Solution: |A − λI| = 0 =⇒ 3 5−λ 4 = 0 =⇒ λ3 − 10λ2 + 15λ = 0
0 1 2−λ
√ √
=⇒ λ = 5 + 10, 5 − 10, 0 √
√ −2 − 10 4
√ 2 x1 0
For λ = 5 + 10, |A − λI| = 0 =⇒ 3 − 10 4√ x2 = 0
0 1 −3 − 10 x3 0
x1 −x2 x3 x1 x2 x
=⇒ √ = √ = =⇒ √ = √ = 3
3 10 +√6 −9 − 3 10 3 2 + 10 3 + 10 1
2 + √10
∴ X = 3 + 10
1
√
√ −2 + 10 √4 2 x1 0
For λ = 5 − 10, |A − λI| = 0 =⇒ 3 10 4√ x2 = 0
0 1 −3 + 10 x3 0
x1 −x2 x3 x1 x2 x3
=⇒ √ = √ = =⇒ √ = √ =
−3 10√+ 6 −9 + 3 10 3 2 − 10 3 − 10 1
2 − √10
∴ x = 3 − 10
1
3 4 2 x1 0
with λ = 0, |A − λI| = 0 =⇒ 3 5 4
x2 = 0
0 1 2 x3 0
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = =
6 6 3 2 −2 1
2
∴ X = −2
1
1 3 3
Example. Find the Eigenvalues and Eigenvectors of the matrix A = −3 −5 −3.
3 3 1
1−λ 3 3
Solution: |A − λI| = 0 =⇒ −3 −5 − λ −3 = 0 =⇒ λ3 + 3λ2 − 4 = 0
3 3 1−λ
=⇒ λ = 1, −2, −2
0 3 3 x1 0
For λ = 1, |A − λI| = 0 =⇒ −3 −6 −3 x2 = 0
3 3 0 x3 0
1
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = = ∴ X = −1
9 9 9 1 −1 1
1
3 3 3 x1 0
For λ = −2, |A − λI| = 0 =⇒ −3 −3 −3
x2 = 0
3 3 3 x3 0
3x1 + 3x2 + 3x3 = 0 =⇒ x1 = −x2 − x3
−k1 − k2
Letting x2 = k1 , x3 = k2 =⇒ x1 = −k1 − k2 ∴ X = k1
k2
−1 −1
0 , 1 are the linearly independent Eigenvectors corresponding to λ = −2.
1 0
Diagonalization of a Matrix
Suppose the n × n matrix A has n linearly independent Eigenvectors. Let P be the matrix
with its columns as n linearly independent vectors of A. Then P −1 AP is a diagonal matrix
D. The diagonal
entries of D
the Eigenvalues of A.
λ1
λ2
P −1 AP =
..
.
λn
Note:
1. Any matrix with distinct Eigenvalues can be diagonalized.
3. Not all matrices posses n linearly independent Eigenvectors, so not all matrices are
diagonalizable.
6. The Eigenvalues of Ak are λk1 , λk2 . . . , λkn and each Eigenvector of A is still an Eigenvector
of Ak . [Dk = DD . . . D(k times) = (P −1 AP )(P −1 AP ) . . . (P −1 AP ) = P −1 Ak P ].
7 2
Example. Diagonalize the matrix A = .
2 4
7−λ 2
Solution: |A−λI| = 0 =⇒ = 0 =⇒ λ2 −11λ+24 = 0 =⇒ (λ−3)(λ−8) =
2 4−λ
0 =⇒ λ = 3, 8.
4 2 x1 0
For λ = 3, (A − 3I)X = 0 =⇒ = =⇒ 2x1 + x2 = 0. Letting x1 = 1 =⇒
2 1 x2 0
1
x2 = −2. Hence X1 =
−2
−1 2 x1 0
For λ = 8, (A − 8I)X = 0 =⇒ = =⇒ −x1 + 2x2 = 0. Letting
2 −4 x2 0
2
x2 = 1 =⇒ x1 = 2. Hence X2 =
1
1 2 3 0 −1 1/5 −2/5
=⇒ P = ,D= ,P =
−2 1 0 8 2/5 1/5
1 0
Example. Diagonalize the matrix A = .
0 −3
1−λ 0
Solution: |A − λI| = 0 =⇒ = 0 =⇒ (λ − 1)(λ + 3) = 0 =⇒ λ = −3, 1.
0 −3 −λ
4 0 x1 0
For λ = −3, (A + 3I)X = 0 =⇒ = =⇒ 4x1 = 0 =⇒ x1 = 0. Let x2 = 1.
0 0 x2 0
0
Hence X1 =
1
0 0 x1 0
For λ = 1, (A − I)X = 0 =⇒ = =⇒ 4x2 = 0 =⇒ x2 = 0. Let x1 = 1.
0 −4 x2 0
1
Hence X2 =
0
0 1 −3 0 −1 0 1
=⇒ P = ,D= ,P = .
1 0 0 1 1 0
6 −2 −1
Example. Diagonalize the matrix A = −2 6 −1.
−1 −1 5
6 − λ −2 −1
Solution: |A − λI| = 0 =⇒ −2 6 − λ −1 = 0 =⇒ λ3 − 17λ2 + 90λ − 144 = 0
−1 −1 5 − λ
=⇒ λ = 3, 6, 8
3 −2 −1 x1 0
For λ = 3, (A − λI)X = 0 =⇒ −2 3 −1 x2 = 0
−1 −1 2 x3 0
1
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = = ∴ X = 1
5 −5 5 1 1 1
1
0 −2 −1 x1 0
For λ = 6, (A − λI)X =⇒ −2 0 −1
x2 = 0
−1 −1 −1 x3 0
−1
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = = ∴ X = −1
−1 1 2 −1 −1 2
2
−2 −2 −1 x1 0
For λ = 8, (A − λI)X =⇒ −2 −2 −1 x2 = 0
−1 −1 −3 x3 0
1
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = = ∴ X = −1
5 5 0 1 −1 2
0
1 −1 1 3 0 0 1/3 1/3 1/3
Hence P = 1 −1 −1, D = 0 6 0, P −1 = −1/6 −1/6 1/3.
1 2 0 0 0 8 1/2 −1/2 0
3 −2 4
Example. Diagonalize the matrix A = −2 6 2.
4 2 3
3 − λ −2 4
Solution: |A − λI| = 0 =⇒ −2 6 − λ 2 = 0 =⇒ λ3 − 12λ2 − 21λ + 98 = 0
4 2 3−λ
=⇒ λ = −2, 7, 7
5 −2 4 x1 0
For λ = −2, (A − λI)X =⇒ −2 8 2 x2 = 0
4 2 5 x3 0
2
x1 −x2 x3 x1 x2 x3
=⇒ = = =⇒ = = ∴ X1 = 1
36 −18 −36 2 1 −2
−2
−4 −2 4 x1 0
For λ = 7, (A − λI)X = 0 =⇒ −2 −1 2 x2 = 0
4 2 −4 x3 0
As the second and third row are dependent on the first row, we get only one equation in three
unknowns. i.e., −4x1 −2x2 +4x3 = 0. Letting x1 and x3 as arbitrary implies x2 = −2x1 +2x3 .
With x1 = 1, x3 = 2 we get x2 = 2. With x1 = 2, x3 = 1 we get x2 = −2.
1 2
∴ X2 = 2 and X3 = −2.
2 1
Exercise:
Diagonalize the matrices
−2 −36 0 7 −4 4 3 1 1 5
3. 4.
1. −36 −23 0 2. −4 5 0 1 3 5 1
0 0 3 4 0 9
Note:
The diagonal(but rectangular) matrix Σ has Eigenvalues from AT A. These positive en-
tries(also called sigma) will be σ1 , σ2 , . . . , σr , such that σ1 ≥ σ2 ≥ · · · ≥ σr > 0. They are
the singular values of A. When A multiplies a column vj of V , it produces σj times a column
of U (A = U ΣV T =⇒ AV = U Σ).
−1
Example. Decompose A = 2 as U ΣV T , where U and V are orthogonal matrices.
2
−1 1 −2 −2
Solution: AAT = 2 −1 2 2 = −2 4 4 , |AAT − λI| = 0,
2 −2 4 4
1 − λ −2 −2
=⇒ −2 4 − λ 4 = 0 =⇒ λ3 − 9λ2 = 0 =⇒ λ1 = 0, λ2 = 0, λ3 = 9
−2 4 4−λ
−8 −2 −2 x1 0
T
For λ = 9, [AA − λI]X = 0 =⇒ −2 −5 4
x2 = 0 =⇒ −8x1 − 2x2 − 2x3 = 0,
−2 4 −5 x3 0
−1
−18x2 + 18x3 = 0 =⇒ x1 = −(1/2)x3 , x2 = x3 =⇒ X1 = 2
2
1 −2 −2 x1 0
T
For λ = 0, [AA − λI]X = 0 =⇒ −2 4 4 x2 = 0 =⇒ x1 = 2x2 + 2x3
−2 4 4 x3 0
2 2 −1/3 2/3 2/3
=⇒ X2 = −1 and X3 = 2 . Hence U = 2/3 −1/3 2/3 .
2 −1 2/3 2/3 −1/3
−1
AT A = −1 2 2 2 = 9 , |AT A − λI| = 0 =⇒ |9 − λ| = 0 =⇒ λ = 9
2
Then (AT A − λI)X = 0 =⇒ 0 x1 = 0 . Let x1 = 1. Then X = 1 . Hence 1
V =
−1
T T T
or V = 1 . 9 is an Eigenvalues of both AA and A A. The rank of A = 2 is 1.
2
√ 3
Therefore Σ has only one non-zero entry σ1 = 9 = 3. That is Σ = 0
0
−1 −1/3 2/3 2/3 3
Therefore the SVD of A = 2 is 2/3 −1/3 2/3 0 1 .
2 2/3 2/3 −1/3 0
1 1
Example. Obtain the SVD of A = .
1 0
T 1 1 1 1 2 1
Solution: AA = =
1 0 1 0 1 1
√
T 2−λ 1 2 3− 5
|AA − λI| = 0 =⇒ = 0 =⇒ λ − 3λ + 1 = 0 =⇒ λ1 = ,
1 1−λ 2
√
3+ 5
λ2 =
2 √
√ 1+ 5
3− 5 2 1 x1
0
For λ = T
, (AA − λI)X = 0 =⇒ √ =
2 −1 + 5 x2 0
1
√ 2√
1+ 5 1+ 5
=⇒ x1 + x2 = 0. Letting x1 = −1, then x2 =
2 2
√
−1√
1+ 5
−1
Therefore X = 1 + 5 = , where α = .
α 2
2 √
1− 5
√
3+ 5 1
For λ = , (AAT − λI)X = 0 =⇒ 2
√ x1 = 0
2 −1 − 5 x2 0
1
√ 2√
1− 5 1− 5
=⇒ x1 + x2 = 0. Letting x1 = −1, then x2 =
2 2
√
−1√
1− 5
−1
Therefore X = 1 − 5 = , where β = .
β 2
2
−1 −1
√ p
1 + α2 1 + β2
Hence U =
α β
√
p
1 + α2 1 + β 2
−1 α
√
√1 + α2 √1 + α2
λ 1 0
As AT A = AAT V T = and Σ =
√
.
−1 β
p p
0 λ2
1+β 2 1+β 2
−1 1 0
Example. Obtain the SVD of A = .
0 −1 1
−1 0
T −1 1 0 2 −1
Solution: AA = 1 −1 =
0 −1 1 −1 2
0 1
2 − λ −1
|AAT − λI| = 0 =⇒ = 0 =⇒ λ2 − 4λ + 3 = 0
−1 2 − λ
=⇒ λ1 = 1, λ2 = 3
T −1 −1 x1 0
For λ = 3 (AA − λI)x = 0 =⇒ = =⇒ x1 + x2 = 0 =⇒ x1 = −x2
−1
−1 x 2 0
−1
Letting x2 = 1 =⇒ x1 = −1 ∴ x =
1
T 1 −1 x1 0
For λ = 1 (AA − λI)x = 0 =⇒ = =⇒ x1 − x2 = 0 =⇒ x1 = x2
−1
1 x 2 0
1
Letting x2 = 1 =⇒ x1 = 1 ∴ x =
1
−1 0 1 −1 0
−1 1 0
AT A = 1 −1 = −1 2 −1
0 −1 1
0 1 0 −1 1
1 − λ −1 0
|A A − λI| = 0 =⇒ −1 2 − λ −1 = 0 =⇒ λ3 − 4λ2 + 3λ = 0
T
0 −1 1 − λ
=⇒ λ1 = 0, λ2 = 1, λ3 = 3
1 −1 0 x1 0
T
For λ = 0 (A A − λI)x = 0 =⇒ −1 2 −1 x2 = 0
0 −1 1 x3 0
=⇒ x1 − x2 = 0, x2 − x3 = 0 =⇒ x1 = x2, x2 = x3
1
Letting x3 = 1 =⇒ x2 = 1, x1 = 1 ∴ x = 1
1
0 −1 0 x1 0
T
For λ = 1 (A A − λI)x = 0 =⇒ −1 1 −1 x2 = 0
0 −1 0 x3 0
=⇒ −x1 + x2 − x3 = 0, x2 = 0 =⇒ x1 = −x 3 , x2 = 0
−1
Letting x3 = 1 =⇒ x2 = 0, x1 = −1 ∴ x = 0
1
−2 −1 0 x1 0
T
For λ = 3, (A A − λI)x = 0 =⇒ −1 −1 −1 x2 = 0
0 −1 −2 x3 0
=⇒ −2x1 − x2 = 0, x2 + 2x3 = 0 =⇒ 2x1 = x2 ,x2 = −2x3
1
Letting x3 = 1 =⇒ x2 = −2, x1 = 1 ∴ x = −2
1
√ √ √
√ √ √ 1/ √6 −1/ 2 1/√3
−1/√ 2 1/√2 3 0 0
Hence U = Σ= V = −2/√ 6 0√ 1/√3
1/ 2 1/ 2 0 1 0
1/ 6 1/ 2 1/ 3
√ √ √
1/ √6 −2/ 6 1/√6
T
V = −1/√ 2
0√ 1/√2
1/ 3 1/ 3 1/ 3
Exercise:
Obtain the SVD of the following matrices
2 −1 1 1 3 2 2
1. , 3.
2 2 2. 0 1, 2 3 −2
−1 1