MAT3005 - Applied Numerical Methods

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

MAT3005 - Applied Numerical Methods

Dr. A Subramanyam Reddy


Department of Mathematics
School of Advanced Sciences
VIT, Vellore

anala.subramanyamreddy@gmail.com
subramanyam.a@vit.ac.in
Symmetric matrix eigenvalues
1

I We know that if A is symmetric matrix then its eigenvalues are real and
its eigenvectors (of distinct eigenvalues) are orthogonal.
I This property of symmetric matrices can be useful in diagonalizing the
matrix A.
I Diagnalization is the process of converting a given square matrix into a
diagonal matrix in which the diagonal entries are nothing but the
eigenvalues of A.
I For diagonalizing a matrix A we find a matrix P such that

D = P−1 AP.

I If A is symmetric then we have D = PT AP.


I The Jacobi method is based on the diagonalization process.

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Jacobi method
2

I In this method we start with a orthogonal matrix called as Jacobi or


Givens rotation, which is choosen to elimate the off-diagonal elements
while preserving the eigenvalues.
I The Jacobi (or) Givens rotation matrix is given by
 
1 ... 0 ... 0 ... 0
 .. . . .. .. .. 
.
 . . . . 
0 . . .
 c ... −s . . . 0 
P =  ... .. .. .. .. 

 . . . .
0 . . .
 s ... c ... 0 
. .. .. .. .. 
 .. . . . .
0 ... 0 ... 0 ... 1

where c = cos θ; s = sin θ

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Jacobi method
3

For finding θ let us proceed forward like this: Let us consider


 
aii aij
A=
aji ajj

We proceed to find an orthogonal matrix of the form


 
cos θ − sin θ
S=
sin θ cos θ

such that S−1 AS is a diagonal matrix.

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Jacobi method
4

     
−1 cos θ sin θ aii aij cos θ − sin θ
S AS =
− sin θ cos θ aji ajj sin θ cos θ
a cos2 θ + ajj sin2 θ + aij sin 2θ aij cos 2θ + 21 (ajj − aii ) sin 2θ
 
= ii
aji cos 2θ + 21 (ajj − aii ) sin 2θ aii sin2 θ + ajj cos2 θ − aij sin 2θ
This matrix reduces to diagonal matrix if
1
aij cos 2θ + (ajj − aii ) sin 2θ = 0
2
i.e.,  
2aij 1 2aij
tan 2θ = =⇒ θ = tan−1
aii − ajj 2 aii − ajj

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Steps in Jacobi Method:
5

1. Start with the given symmetric matrix A. Find the largest off-diagonal
element (in magnitude) of A, find the θ and obtain the Givens
(orthogonal) rotation matrix P1 .
2. Compute A1 = P−1 T
1 AP1 = P1 AP1 .
3. Next for the matrix A1 , find the largest off-diagonal element (in
magnitude), find the θ and obtain the Givens (orthogonal) rotation
matrix P2 .
4. Compute A2 = P−1 T
2 A 1 P2 = P2 A 1 P2 .
5. Repeat the above steps until at the nth step we obtain a matrix An ,
which is a diagonal matrix.
6. The diagonal elements of the matrix An are the eigenvalues of A.
7. The corresponding eigenvectors are nothing the columns of the matrix
P = P1 P2 . . . Pn .

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Problem
6

Problem
Find 
all the eigenvalues
√  and eigenvectors of the matrix
√ 1 2 √2
A =  2 √3 2 using Jacobi’s method.
2 2 1

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Solution
7

Iteration #1: The largest off-diagonal entry is: a13 = 2 = a31 . Here,
a11 = 1 = a33 . So, θ = π4 = 0.7854.
Orthogonal rotation matrix is
   
cos θ 0 − sin θ 0.7071 0 −0.7071
P1 =  0 1 0 = 0 1 0 
sin θ 0 cos θ 0.7071 0 0.7071

Therefore, the transformed matrix is


 
3 2 0
A1 = P−1
1 AP1 = P T
1 AP1 =  2 3 0
0 0 −1

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Solution
8

Iteration #2: The largest off-diagonal entry is: a12 = 2 = a21 . Here,
a11 = 3 = a22 . So, θ = π4 = 0.7854.
Orthogonal rotation matrix is
   
cos θ − sin θ 0 0.7071 −0.7071 0
P2 =  sin θ cos θ 0 = 0.7071 0.7071 0
0 0 1 0 0 1

The transformed matrix is



5 0 0
A2 = P−1 T
2 A1 P2 = P2 A1 P2 = 0
 1 0
0 0 −1

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Solution
9

Therefore, the eigenvalues are: 5, 1, −1.


The eigenvectors are
 
0.5000 −0.5000 −0.7071
P = P1 P2 =  0.7071 0.7071 0 
0.5000 −0.5000 0.7071

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods


Exercise Problems
10

Problem
 
2 −3 2
Find all the eigenvalues and eigenvectors of the matrix A = −3 1 2
2 2 2
using Jacobi’s method.

Problem
Find 
all the eigenvalues
 and eigenvectors of the matrix
1 2 −3
A= 2 1 −1  using Jacobi’s method.
−3 −1 2

Dr. A Subramanyam Reddy | MAT3005 - Applied Numerical Methods

You might also like