Maths Unit 1 - Material
Maths Unit 1 - Material
1
Aim:
To construct strong knowledge in theory of
Matrix and its application of matrices
Objectives:
2
Prerequisites:
Students should have basic
knowledge in the concepts and
applications of matrices.
Learning Outcome:
Students should be able to do basic
computation of Eigenvalues and
Eigenvectors 3
Recall
• Matrix
• Order of a Matrix
• Determinant
• Transpose of a Matrix
• Identity Matrix
• Multiplication of two Matrices
• Inverse of a Matrix
• Symmetric and Non-symmetric Matrix
• Singular and Non-singular Matrix
4
Outline
• Introduction
• Definition of Matrix and various terms
• Characteristic Equation of a matrix
• Properties of Eigenvalues
• Finding Eigenvalues and Eigenvectors
5
Eigenvalues and Eigenvectors
Definition: Matrix
A system of mn numbers(elements) arranged in a rectangular arrangement along m rows
and n columns and bounded by the brackets [ ] or ( ) is called an m by n matrix, which is
written as m n matrix
a11 a12 .. .. a1n
a a .. .. a
21 22 2 n
A = ... .. .. .. ..
.. .. .. .. ..
a m1 a m 2 .. .. a mn
Characteristic polynomial
The determinant |A- I | when expanded will give a polynomial, which we call as
characteristic polynomial of matrix A.
Definition: Eigenvalues
A = [ a ij ] be a square matrix.
The characteristic equation of A is |A- I | = 0.
The roots of the characteristic equation are called Eigenvalues of A.
6
Definition: Eigenvectors
A = [ aij ] be a square matrix of order ‘n’
x1
x
2
If there exist a non zero vector X = .
.
xn
such that AX = X , then the vector X is called an Eigenvector of A corresponding to the
Eigenvalue .
7
1 2
1. Find the characteristic equation of the matrix
0 2
Solution:
The characteristic equation is 2 S 1 S 2 0
S1 = sum of main diagonal elements
= 1+2=3
S2 = Det (A) =|A|
1 2
=
0 2
S2 = 2-0 = 2
The characteristic equation is 2 3 2 0 .
2 3 1
2. Find the characteristic equation of 3 1 3
5 2 4
Solution:
The characteristic equation is 3 S 1 2 S 2 S 3 0
Where, S1 = sum of the main diagonal elements
= 2+1-4 = -1
S2 = sum of minor of main diagonal elements
1 3 2 1 2 3
= + +
2 4 5 4 3 1
= (-4-6)+(-8+5)+(2+9) = -10+(-3)+11 = -2
S3 = Det (A) =|A|
2 3 1
= 3 1 3
5 2 4
= 2(-4-6)-(-3)(-12+15)+1(6+5)
= 2(-10) +3(3) +1(11) = -20+9+11= 0
The characteristic equation is 3 2 2 0
8
1 1 0
3. Find the Eigenvalues of 1 2 1
0 1 1
Solution:
The characteristic equation is 3 S12 S 2 S3 0
S1 = 1+2+1=4
2 1 1 0 1 1
S2 = + +
1 1 0 1 1 2
= (2-1)+(1-0)+(2-1) = 3
1 1 0
S3 = 1 2 1 = 1(2-1)+(-1-0)+0 = 0
0 1 1
Therefore the characteristic equation is 3 42 3 0 0
To find the Eigenvalues
3 42 3 0 0
(2 -4+3) = 0
= 0, (2 -4+3) = 0
9
(-1)(-3) = 0
= 1, 3
The Eigen values are 1, 3, and 0.
Properties of Eigenvalues.
i. The sum of the Eigenvalues of a matrix is the sum of the elements of main
diagonal
ii. The product of the Eigenvalues is equal to the determinant of the matrix.
iii. The Eigen values of the triangular matrix are just the diagonal element of the
matrix
iv. If is an Eigenvalue of a matrix A, then 1 , (0) is Eigen value of A-1
v. If 1, 2, ………n are the Eigenvalues of a matrix A, then Am has a Eigenvalues
1m , m2 ,.......mn
10
2 1 2
1. Find the sum & product of the Eigenvalues of the matrix A= 1 3 1
2 1 6
Solution:
Sum of the Eigen values = sum of the main diagonal elements
= 2+3-6=-1
Product of the Eigen value = |A|
3 1 1 1 1 3
2 1 2
1 6 2 6 2 1
= 2(-18-1)-1(-6-2)+2(1-6) = - 40
Sum = -1 and Product = - 40
6 2 2
2. The product of two Eigenvalues of the matrix A= 2 3 1 is 16. Find the third
2 1 3
Eigenvalue of A.
Solution:
Given: The product of two Eigen values of A is 16
(i.e) 12 =16
By property, Product of Eigen values = |A|
11
123 = |A|
6 2 2
163 = 2 3 1
2 1 3
= 6(9-1)+2(-6+2)+2(2-6)= 32
32
3 = =2
16
The third Eigen value is 2.
8 6 2
3. Two Eigenvalues of the matrix A = 6 7 4 are 3 and 0. What is the third
2 4 3
eigenvalue?
What is the product of the eigenvalues of A?
Solution:
Given: If 1 = 3, 2 = 0, and 3 =?
By property, Sum of the Eigenvalues = sum of the main diagonals.
1+2+3 = 8+7+3= 18
3+0+3 = 18
3 = 18 - 3 = 15
12
By property, Product of the Eigen values = |A|
(3)(0)(15) = |A|
|A| = 0
The third eigenvalue is 15, The product of the eigenvalues of A is 0.
8 6 2
4. If 3 and 15 are two Eigenvalues of the matrix A = 6 7 4 then find the third
2 4 3
eigenvalue and hence = |A|
Solution:
Given: If 1 = 3, 2 = 15, and 3 =?
By property, Sum of the Eigenvalues = sum of the main diagonals.
1+2+3 = 8+7+3= 18
3+15+3 = 18
3 = 18 - 18 = 0
By property, Product of the Eigenvalues = |A|
(3)(15)(0) = |A|
|A| = 0
The third eigenvalue is 0, The product of the eigenvalues of A is 0.
13
Non-Symmetric Matrix With Non-Repeated Eigenvalues
1 1 4
1. Find all the Eigenvalues and Eigenvectors of the matrix 3 2 1
2 1 1
Solution:
1 1 4
Given: A= 3 2 1
2 1 1
To find the characteristic equation of A
Formula: The characteristic equation of A is 3 S12 S 2 S 3 0
Where, S1= sum of main diagonal
=1+2-1=2
S2 = sum of minor of main diagonal elements
2 1 1 4 1 1
= + +
1 1 2 1 3 2
= (-2+1)+(-1-8)+(2+3) = -1-9+5 = -5
14
S3 = Det (A)=|A|
1 1 4
= 3 2 1 =1(-2+1)+1(-3+2)+4(3-4)
2 1 1
=1(-1)+1(-1)+4(-1) = -1-1-4= - 6
Hence the characteristic equation is 3 22 5 6 0
To solve the characteristic equation:
If =1 By synthetic division 1 1 -2 -5 6
0 1 -1 -6
1 -1 -6 0
Therefore the =1 and other roots are given by 2 6 0
(+2)(-3) = 0
= -2, 3
Therefore Eigenvalues are 1,-2, 3
15
1 1 4 1 0 0 x1 0
3 2 1 0 1 0 x 2 0
2 1 1 0
0 1 x 3 0
1 1 4 x1 0
3 2 1 x 2 0
2 1 1 x 3 0
(1-λ)x1-x2+4x3=0
3x1+(2-λ)x2-x3=0 ….(1)
2x1+x2+(-1-λ)x3=0
Case 1: Substitute λ=1 in, (1) we get
0x1-x2+4x3=0 …. (2)
3x1+x2-x3=0 …. (3)
2x1+x2-2x3=0 …. (4)
Solving (2) and (3) by cross multiplication rule, we get
x1 x2 x3
-1 4 0 -1
1 -1 3 1
x1 x2 x3
1 4 12 0 0 3
x1 x2 x3
3 12 3
16
x1 x2 x3
1 4 1
1
Therefore X1= 4
1
Case 2: Substitute λ= -2 in (1), we get
3x1-x2+4x3=0 ….(5)
3x1+4x2-x3=0 ….(6)
2x1+x2+x3=0 ….(7)
Solving (5) and (6) by cross multiplication rule we get
x1 x2 x3
-1 4 3 -1
4 -1 3 4
x1 x2 x3
1 16 12 3 12 3
x1 x x
2 3
15 15 15
x1 x2 x3
1 1 1
1
Therefore X2= 1
1
17
Case 3: Substitute λ=3 in (1) we get
-2x1-x2+4x3=0 …. (8)
3x1-x2-x3=0 …. (9)
2x1+x2-4x3=0 …. (10)
Solving (8) and (9) by cross multiplication rule we get
x1 x2 x3
-1 4 -2 -1
-1 -1 3 -1
x1 x2 x3
1 4 12 2 23
x1 x 2 x3
5 10 5
x1 x2 x3
1 2 1
1
Therefore X3= 2
1
1 1 1
Result: The Eigen values of A are 1,-2, 3 and the Eigenvectors are 4 , 1 , 2
1 1 1
18
Non-Symmetric Matrix With Repeated Eigenvalues
2 2 3
1. Find all the Eigenvalues and Eigenvectors of the matrix 2 1 6
1 2 0
Solution:
2 2 3
Given: A= 2 1 6
1 2 0
To find the characteristic equation of A
Formula: The characteristic equation of A is 3 S 1 2 S 2 S 3 0
Where, S1 = sum of main diagonal
= -2+1+0=-1
S2 = sum of minor of main diagonal elements
1 6 2 3 2 2
= + +
2 0 1 0 2 1
= (0-12)+(0-3)+(-2-4) = -12-3-6=-21
S3 = Det (A)=|A|
2 2 3
= 2 1 6 = -2(0-12)-2(0-6)-3(-4+1) =45
1 2 0
Hence the characteristic equation is 3 2 21 45 0
19
if λ=1; 1+1-21-45 ≠0
if λ=-1; -1+1-21-45 ≠0
if λ=2; 8+4-42-45 ≠0
if λ=-2; -8+4+42-45≠0
if λ=3; 27+9-63-45≠0
if λ=-3; -27+9+63-45≠0
Therefore λ=-3 is a root
By synthetic division -3 1 1 -21 -45
0 -3 6 45
1 -2 -15 0
Therefore the = -3 and other roots are given by 2 2 15 0
(-5)(+3) = 0
= 5,-3,-3
Therefore Eigenvalues are 5, -3,-3 and Here the Eigenvalues are repeated.
To find the Eigenvectors:
To get the Eigenvectors solve (A-λI)X=0
2 2 3 0 0 x1 0
2 1 6
0 0 x 2 0
1 2 0 0 0 x3 0
20
21
Since (5),(6),(7) are all same, So we considered only one equation
x1+2x2-3x3=0
Put x1=0
2x2-3x3=0
2x2=3x3
x2 x
3
3 2
0
Therefore Eigenvector is X2= 3
2
Put x2=0
x1-3x3=0
x1=3x3
x1 x
3
3 1
3
Therefore Eigenvector is X3= 0
1
22
Symmetric Matrix With Non-Repeated Eigenvalues
1 1 3
1. Find all the Eigen values and Eigen vectors of the matrix 1 5 1
3 1 1
Solution:
1 1 3
Given: A= 1 5 1
3 1 1
To find the characteristic equation of A
Formula: The characteristic equation of A is 3 S 1 2 S 2 S 3 0
Where, S1 = sum of main diagonal
=1+5+1=7
S2 = sum of minor of main diagonal elements
5 1 1 3 1 1
= + + = (5-1)+(1-9)+(5-1)=0
1 1 3 1 1 5
1 1 3
S3 = |A|= 1 5 1 =1(5-1)-1(1-3)+3(1-15) = -36
3 1 1
Hence the characteristic equation is 7 0 36 0
3 2
if λ=1; 1-7+0+36 ≠0
if λ=-1; -1-7+0+36 ≠0
if λ=2; 8-24+0+36 ≠0
if λ=-2; -8-24+0+36=0
λ= -2 is a root
23
To solve the characteristic equation:
if =-2 By synthetic division -2 1 -7 0 36
0 -2 18 -36
1 -9 18 0
Therefore the =-2 and other roots are given by 2 9 18 0
(-6)(-3) = 0
= 3,6
Therefore Eigenvalues are-2, 3, 6
To find the Eigenvectors:
To get the Eigenvectors solve (A-λI)X=0
1 1 3 0 0 x1 0
1 5 1
0 0 x 2 0
3 1 1 0 0 x 3 0
(1-λ)x1+x2+3x3=0
x1+(5-λ)x2+x3=0 …(1)
3x1+x2+(1-λ)x3=0
Case 1: Substitute λ=-2 in (1), we get
3x1+x2+3x3=0 …(2)
x1+7x2+x3=0 …(3)
3x1+x2+3x3=0 …(4)
24
Since (2) and (4) are same we consider, solving (2)and (3) by cross multiplication
rule we get
x1 x2 x3
1 3 3 1
7 1 1 7
x1 x2 x3
1 21 33 21 1
x1 x x x1 x x
2 3 2 3
20 0 20 10 0 10
1
Therefore X1 = 0
1
Case 2: Substitute λ=3 in (1), we get
-2x1+x2+3x3=0 … (5)
x1+2x2+x3=0 …(6)
3x1+x2-2x3=0 … (7)
Solving (5) and (6) by cross multiplication rule we get
x1 x2 x3
1 3 -2 1
2 1 1 2
x1 x2 x3
1 6 23 4 1
x1 x2 x3 x1 x2 x3
5 5 5 1 1 1
25
1
Therefore X2= 1
1
Case 3: Substitute λ=6 in (1), we get
-5x1+x2+3x3=0 … (8)
x1-x2+x3=0 … (9)
3x1+x2-5x3=0 …(10)
x1 x2 x3
1 3 -5 1
-1 1 1 -1
x1 x2 x3
1 3 35 5 1
x1 x2 x3 x1 x2 x3
4 8 4 1 2 1
1
Therefore X3= 2
1
Therefore the Eigenvalues of A are 6,-2, 3
1 1 1
Result: The Eigenvalues of A are 6,-2, 3 and the Eigenvectors are 0 , 1 , 2
1 1 1
26
Symmetric Matrix With Repeated Eigenvalues
6 2 2
1. Find all the Eigenvalues and Eigenvectors of 2 3 1
2 1 3
Solution:
6 2 2
Given: A= 2 3 1
2 1 3
To find the characteristic equation of A
The characteristic equation of A is 3 S 1 2 S 2 S 3 0
Where, S1= sum of main diagonal
=6+3+3=12
S2 = sum of minor of main diagonal elements
3 1 6 2 6 2
= + +
1 3 2 3 2 3
= (9-1)+(18-4)+(18-4) = 8+14+14 = 36
S3 = Det (A)=|A|
6 2 2
=2 3 1 =32
2 1 3
27
Hence the characteristic equation is 3 122 36 32 0
if λ=1; 1-12+36-32 ≠0
if λ=-1; -1-12-36-32≠0
if λ=2;8-42+72-32=0
28
(i.e)-2x1-2x2+2x3=0 .... (1)
-2x1-5x2-x3=0 ….. (2)
29
Here (4), (5), (6) represents the same equation,
2x1-x2+x3=0
If x1=0 we get -x2+x3=0
-x2 =- x3
x2 = x3
x x
(i.e) 2 3
1 1
0
Hence the corresponding eigenvector is X2= 1
1
l
Let X3= m as x3 is orthogonal to x1 and x2 since the given matrix is symmetric
n
l
[2 -1 1] m 0 or 2l-m+n=0 …. (7)
n
l
[0 1 1] m 0 or 0l+m+n=0 …. (8)
n
30
Solving (7) and (8) by rule of cross multiplication, we get
l m n
-1 1 2 -1
1 1 0 1
l m n
1 1 0 2 2 0
l m n
2 2 2
1
Hence the corresponding Eigenvector is X3= 1
1
2 0 1
Result: The Eigenvalues are 8, 2, 2 and the Eigenvectors are 1 , 1 , 1
1 1 1
31
References:
Eigenvalues and Eigenvectors
Book List:
1. A. K. Ghatak, I. C. Goyal and A. J. Chua, Mathematical Physics (McMillan, New
Delhi 1995).
2. P. K. Chattopadhyay, Mathematical Physics (Wiley, Eastern, New Delhi, 1990)
3. Sathyaprakash, Mathematical Physics
4. H. K. Dass – Mathematical Physics
5. B. D. Gupta – Mathematical Physics
32
Thank you
33
Solution: Let A = ( ) which is a non-symmetric matrix
= 1(-1) – 1(3) = - 4
[( ) ( )] [ ] [ ] [( ) ( )] [ ] [ ]
[ ][ ] [ ]--------------- (1)
i.e., [ ][ ] [ ]
i.e.,
Therefore [ ]
i.e.,
Hence, [ ]
| | | | | |
= 2(4)-2(1)+1(-1) = 5
1 -6 5 0
√ √
Therefore, the eigen values are 1, 1, and 5
[ ][ ] [ ]
Case 1: If [ ][ ] [ ]
i.e., [ ][ ] [ ]
--------- (1)
------------- (2)
------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
2 1 -3 2
-2 1 1 -2
Therefore, [ ]
Case 2: If ,[ ][ ] [ ]
i.e., [ ][ ] [ ]
All the three equations are one and the same. Therefore,
Put
Therefore, [ ]
Put
Therefore, [ ]
| | | | | |
,
= 2(-4)+2(-2)+2(2) = - 8 – 4 + 4 = - 8
Therefore, the characteristic equation of A is
1 0 -4 0
[ ][ ] [ ]
Case 1: If [ ][ ] [ ]
i.e., [ ][ ] [ ]
--------- (1)
------------- (2)
------------ (3) . Equations (2) and (3) are one and the same.
Considering equations (1) and (2) and using method of cross-multiplication, we get,
-1 1 2 -1
3 1 1 3
Therefore, [ ]
Case 2: If ,[ ][ ] [ ]
i.e., [ ][ ] [ ]
---------- (1)
---------------- (2)
------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
-2 2 0 -2
-1 1 1 -1
Therefore, [ ]
| | | | | |
,
= 1(4)-1(-2)+3(-14) = - 4 + 2-42 = - 36
1 -9 18 0
√ √
[ ][ ] [ ]
Case 1: If [ ][ ] [ ]
i.e., [ ][ ] [ ]
--------- (1)
------------- (2)
------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
1 3 3 1
7 1 1 7
Therefore, [ ]
Case 2: If ,[ ][ ] [ ]
i.e., [ ][ ] [ ]
---------- (1)
---------------- (2)
3 ------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
1 3 -2 1
2 1 1 2
Therefore, [ ]
Case 3: If ,[ ][ ] [ ]
i.e., [ ][ ] [ ]
---------- (1)
---------------- (2)
3 ------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
1 3 -5 1
-1 1 1 -1
Therefore, [ ]
5. Find the eigen values and eigen vectors of the matrix[ ]. Determine the
| | | | | |
,
= 0 -1(-1)+ 1(1) = 0 + 1 + 1 = 2
√ √
[ ][ ] [ ]
Case 1: If [ ][ ] [ ]
i.e., [ ][ ] [ ]
--------- (1)
------------- (2)
------------ (3)
Considering equations (1) and (2) and using method of cross-multiplication, we get,
1 1 -2 1
-2 1 1 -2
Therefore, [ ]
Case 2: If ,[ ][ ] [ ]
i.e., [ ][ ] [ ]
---------- (1)
---------------- (2)
------------ (3). All the three equations are one and the same.
Therefore, . Put
Therefore, [ ]
Since the given matrix is symmetric and the eigen values are repeated, let [ ]. is
orthogonal to
][ ] ------------ (1)
][ ] -------- (2)
l m
1 1 1 1
1 -1 0 1
. Therefore, [ ]
Thus, for the repeated eigen value there corresponds two linearly independent eigen
vectors . So, the geometric multiplicity of eigen value is 2
1. Find the sum and product of the eigen values of the matrix [ ]
Solution: Sum of the eigen values = Sum of the main diagonal elements = -3
2. Product of two eigen values of the matrix A = [ ] is 16. Find the third eigen
value
Solution: Let the eigen values of the matrix be .
Given
We know that (Since product of the eigen values is equal to the determinant of
the matrix)
3. Find the sum and product of the eigen values of the matrix A = ( ) without
Solution:Given
We know that sum of the eigen values = Sum of the main diagonal elements
Solution:By the property “A square matrix A and its transpose have the same eigen
values”, the eigen values of
property “the characteristic roots of a triangular matrix are just the diagonal elements of the
matrix”, the eigen values of A are 2, 3, 4
7. Two of the eigen values of A = [ ] are 3 and 6. Find the eigen values of
Solution:Sum of the eigen values = Sum of the main diagonal elements = 3 +5+3 = 11
Given 3,6 are two eigen values of A. Let the third eigen value be k.
Then, 3 + 6 + k = 11
By the property “If the eigen values of A are , then the eigen values of
are ”, the eigen values of are
8. Find the eigen values of the matrix[ ]. Hence, form the matrix whose eigen
values are
where and
√
Therefore, the characteristic equation is =
Therefore, [ ]
Solution:We know that A is an upper triangular matrix. Therefore, the eigen values of A are
2, 3, 4. Hence, by using the property “If the eigen values of A are , then the eigen
values of are ”, the eigen values of
A are 1, 2, 3
11. If 1 and 2 are the eigen values of a 2 x 2 matrix A, what are the eigen values of
?
Therefore, i.e., 1 and 4 are the eigen values of and 1 and are the eigen
values of
12. If 1,1,5 are the eigen values of A = [ ], find the eigen values of 5A
Solution:By the property “If are the eigen values of A, then are the
eigen values of kA, the eigen values of 5A are 5(1), 5(1), 5(5) ie., 5,5,25
2, 5
are 3, 4, 1
We know that
Adj A = │A│
Therefore, the eigen values of adj A is equal to the eigen values of 12 i.e., i.e.,
4, 3, 12
B is a lower triangular matrix and C is a diagonal matrix. In all the cases, the elements in the
main diagonal are the eigen values. Hence, the eigen values of A, B and C are 1, 4, 6
15. Two eigen values of A = [ ] are equal and they are times the third. Find
them
Given =
[ ]
We know that the sum of the eigen values = sum of the main diagonal elements
Therefore, 2 +3 +k = 2+ 2+2 = 6
2(3)(k) = │A│
| |
17. Prove that the eigen vectors of the real symmetric matrix A = [ ] are
orthogonal in pairs
Solution:The characteristic equation of A is
where ;
| |
3 1-7 0 36
0 3 -12 -36
1 -4 -12 0
√
Therefore,
Case 1: When [ ][ ] [ ]
-------- (1)
---------- (2)
--------- (3)
1 3 3 1
7 1 1 7
[ ]
Case 2:When [ ][ ] [ ]
--------- (1)
--------- (2)
--------- (3)
1 3 -2 1
2 1 1 2
[ ]
Case 3:When [ ][ ] [ ]
--------- (1)
--------- (2)
--------- (3)
1 3 -5 1
-1 1 1 -1
[ ]
Therefore, [ ], [ ] [ ]
To prove that:
][ ]
][ ]
][ ]
18. Find the sum and product of all the eigen values of the matrix A = [ ].Is the
matrix singular?
Solution:Sum of the eigen values = Sum of the main diagonal elements =Trace of the matrix
Orthogonal matrices:
Problems:
To prove that:
B=[ ]; [ ]
[ ][ ]
[ ] [ ]
Similarly,
[ ][ ]
[ ] [ ]
[ ]; [ ]
[ ] [ ]= I
[ ][ ]
[ ] [ ]
[ORTHOGONAL TRANSFORMATION]:
Step 4: If the eigen vectors are orthogonal, then form a normalized matrix N
Step 5: Find
Step 6: Calculate AN
Step 7: Calculate D =
Problems:
Solution: Let A = [ ]
2 1 -11 36 -36
0 2 -18 36
1 -9 18 0
√ √
=
[ ][ ] [ ]
Case 1: When [ ][ ] [ ]
---------- (1)
-------- (2)
--------- (3)
3 -1 -1 3
[ ]
Case 2: When [ ][ ] [ ]
---------- (1)
-------- (2)
--------- (3)
-1 1 0 -1
2 -1 -1 2
[ ]
Case 3: When [ ][ ] [ ]
---------- (1)
-------- (2)
--------- (3)
-1 -1 -1 -1
[ ]
][ ]
][ ] =0
][ ]
√ √ √ √ √ √
The Normalized matrix N = √ √ √
; √ √ √
[√ √ √ ] [√ √ √ ]
√ √ √ √ √ √
AN = [ ] √ √ √ √ √ √
[√ √ √ ] [√ √ √ ]
√ √ √ √ √ √ √ √
[ ]
√ √ √ √ √ √ √ √
[√ √ √ ] [√ √ √ ] [√ √ ]
i.e., [ ]
Solution: Let A = [ ]
√ √
[ ][ ] [ ]
Case 1: When [ ][ ] [ ]
---------- (1)
-------- (2)
--------- (3)
-6 2 8 -6
7 -4 -6 7
[ ]
Case 2: When [ ][ ] [ ]
-------- (1)
------- (2)
--------- (3)
-6 2 5 -6
4 -4 -6 4
[ ]
Case 3: When [ ][ ] [ ]
---------- (1)
---------- (2)
---------- (3)
-6 2 -7 -6
-8 -4 -6 -8
[ ]
][ ]
][ ] 4-2-2 = 0
][ ]
[ ]
[ ]
[ ]
AN =
[ ] [ ] [ ][ ]
[ ] [ ] [ ]
[ ][ ] [ ]
[ ] [ ]
i.e., [ ]
2.7 LU-Factorization15
The solution to a system Ax = b of linear equations can be solved quickly if A can be factored as A = LU
where L and U are of a particularly nice form. In this section we show that gaussian elimination can be
used to find such factorizations.
Triangular Matrices
As for square matrices, if A = ai j is an m × n matrix, the elements a11 , a22 , a33 , . . . form the main
diagonal of A. Then A is called upper triangular if every entry below and to the left of the main diagonal
is zero. Every row-echelon matrix is upper triangular, as are the matrices
1 1 1
1 −1 0 3 0 2 1 0 5 0 −1 1
0 2 1 1 0 0 0 3 1 0
0 0
0 0 −3 0 0 0 1 0 1
0 0 0
By analogy, a matrix A is called lower triangular if its transpose is upper triangular, that is if each entry
above and to the right of the main diagonal is zero. A matrix is called triangular if it is upper or lower
triangular.
Example 2.7.1
Solve the system
x1 + 2x2 − 3x3 − x4 + 5x5 = 3
5x3 + x4 + x5 = 8
2x5 = 6
where the coefficient matrix is upper triangular.
x3 = 1 − 15 t
x1 = −9 − 2s + 52 t
The method used in Example 2.7.1 is called back substitution because later variables are substituted
into earlier equations. It works because the coefficient matrix is upper triangular. Similarly, if the coeffi-
15 This section is not used later and so may be omitted with no loss of continuity.
2.7. LU-Factorization 119
cient matrix is lower triangular the system can be solved by forward substitution where earlier variables
are substituted into later equations. As observed in Section 1.2, these procedures are more numerically
efficient than gaussian elimination.
Now consider a system Ax = b where A can be factored as A = LU where L is lower triangular and U
is upper triangular. Then the system Ax = b can be solved in two stages as follows:
Lemma 2.7.1
Let A and B denote matrices.
1. If A and B are both lower (upper) triangular, the same is true of AB.
2. If A is n × n and lower (upper) triangular, then A is invertible if and only if every main
diagonal entry is nonzero. In this case A−1 is also lower (upper) triangular.
LU-Factorization
Let A be an m × n matrix. Then A can be carried to a row-echelon matrix U (that is, upper triangular). As
in Section 2.5, the reduction is
A → E1 A → E2 E1 A → E3 E2 E1 A → · · · → Ek Ek−1 · · · E2 E1 A = U
where E1 , E2 , . . . , Ek are elementary matrices corresponding to the row operations used. Hence
A = LU
Theorem 2.7.1
If A can be lower reduced to a row-echelon matrix U , then
A = LU
where L is lower triangular and invertible and U is upper triangular and row-echelon.
Such a factorization may not exist (Exercise 2.7.4) because A cannot be carried to row-echelon form
using no row interchange. A procedure for dealing with this situation will be outlined later. However, if
an LU-factorization A = LU does exist, then the gaussian algorithm gives U and also leads to a procedure
for finding L. Example 2.7.2 provides an illustration. For convenience, the first nonzero column from the
left in a matrix A is called the leading column of A.
Example 2.7.2
0 2 −6 −2 4
Find an LU-factorization of A = 0 −1 3 3 2 .
0 −1 3 7 10
0 2 −6 −2 4 0 1 −3 −1 2 0 1 −3 −1 2
A = 0 −1 3 3 2 → 0 0 0 2 4 → 0 0 0 1 2 =U
0 −1 3 7 10 0 0 0 6 12 0 0 0 0 0
The circled columns are determined as follows: The first is the leading column of A, and is used
(by lower reduction) to create the first leading 1 and create zeros below it. This completes the work
on row 1, and we repeat the procedure on the matrix consisting of the remaining rows. Thus the
second circled column is the leading column of this smaller matrix, which we use to create the
second leading 1 and the zeros below it. As the remaining row is zero here, we are finished. Then
A = LU where
2 0 0
L = −1 2 0
−1 6 1
This matrix L is obtained from I3 by replacing the bottom of the first two columns by the circled
columns in the reduction. Note that the rank of A is 2 here, and this is the number of circled
columns.
The calculation in Example 2.7.2 works in general. There is no need to calculate the elementary
2.7. LU-Factorization 121
matrices Ei , and the method is suitable for use in a computer because the circled columns can be stored in
memory as they are created. The procedure can be formally stated as follows:
LU-Algorithm
Let A be an m × n matrix of rank r, and suppose that A can be lower reduced to a row-echelon
matrix U . Then A = LU where the lower triangular, invertible matrix L is constructed as follows:
1. If A = 0, take L = Im and U = 0.
2. If A 6= 0, write A1 = A and let c1 be the leading column of A1 . Use c1 to create the first
leading 1 and create zeros below it (using lower reduction). When this is completed, let A2
denote the matrix consisting of rows 2 to m of the matrix just created.
4. Continue in this way until U is reached, where all rows below the last leading 1 consist of
zeros. This will happen after r steps.
Example 2.7.3
5 −5 10 0 5
−3 3 2 2 1
Find an LU-factorization for A =
−2
.
2 0 −1 0
1 −1 10 2 5
5 −5 10 0 5 1 −1 2 0 1
−3 3 2 2 1 2 4
→ 0 0 8
−2 2 0 −1 0 0 0 4 −1 2
1 −1 10 2 5 0 0 8 2 4
1 −1 2 0 1
1 1
0 0 1 4 2
→
0 0 0 −2 0
0 0 0 0 0
1 −1 2 0 1
1 1
0 0 1 4 2
→ =U
0 0 0 1 0
0 0 0 0 0
The next example deals with a case where no row of zeros is present in U (in fact, A is invertible).
Example 2.7.4
2 4 2
Find an LU-factorization for A = 1 1 2 .
−1 0 2
2 0 0
Hence A = LU where L = 1 −1 0 .
−1 2 5
LU DECOMPOSITION METHOD
The Gauss Elimination Method has the disadvantage that all right-hand sides (i.e. all the
b vectors of interest for a given problem) must be known in advance for the elimination
step to proceed. The LU Decomposition Method outlined here has the property that the
matrix modification (or decomposition) step can be performed independent of the right
hand side vector. This feature is quite useful in practice - therefore, the LU
Decomposition Method is usually the Direct Scheme of choice in most applications.
To develop the basic method, let's break the coefficient matrix into a product of two
matrices,
A=LU (3.12)
where L is a lower triangular matrix and U is an upper triangular matrix.
Now, the original system of equations,
Ax =b (3.13)
becomes
LU x = b (3.14)
This expression can be broken into two problems,
Ly = b and Ux=b (3.15)
The rationale behind this approach is that the two systems given in eqn. (3.15) are both
easy to solve; one by forward substitution and the other by back substitution. In
particular, because L is a lower diagonal matrix, the expression, Ly = b , can be solved
with a simple forward substitution step. Similarly, since U has upper triangular form, U x
= b can be evaluated with a simple back substitution algorithm.
Thus the key to this method is the ability to find two matrices, L and U, that satisfy eqn.
(3.12). Doing this is referred to as the Decomposition Step and there are a variety of
algorithms available. Three specific approaches are as follows:
Doolittle Decomposition:
(3.16)
Because of the specific structure of the matrices, a systematic set of formulae for the
components of L and U results.
Crout Decomposition:
(3.17)
The evaluation of the components of L and U is done in a similar fashion as above.
Cholesky Factorization:
For symmetric, positive definite matrices, where
A = AT and x TA x > 0 for x ≠ 0 (3.18)
then,
U = LT and A = L LT (3.19)
and a simple set of expressions for the elements of L can be obtained (as above).
Once the elements of L and U are available (usually stored in a single NxN matrix), the
solution step for the unknown vector x is a simple process [as outlined above in eqn.
(3.15)].
(3.20)
This gives three types of equations
(3.21)
(3.22)
(3.23)
This gives equations for unknown (the decomposition is not unique), and can
be solved using either using Doolittle or Crout's method.
u 1j = a 1j j = 1 to N
l i1 = a i1 / a 11 , i = 2 to N
l i2 = ( a i2 – l i1 u 12 ) / u22 , i = 3 to N,
and so on
l i1 = a i1 , i=1 to N
l i2 = a i2 – l i1 u 12, i = 2 to N
u 2j = ( a 2j – l21 u 1j ) / l22, j= 3 to N,
and so on
Example 7: Given the following system of linear equations, determine the value of each
of the variables using the LU decomposition method.
6x1 - 2x2 = 14
9x1 - x2 + x3= 21 (3.24)
3x1 - 7x2 + 5x3= 9
Solution :
Upper Lower
Explanation of Step
Triangular Triangular
= (3.25)
1. Rewrite the system Ax = b using the LU representation for A. Making the system
LUx = b.
=
3. Rewrite step one with the substitution from step two yielding Ly = b.
5. Using the results from step four, solve for x in step two using back substitution.
• Crout Method:
• diag (U) = 1; uii=1
• Doolittle Method:
• diag (L) = 1; lii=1
• Choleski Method:
• diag (U) = diag (L); uii= lii
Doolittle
1 0 0 0
𝑥 1 0 0
L = x= any number; one’s in diagonal
𝑥 𝑥 1 0
𝑥 𝑥 𝑥 1
Crout
1 𝑥 𝑥 𝑥
0 1 𝑥 𝑥
U = x= any number; one’s in diagonal
0 0 1 𝑥
0 0 0 1
Cholesky
• Lii = Uii diagonal elements are equal
Example (Crout)
1 0 0 1 2 4
where 𝐿 = 3 2 0 𝑈= 0 1 1
2 2 3 0 0 1
Example (Doolittle)
Example (Doolittle)
for j = i - 1:R
U(i, j) = (A(i, j) - L(i, 1:i - 1) * U(1:i - 1, j)) / L(i, i);
end
end
end
https://rosettacode.org/wiki/LU_decomposition#Creating_a_MATLAB_function
matlab Crout LU: output
A=
matlab lu function 1
3
2
8 14
4
2 6 13
% LU Decomposition
% lu is a library matlab function
L=
clc, clear
A=[1,2,4; 3,8,14;2,6,13] 0.3333 -1.0000 1.0000
not a triangular
1.0000 0 0
matrix
[L,U]=lu(A) 0.6667 1.0000 0
U=
• The benefit of this approach is that we only ever need to solve triangular
systems. The cost is that we have to solve two of them.
Consider the following system of equation:
The key components can be expressed as:
Crout
The steps in finding the
solution vector with LU
Decomposition
2nd Step: Find D vector
Solve by {D}:
1d1=15
2d1-2d2+0d3=22
3d1-5d2+3.5d3=39
1d1=15
2d1-2d2+0d3=22
3d1-5d2+3.5d3=39
𝑑1 15
𝐷 = 𝑑2 = 4
𝑑3 4
3rd Step: Find the solution vector x
Third step:
𝑈 𝑋 = 𝐷
𝑑1 15
𝐷 = 𝑑2 = 4 1 3 2 𝑥1 15
𝑑3 4
0 1 0.5 𝑥2 = 4
0 0 1 𝑥3 4
𝑈 𝑋 = 𝐷
1 3 2 𝑥1 15
0 1 0.5 𝑥2 = 4
0 0 1 𝑥3 4
1𝑥3 = 4
1𝑥2 + 0.5𝑥3 = 4 which produces 𝑥3 = 4, 𝑥2 = 2 , 𝑥1 = 1
1𝑥1 + 3𝑥2 + 2𝑥3 = 15 𝑥1 1
𝑋 = 𝑥2 = 2
𝑥3 4
A=
1 3 2
2 4 3
Crout LU-matlab B=
3 4 7
15
22
% Linear System Solution with LU 39
% Decomposition with CroutLU function
L=
X=
1
2
4
A=
1 3 2
2 4 3
lu function (matlab) B=
3 4 7
15
22
% Linear System Solution with LU 39
% Decomposition with lu matlab
% function L=
• 0.3333 1.0000 0
clc, clear 0.6667 0.8000 1.0000
1.0000 0 0
A=[1,3,2; 2,4,3;3,4,7]
B=[15;22;39] U=
3.0000 4.0000 7.0000
0 1.6667 -0.3333
[L,U] = lu(A) 0 0 -1.4000
D = L\B
D=
X = U\D
39.0000
2.0000
-5.6000
X=
1.0000
2.0000
4.0000
Matrix Multiplication Review
Matrix Multiplication
• Compute the dot
products of each row in
A with each column in B
• Each dot-prod result
becomes an element
with row equal to A and
column equal to B in A*B
the resulting matrix A B
m
AB cij aik bkj
k 1
( n x m) * ( m x p ) n x p
No commutative: AB≠BA 34
Matrix Multiplication
Math Syntax: AB
MATLAB Syntax: A*B (NO DOT)
Sample calculation:
The dot product of row-1 of A and column-1 of B:
(1*-2)+(3*3)+(5*12)=67
35
Matrix Multiplication
Math Syntax: AB
MATLAB Syntax: A*B %(NO DOT)
Sample calculation:
The dot product of row-1 of A and column-1 of B:
(1*-2)+(3*3)+(5*12)=67
36
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Listen Share
SVD Formula
1. A — m x n matrix
2. U — m x k matrix
3. Sigma — k x k matrix
4. V — n x k matrix
Step 1
So, as the first step, we need to find eigenvalues (watch the video provided below to get
an understanding of eigenvalues and eigenvectors) of matrix A and as A can be a
rectangular matrix, we need to convert it to a square matrix by multiplying A with
its transpose. Here, for easier computation I have taken A as a 2 x 2 matrix.
Step 2
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 2/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Now, that we have a square matrix, we can calculate the eigenvalues of A(transpose)
A. We, can do so by calculating the determinant of A(transpose)A — (lambda)I
where lambda are the two eigenvalues.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 3/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Eigenvalues
Step 3
Once we have calculated the eigenvalues, it’s time to calculate the two eigenvectors
for each eigenvalue. So, let’s start by calculating the eigenvector for 10.
Step 3.1
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 4/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
In order to find the eigenvector, we need to find the null space of a matrix where AB
= 0. In other words,
Next, we need to reduce this matrix to the Row-Echelon Form so that we can easily
solve the equation. Let’s talk about Row-Echelon for a moment here.
Row-Echelon Form
2. If a column contains a leading entry then all the entries below the leading entry
should be zero
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 5/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
3. If any two consecutive non-zero rows, the leading entry in the upper row should
occur to the left of the leading entry in the lower row.
4. All rows which consist only of zeros should occur in the bottom of the matrix
We need to perform some operations on the rows to reduce the matrix. These
operations are called elementary row operations and there are a certain rules to
follow for these operations as given below,
https://en.wikibooks.org/wiki/Linear_Algebra/Row_Reduction_and_Echelon_Forms
Armed with the above rules, lets start reducing the matrix in Step 3.1 to row-
echelon form.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 6/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Now, we can solve for null space as below to find the eigenvector for eigenvalue 10
Once we get this vector, we need to convert it to a unit vector . The way we do that is
by taking the columnar values and dividing them by taking the square root of the
sum of squares of the values. So, in this case we do the following,
Denominator
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 7/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 8/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Row-Echelon Form
Open in app Sign up Sign In
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 9/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
EigenVector for 40
Now that we have got both the eigenvectors, let’s put it together.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 10/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Note that the diagonal values in sigma are always in the descending order and so the
vectors are also placed in that corresponding order. If you are familiar with PCA, the
principal components correspond to the top k diagonal element which captures the
most variance. The higher the value, the more important the component is and the
more variance they describe.
Step 4
Now that we have our V and Sigma matrices, now it’s time to find U. We can just
multiply the equation by sigma(inverse) and V on both sides to get the equation for
U. In this case, as V is an orthogonal matrix, the transpose and inverse of V are the
same, therefore, V(transpose) multiplied by V becomes an identity matrix. Same
goes, for the diagonal matrix as well.
Note: On the left hand side, it is sigma(inverse) and not transpose as mentioned in the slide
below
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 11/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
Computing A x V
Next up, we need to convert this to unit vectors using the steps described above.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 12/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
AV as unit vectors
Next up we multiply this matrix with Sigma (transpose) which is sigma in itself
because its a diagonal matrix.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 13/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
AV x sigma (transpose)
Now, we need to convert this to unit vectors to get the final U matrix.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 14/24
9/14/23, 5:07 PM Singular Value Decomposition (SVD) — Working Example | by Roshan Joe Vincent | Intuition | Medium
So, there you go, we have calculated U, sigma and V and decomposed the matrix A
into three matrices as given below.
SVD
You can verify this by going to this nice little tool and performing the matrix
multiplications.
https://medium.com/intuition/singular-value-decomposition-svd-working-example-c2b6135673b5 15/24
SVD computation example
T 3 2 2
Example: Find the SVD of A, U ΣV , where A = .
2 3 −2
A = U ΣV T
Specifically:
• The ordering of the vectors comes from the ordering of the singular values (largest to
smallest).
Avi = σi ui AT ui = σi vi
• If the matrix A is already a symmetric matrix, then U = V and we get the decompo-
sition from 7.1.
Numerical Example
−3 1
(Exercise 11) Find the SVD of the matrix A = 6 −2
6 −2
81 −27
First, we’ll work with AT A = . The eigenvalues are λ = 0, 90.
−27
9
1 −1/3 1 1
For λ = 0, the reduced matrix is , so v = √10
0 0 3
1 3 −3
For λ = 90, the reduced matrix is , so v = √110
0 0 1
Now, we can find the reduced SVD right away since
1
1 1
u1 = Av1 = −2
σ1 3
−2
1
We now need a basis for the null space of
10 −20 −20 1 −2 −2 2 2
AAT = −20 40 40 ∼ 0 0 0 ⇒ 1 , 0
−40 40 40 0 0 0 0 1
is an orthonormal basis for the null space of AT A (and thus also of A)- Note that the
eigenspace E0 for AT A is the null space of A.
2
Singular Value
Decomposition
Motivatation
• The diagonalization theorem play a part in many interesting
applications.
• Unfortunately not all matrices can be factored as 𝐴 = 𝑃𝐷𝑃−1
• However a factorization 𝐴 = 𝑄𝐷𝑃−1 is possible for any 𝑚 × 𝑛 matrix
A.
• A special factorization of this type, called singular value
decomposition, is one of the most useful matrix factorizations in
applied linear algebra.
• As we will see one application is finding minimum value of Ax for
solving Ax=0.
Singular Value Decomposition
• Let 𝐴 be a 𝑚 × 𝑛 matrix of rank 𝑟. We cannot find eigenvalues and eigenvectors
for non-square matrices.
• However, 𝐴 can be diagonalized in such a way that
𝐴𝒗1 = 𝜎1 𝒖1
𝐴𝒗2 = 𝜎2 𝒖2
⋮
𝐴𝒗𝑟 = 𝜎𝑟 𝒖𝑟
• The singular vectors 𝒗1 … 𝒗𝑟 are orthogonal and are the basis for the row space
of 𝐴.
• The output vectors 𝒖1 … 𝒖𝑟 are orthogonal and in column space of 𝐴.
• The singular values 𝜎1 … 𝜎𝑟 are all positive numbers in non-increasing order.
3
Singular value decomposition
• 𝐴𝒗𝑖 = 𝜎𝑖 𝒖𝑖 leads to 𝐴𝑉 = 𝑈Σ:
𝜎1
𝐴 𝒗1 … 𝒗𝑟 = 𝒖1 … 𝒖𝑟 ⋱
𝜎𝑟
• Note that in above equation the dimensions are
𝑚 × 𝑛 𝑛 × 𝑟 = (𝑚 × 𝑟)(𝑟 × 𝑟)
• We always can find orthogonal basis for 𝑁𝑢𝑙(𝐴) and 𝑁𝑢𝑙(𝐴𝑇 ) and
augment those vectors in matrices 𝑈 and 𝑉, respectively to make them
into square orthogonal matrices. We can fill zeroes in the rest of diagonal
elements in matrix Σ. ( row space is orthogonal to null space)
• Then the matrices dimension in the equation 𝐴𝑉 = 𝑈Σ become:
𝑚 × 𝑛 𝑛 × 𝑛 = (𝑚 × 𝑚)(𝑚 × 𝑛)
4
Singular value decomposition
• After adding null space vectors the equation 𝐴𝑉 = 𝑈Σ becomes:
𝜎1
• 𝐴 𝒗1 … 𝒗𝑚 = 𝒖1 … 𝒖𝑛 ⋱
𝜎𝑟
0
• How to find 𝑈 and 𝑉?
• 𝐴𝑉 = 𝑈Σ → 𝐴 = 𝑈Σ𝑉 −1 = 𝑈Σ𝑉 𝑇 , since 𝑉 is orthogonal.
• 𝐴𝐴𝑇 = 𝑈Σ𝑉 𝑇 (𝑈Σ𝑉 𝑇 )𝑇 = 𝑈Σ𝑉 𝑇 𝑉Σ 𝑇 𝑈 𝑇 = 𝑈Σ 2 𝑈 𝑇 , since 𝑉 𝑇 𝑉 = 𝐼 and
ΣΣ 𝑇 = Σ 2
• 𝐴𝑇 𝐴 = (𝑈Σ𝑉 𝑇 )𝑇 𝑈Σ𝑉 𝑇 = 𝑉Σ 𝑇 𝑈 𝑇 𝑈Σ𝑉 𝑇 = 𝑉Σ 2 𝑉 𝑇 , since 𝑈 𝑇 𝑈 = 𝐼 and
ΣΣ 𝑇 = Σ 2
5
Singular value decomposition
• 𝐴 = 𝑈Σ𝑉 𝑇
• 𝐴𝐴𝑇 = 𝑈Σ 2 𝑈 𝑇
• 𝐴𝑇 𝐴 = 𝑉Σ 2 𝑉 𝑇
• Recall that 𝐴𝐴𝑇 and 𝐴𝑇 𝐴 are symmetric matrices where their sizes are
𝑚 × 𝑚 and 𝑛 × 𝑛, respectively.
• Recall that symmetric matrices are diagonalizable and their
eigenvector matrix are orthogonal.
• The eigenvalues of 𝐴𝐴𝑇 are the same as eigenvalues of 𝐴𝑇 𝐴 since the
eigenvalues of 𝐴𝐵 are the same as eigenvalues of 𝐵𝐴.
• In other words, Σ 2 are the eigenvalues and columns of 𝑉 are the
eigenvectors of 𝐴𝑇 𝐴, and 𝑈are the eigenvectors of 𝐴𝐴𝑇
6
Singular value decomposition
3 1 1
• Example: Find matrix 𝐴 = to its equivalent singular
−1 3 1
vector decomposition.
• 𝜆1 = 12, 𝜆2 = 10.
7
Singular value decomposition
• Example Cont’d:
11 − 12 1 −1 1 1
• 𝒖1 = 𝟎 → 𝒖1 = 𝟎 → 𝒖1 =
1 11 − 12 1 −1 1
11 − 10 1 1 1 1
• 𝒖2 = 𝟎 → 𝒖2 = 𝟎 → 𝒖2 =
1 11 − 10 1 1 −1
1 1
2 2 12 0
• 𝑈= 1 1 ,𝐷 =
− 0 10
2 2
8
Singular value decomposition
• Example Cont’d:
• Find 𝐴𝑇 𝐴 = 𝑉𝐷𝑉 𝑇 ,
3 −1 10 0 −2
3 1 1
• 𝐴𝐴𝑇 = 1 3 = 0 10 4
−1 3 1
1 1 −2 4 2
10 − 𝜆 0 −2
• 0 10 − 𝜆 4 = 0, → 𝜆 𝜆 − 10 𝜆 − 12 = 0
−2 4 2−𝜆
• 𝜆1 = 12, 𝜆2 = 10, 𝜆3 = 0.
9
Singular value decomposition
• Example Cont’d:
10 − 12 0 −2 −2 0 −2 1
• 0 10 − 12 4 𝒗1 = 𝟎 → 0 −2 4 𝒗1 = 𝟎 → 𝒗1 = −2
−2 4 2 − 12 −2 4 −10 −1
10 − 10 0 −2 0 0 −2 2
• 0 10 − 10 4 𝒗2 = 𝟎 → 0 0 4 𝒗2 = 𝟎 → 𝒗2 = −1
−2 4 2 − 10 −2 4 −8 0
10 − 0 0 −2 10 0 −2 1
• 0 10 − 0 4 𝒗3 = 𝟎 → 0 10 4 𝒗3 = 𝟎 → 𝒗3 = −2
−2 4 2−0 −2 4 2 5
10
Singular value decomposition
• Example Cont’d:
1 2 1
6 5 30
2 1 2
12 0 0
• 𝑉= −
6
−
5
−
30
,𝐷 = 0 10 0
1 1 5 0 0 0
−
6 5 30 1 2 1
1 1
− −
6 6 6
3 1 1 2 2 12 0 0 2 1 1
• 𝐴= 𝑈Σ𝑉 𝑇 → = 1 1
−
−1 3 1 − 0 10 0 5 5 5
2 2 1 2 5
−
30 30 30
11
Geometric interpretation
• Here is a geometric interpretation
of SVD for a 2 × 2 matrix 𝑀.
• 𝑉 𝑇 (in figure 𝑉 ∗ ) rotates unit
vectors.
• Σ scales the vectors
• 𝑈 perform the final rotation.
12
Singular value decomposition
• Note that we can assume SVD of matrix 𝐴 as:
𝑟
𝐴= 𝜎𝑖 𝒖𝑖 𝒗𝑖 𝑇
𝑖=1
Where 𝑟 is the rank of the matrix.
• Size of each 𝜎𝑖 𝒖𝑖 𝒗𝑖 𝑇 is 𝑚 × 𝑛. The greater 𝜎𝑖 the greater values
added to reconstruct matrix 𝐴.
𝑇 𝑇
𝐴 = 𝜎1 𝒖1 𝒗1 + … + 𝜎𝑟 𝒖𝑟 𝒗𝑟
13
Solve Ax = 0
• What minimizes Ax. And why?
• As defined previous we can write A as
𝜎1
𝒗1
𝐴 = 𝑈Σ𝑉 𝑇 = 𝒖1 … 𝒖𝑛 ⋱
⋮
𝜎𝑟
𝒗𝑟
0
Where 𝜎𝑟 is the smallest eigenvalue. Now
𝑟
we have
Ax = 𝜎𝑖 𝒖𝑖 𝒗𝑖 𝑇 x
𝑖=1
If we choose 𝑥 = 𝒗𝑟 . Then since all 𝑣𝑖𝑇 𝑣𝑟 = 0 𝑖 ≠ 𝑟 we have
𝐴𝑥 = 𝐴𝑣𝑟 = 𝜎𝑟 𝒖𝑟 𝒗𝑟 𝑇 𝑣𝑟 = 𝜎𝑟 𝒖𝑟
Smallest value of Ax associate with 𝑥 = 𝒗𝑟 . And if 𝜎𝑟 = 0 then 𝒗𝑟 is an answer of
Ax=0
Pseudo inverse
• Assume 𝐴𝑥 = 𝑏, Then by singular value decomposition of A we have
𝐴𝑥 = 𝑏 ⇒ 𝑈Σ𝑉 𝑇 𝑥 = 𝑏
Σ𝑉 𝑇 𝑥 = 𝑈 𝑇 𝑏
𝑉 𝑇 𝑥 = Σ∗𝑈𝑇 𝑏
𝑥 = 𝑉Σ ∗ 𝑈 𝑇 𝑏
• 𝑉Σ ∗ 𝑈 𝑇 called the pseudo inverse of A . It is useful for finding inverse
of non-square matrices.
Applications
• One of the applications of SVD is dimensionality reduction.
• A 𝑚 × 𝑛 matrix can be thought of gray level of a digital image.
• If the image 𝐴 is decomposed to its singular values and vectors, we
can pick only the most significant 𝒖𝑖 ’s, 𝜎𝑖 ’s and 𝒗𝑖 ’s.
• By doing this we can compress the information of the image.
• Suppose the image 𝐴 is 𝑚 × 𝑛.
•𝐴= 𝐾 𝜎 𝒖
𝑖=1 𝑖 𝑖 𝑖𝒗 𝑇
• In next slide you will see the original image and its compressed up to
K most significant singular values.
16
Image compression using SVD
K=8 K=32
K=128 K=512
Original
17
550 CHAPTER 10 NUMERICAL METHODS
Definition of Dominant Let l1, l2, . . . , and ln be the eigenvalues of an n 3 n matrix A. l1 is called the
Eigenvalue and dominant eigenvalue of A if
Not every matrix has a dominant eigenvalue. For instance, the matrix
30 4
1 0
A5
21
(with eigenvalues of l1 5 1 and l2 5 21) has no dominant eigenvalue. Similarly, the
matrix
3 4
2 0 0
A5 0 2 0
0 0 1
(with eigenvalues of l1 5 2, l2 5 2, and l3 5 1) has no dominant eigenvalue.
3 14,
3
x5t t Þ 0.
SECTION 10.3 POWER METHOD FOR APPROXIMATING EIGENVALUES 551
...
xk 5 Axk21 5 A(Ak21x0) 5 Akx0.
For large powers of k, and by properly scaling this sequence, we will see that we obtain
a good approximation of the dominant eigenvector of A. This procedure is illustrated in
Example 2.
34
1
x0 5 .
1
We then obtain the following approximations.
Iteration Approximation
2 212 1 210
31 43 4 3 4 31.004
2.50
x1 5 Ax0 5 5 24
25 1 24
2 212 210
31 43 4 3 4 31.004
28 2.80
x2 5 Ax1 5 5 10
25 24 10
2 212 28 264
31 2543104 5 32224 31.004
2.91
x3 5 Ax2 5 222
2 212 264
53
1 25432224 3 464
463
1.004
136 2.96
x4 5 Ax3 5
2 212 2280
53 43 4 53 4 1903
1.004
568 2.99
x6 5 Ax5
1 25 294 190
552 CHAPTER 10 NUMERICAL METHODS
314,
3
Ax ? x lx ? x l(x ? x)
5 5 5 l.
x?x x?x x?x
In cases for which the power method generates a good approximation of a dominant
eigenvector, the Rayleigh quotient provides a correspondingly good approximation of the
dominant eigenvalue. The use of the Rayleigh quotient is demonstrated in Example 3.
Use the result of Example 2 to approximate the dominant eigenvalue of the matrix
2 212
A5 31 25
. 4
Solution After the sixth iteration of the power method in Example 2, we had obtained.
3 4 3 4
568 2.99
x6 5 < 190 .
190 1.00
2 212 26.02
31 4 31.004 5 322.014
2.99
Ax 5
25
Then, since
Ax ? x 5 (26.02)(2.99) 1 (22.01)(1) < 220.0
and
x ? x 5 (2.99)(2.99) 1 (1)(1) < 9.94,
we compute the Rayleigh quotient to be
Ax ? x 220.0
l5 < < 22.01,
x?x 9.94
which is a good approximation of the dominant eigenvalue l 5 22.
From Example 2 we can see that the power method tends to produce approximations
with large entries. In practice it is best to “scale down” each approximation before pro-
ceeding to the next iteration. One way to accomplish this scaling is to determine the com-
ponent of Axi that has the largest absolute value and multiply the vector Axi by the
reciprocal of this component. The resulting vector will then have components whose
absolute values are less than or equal to 1. (Other scaling techniques are possible. For
examples, see Exercises 27 and 28.
Calculate seven iterations of the power method with scaling to approximate a dominant
eigenvector of the matrix
3 4
1 2 0
A 5 22 1 2 .
1 3 1
Use x0 5 (1, 1, 1) as the initial approximation.
3 43 4 3 4
1 2 0 1 3
Ax0 5 22 1 2 1 5 1 ,
1 3 1 1 5
and by scaling we obtain the approximation
34 3 4
3 0.60
x1 5 15 1 5 0.20 .
5 1.00
554 CHAPTER 10 NUMERICAL METHODS
3 43 4 3 4
1 2 0 0.60 1.00
Ax1 5 22 1 2 0.20 5 1.00
1 3 1 1.00 2.20
and
3 4 3 4
1.00 0.45
1
x2 5 1.00 5 0.45 .
2.20
2.20 1.00
Continuing this process, we obtain the sequence of approximations shown in Table 10.6.
TABLE 10.6
x0 x1 x2 x3 x4 x5 x6 x7
3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4
1.00 0.60 0.45 0.48 0.51 0.50 0.50 0.50
1.00 0.20 0.45 0.55 0.51 0.49 0.50 0.50
1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
3 4
0.50
x 5 0.50 .
1.00
Using the Rayleigh quotient, we approximate the dominant eigenvalue of A to be l 5 3.
(For this example you can check that the approximations of x and l are exact.)
REMARK: Note that the scaling factors used to obtain the vectors in Table 10.6,
x1 x2 x3 x4 x5 x6 x7
↓ ↓ ↓ ↓ ↓ ↓ ↓
In Example 4 the power method with scaling converges to a dominant eigenvector. The
following theorem tells us that a sufficient condition for convergence of the power method
is that the matrix A be diagonalizable (and have a dominant eigenvalue).
Theorem 10.3 If A is an n 3 n diagonalizable matrix with a dominant eigenvalue, then there exists a
nonzero vector x0 such that the sequence of vectors given by
Convergence of the
Ax0, A2x0, A3x0, A4x0, . . . , Akx0, . . .
Power Method
approaches a multiple of the dominant eigenvector of A.
SECTION 10.3 POWER METHOD FOR APPROXIMATING EIGENVALUES 555
Proof Since A is diagonalizable, we know from Theorem 7.5 that it has n linearly independent
eigenvectors x1, x2, . . . , xn with corresponding eigenvalues of l1, l2, . . . , ln. We
assume that these eigenvalues are ordered so that l1 is the dominant eigenvalue (with a cor-
responding eigenvector of x1). Because the n eigenvectors x1, x2, . . . , xn are linearly
independent, they must form a basis for Rn. For the initial approximation x0, we choose a
nonzero vector such that the linear combination
x0 5 c1x1 1 c2x2 1 . . . 1 cnxn
has nonzero leading coefficients. (If c1 5 0, the power method may not converge, and a dif-
ferent x0 must be used as the initial approximation. See Exercises 21 and 22.) Now, multi-
plying both sides of this equation by A produces
l2 ln
3 1l 2 x 1l 2 x 4.
k k
Akx0 5 l1k c1x1 1 c2 2 1 . . . 1 cn n
1 1
Now, from our original assumption that l1 is larger in absolute value than the other eigen-
values it follows that each of the fractions
l2 l3 ln
, , ...,
l1 l1 l1
is less than 1 in absolute value. Therefore each of the factors
l2 k l3 k ln
1 2 1 2 1 2
k
, , ...,
l1 l1 l1
must approach 0 as k approaches infinity. This implies that the approximation
Akx0 < l1kc1x1, c1 Þ 0
The proof of Theorem 10.3 provides some insight into the rate of convergence of the
power method. That is, if the eigenvalues of A are ordered so that
|l | . |l | $ |l | $ . . . $ |l |,
1 2 3 n
556 CHAPTER 10 NUMERICAL METHODS
then the power method will converge quickly if l 2 y l 1 is small, and slowly if
| | | |
l 2 y l 1 is close to 1. This principle is illustrated in Example 5.
| | | |
EXAMPLE 5 The Rate of Convergence of the Power Method
36 4
4 5
A5
5
has eigenvalues of l1 5 10 and l2 5 21. Thus the ratio l 2 y l 1 is 0.1. For this
| | | |
matrix, only four iterations are required to obtain successive approximations that agree
when rounded to three significant digits. (See Table 10.7.)
TABLE 10.7
x0 x1 x2 x3 x4
...
31.0004 31.0004 31.0004 31.0004 31.0004 31.0004
1.000 0.500 0.941 0.715 0.714 0.714
...
In this section we have discussed the use of the power method to approximate the
dominant eigenvalue of a matrix. This method can be modified to approximate other eigen-
values through use of a procedure called deflation. Moreover, the power method is only
one of several techniques that can be used to approximate the eigenvalues of a matrix.
Another popular method is called the QR algorithm.
This is the method used in most computer programs and calculators for finding eigen-
values and eigenvectors. The algorithm uses the QR–factorization of the matrix, as pre-
sented in Chapter 5. Discussions of the deflation method and the QR algorithm can be
found in most texts on numerical methods.
SECTION 10.3 EXERCISES 557
3 4 3 4
In Exercises 1–6, use the techniques presented in Chapter 7 to find 0 0 6 0
the eigenvalues of the given matrix A. If A has a dominant eigen- 17. A 5 2 7 0 18. A 5 0 24 0
value, find a corresponding dominant eigenvector. 1 2 21 2 1 1
23
30 4 3 4
2 1 0
1. A 5 2. A 5 C In Exercises 19 and 20, the given matrix A does not have a domi-
24 1 3
nant eigenvalue. Apply the power method with scaling, starting
25 25 with x0 5 s1, 1, 1d, and observe the results of the first four iterations.
3 4 3 4
1 4
3. A 5 4. A 5
23 21 2 23
22
3 4 3 4
1 1 0 1 2
25 19. A 5 3 21 20. A 5 22 22
3 4 3 4
2 3 1 0 0 0 5
5. A 5 0 21 2 6. A 5 3 7 0 0 0 22 26 6 23
0 0 3 4 22 3 21. (a) Find the eigenvalues and corresponding eigenvectors of
21
322 4
In Exercises 7–10, use the Rayleigh quotient to compute the eigen- 3
A5 .
value l of A corresponding to the given eigenvector x. 4
25 23
32 4 34 31 4 3 4
4 5 2 3 21. (b) Calculate two iterations of the power method with scaling,
7. A 5 ,x5 8. A 5 ,x5
23 2 4 1 starting with x0 5 s1, 1d.
22 21. (c) Explain why the method does not seem to converge to a
3 4 34
1 2 1
9. A 5 22 5 22 , x 5 1 dominant eigenvector.
26 6 23 3 22. Repeat Exercise 21 using x0 5 s1, 1, 1d, for the matrix
23
3 4 34
3 2 3 23
3 4
0 2
10. A 5 23 24 9 ,x5 0 A5 0 21 0 .
21 22 5 1 0 1 22
C In Exercises 11–14, use the power method with scaling to approxi- C 23. The matrix
mate a dominant eigenvector of the matrix A. Start with
2 212
x0 5 s1, 1d and calculate five iterations. Then use x5 to approxi-
mate the dominant eigenvalue of A.
A5 31 25 4
21 has a dominant eigenvalue of l 5 22. Observe that Ax 5 lx
30 4 3 4
2 1 0
11. A 5 12. A 5 implies that
27 1 6
1
24 23 A21x 5 x.
322 4 322 4 l
1 6
13. A 5 14. A 5
8 1 Apply five iterations of the power method (with scaling) on
C In Exercises 15–18, use the power method with scaling to approxi- A21 to compute the eigenvalue of A with the smallest magni-
mate a dominant eigenvector of the matrix A. Start with tude.
x0 5 s1, 1, 1d and calculate four iterations. Then use x4 to approxi- C 24. Repeat Exercise 23 for the matrix
mate the dominant eigenvalue of A.
3 4
2 3 1
3 4 3 4
3 0 0 1 2 0 A5 0 21 2 .
15. A 5 1 21 0 16. A 5 0 27 1 0 0 3
0 2 8 0 0 0
558 CHAPTER 10 NUMERICAL METHODS
C 25. (a) Compute the eigenvalues of C In Exercises 27 and 28, apply four iterations of the power method
(with scaling) to approximate the dominant eigenvalue of the given
matrix. After each iteration, scale the approximation by dividing by
3 4 3 4
2 1 2 3
A5 and B 5 . its length so that the resulting approximation will be a unit vector.
1 2 1 4
24
3 4
25. (b) Apply four iterations of the power method with scaling to 7 2
3 4
5 6
each matrix in part (a), starting with x0 5 s21, 2d. 27. A 5 28. A 5 16 29 6
4 3
25. (c) Compute the ratios l2yl1 for A and B. For which do you 8 24 5
expect faster convergence?
26. Use the proof of Theorem 10.3 to show that
AsAkx 0d < l1sAkx 0d
for large values of k. That is, show that the scale factors
obtained in the power method approach the dominant eigen-
value.
Regression Analysis The least squares regression polynomial of degree m for the points {(x1, y1), (x2, y2),
. . . , (xn, yn)} is given by
for Polynomials
y 5 amxm 1 am21xm21 1 . . . 1 a2x2 1 a1x 1 a0,
where the coefficients are determined by the following system of m 1 1 linear equa-
tions.
na0 1 sS xida1 1
sS xi2da2 1 . . . 1 sS ximdam 5 S yi
sS xida0 1 sS xi2da1 1 sS xi3da2 1 . . . 1 sS xim11dam 5 S xiyi
sS xi2da0 1 sS xi3da1 1 sS xi4da2 1 .. . . 1 sS xim12dam 5 S xi2yi
.
.
.
sS xi da0 1 sS xi da1 1 sS xi da2 1 . . . 1 sS xi dam 5 S ximyi
m m11 m12 2m
[ ]
2
4 10
3
Solution:
2 3
A=
4 10
1
x0 =
1
1 st Iteration
2 3 1 5
Ax 0 = =
4 10 1 14
2 nd Iteration
2 3 0.35714 3.71429
Ax 1 = =
4 10 1 11.42857
3 rd Iteration
2 3 0.325 3.65
Ax 2 = =
4 10 1 11.3
4 th Iteration
2 3 0.32301 3.64602
Ax 3 = =
4 10 1 11.29204
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here
https://atozmath.com/example/MatrixEv.aspx?q=powermethod&q1=E1 2/3
9/15/23, 9:54 AM Power Method for finding dominant eigenvalue Example [[8,-6,2],[-6,7,-4],[2,-4,3]]
[ ]
8 -6 2
-6 7 -4
2 -4 3
Solution:
8 -6 2
A= -6 7 -4
2 -4 3
1
x0 = 1
1
1 st Iteration
8 -6 2 1 4
Ax 0 = -6 7 -4 1 = -3
2 -4 3 1 1
2 nd Iteration
8 -6 2 1 13
Ax 1 = -6 7 -4 -0.75 = -12.25
2 -4 3 0.25 5.75
3 rd Iteration
8 -6 2 1 14.53846
Ax 2 = -6 7 -4 -0.94231 = -14.36538
2 -4 3 0.44231 7.09615
4 th Iteration
8 -6 2 1 14.90476
Ax 3 = -6 7 -4 -0.9881 = -14.86905 ( Enter your problem )
2 -4 3 0.4881 7.41667
https://atozmath.com/example/MatrixEv.aspx?q=powermethod&q1=E2 2/4
9/15/23, 9:54 AM Power Method for finding dominant eigenvalue Example [[8,-6,2],[-6,7,-4],[2,-4,3]]
7.41667 0.4976
5 th Iteration
8 -6 2 1 14.98083
Ax 4 = -6 7 -4 -0.9976 = -14.97364
2 -4 3 0.4976 7.48323
6 th Iteration
8 -6 2 1 14.99616
Ax 5 = -6 7 -4 -0.99952 = -14.99472
2 -4 3 0.49952 7.49664
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here
1. Example
[ ]
2
4 10
3
3. Ex
(Previous example)
NOW
PLAYING
https://atozmath.com/example/MatrixEv.aspx?q=powermethod&q1=E2 3/4