You are on page 1of 24

Module-2

System of Linear Equations and Eigen Value Problems

Important Numerical Methods in Module-I:


(1) For System of Linear Equations:
(a) Gauss –Seidel iteration method,
(b) LU Decomposition Method
(c) Tri diagonal system of equations-Thomas algorithm
(2) For Eigen Value Problems:
(a) Power method
(b) Jacobi Method
Gauss Seidel Method

Scanned by CamScanner
Scanned by CamScanner
Q.2.

Solution.

Convergence condition:

a11  a12  a13  27  6  1  7



a22  a21  a23   15  6  2  8

a33  a31  a32  54  1  1  2

Convergence condition satisfied.

Therefore, the Gauss-Seidel formula is given by

x ( n1) 
1
27
 85  6 y ( n )  z ( n ) 

y ( n1)   72  6 x ( n1)  2 z ( n )  ,
1
n  0,1,2,3,4...
15
z ( n1)  110  x ( n1)  y ( n1) 
1
54
First iteration: For n=0, taking, x(0)  0, y (0)  0, z (0)  0 as a initial iteration.

x (1) 
1
27
 85  6 y (0)  z (0)    85  6  0  0   3.1481
1
27
y (1)   72  6 x (1)  2 z (0)    72  6  3.1481  2  0   3.5408
1 1
15 15
z (1)  110  x (1)  y (1)   110  3.1481  3.5408   1.9132
1 1
54 54
Second iteration: x(1)  3.1481, y (1)  3.5408, z (1)  1.9132

x (2) 
1
27
 85  6 y (1)  z (1)   2.4322

y (2)   72  6 x (2)  2 z (1)   3.572


1
15
z (2)  110  x (2)  y (2)   1.9258
1
54
Third iteration: x(2)  2.4322, y (2)  3.572, z (2)  1.9258

x (3) 
1
27
 85  6 y (2)  z (2)   2.4257

y (3)   72  6 x (3)  2 z (2)   3.5729


1
15
z (3)  110  x (3)  y (3)   1.926
1
54
Forth iteration: x(3)  2.4257, y (3)  3.5729, z (3)  1.926

x (4) 
1
27
 85  6 y (3)  z (3)   2.4255

y (4)   72  6 x (4)  2 z (3)   3.573


1
15
z (4)  110  x (4)  y (4)   1.926
1
54
Exercise:
Crout's Method (LU Decomposition Method)

Scanned by CamScanner
Scanned by CamScanner
LU decomposition method (Crout’s method):

1. Solve the following system of equations using LU decomposition method.

x  y  z  9 ; 2 x  3 y  4 z  13 ; 3x  4 y  5z  40 .
Solution: The given system of equations can be written as

AX  B -------------------- (1)

1 1 1  x 9
   
where A   2 3 4  , X   y  , B  13 
 3 4 5   z   40 
Let A  LU ---------------------------------------------------------------------- (2)

 l11 0 0 1 u12 u13 


where L  l21 l22 0  and U  0 1 u23 
l31 l32 l33  0 0 1 
Then LU  A gives

 l11 l11u12 l11u13  1 1 1 


l l21u13  l22u23    2 3 4 
 21 l21u12  l22
l31 l31u12  l32 l31u13  l32u23  l33   3 4 5 

Equating the elements of the matrix, we have

12
l11  1, l21  2, l31  3, l22  5, l32  1, l33  ,
5
2
and u12  1, u13  1, u23  . .
5

 
1 0 0 1 1 1 
   2 
Therefore L   2 5 0  and U  0 1 .
  5 
12  0
 3 1   0 1 
 5
Now substituting A  LU in (1) we get LU X B ----------------------- (3)

r 
Let U X  M B1   s  say.
B1 where M
 t 

Therefore, from (3) we have L M


B1  B .
 
1 0 0 r   9 
   s   13 
i,e.,  2 5 0     
 12   t   40 
3 1 
 5

which gives r  9, s  1, t  5 .
1 1 1 
9     x  9 
2     
M1  1  .
Therefore, B Now, B1   0 1
U X M y  1
 5    
5  0 0  z  5 
 1     

which implies that x  y  z  9, y  2 z  1, z  5 .


5
Hence the required solution of the given system is x  1, y  3, z  5 .

2. Solve the following system of equations using LU decomposition method.

(i) 2 x  6 y  8z  24 ; 5x  4 y  3z  2 ; 3x  y  2 z  16 .
(ii) x  y  2 ; 2x  3 y  5 .
(iii) x  5 y  z  21 ; 2 x  y  3z  20 ; 3x  y  4 z  26 .

Tri-diagonal System of equations-Thomas Algorithm:

The system of equations of the form


a11x1  a12 x2  d1
a21x1  a22 x2  a23 x3  d2 ---------------------- (1)
a32 x2  a33 x3  a34 x4  d3
a43 x3  a44 x4  d4
is called a Tri-diagonal system in four variables.

System of equations (1) can be written as

 a11 a12 0 0   x1   d1 
   x  d 
 a21 a22 a23 0   2   2
 0 a32 a33 a34   x3   d3 
     
 0 0 a43 a44   x4   d 4 

It can also be written as


Where, Solving (3), we get
the solution of (1).
Exercise:
Eigen Values and Eigen Vectors of Square Matrix
Eigen Value & Eigen Vector:

Trace of Matrix: Trace (A) = Sum of diagonal elements = Sum of all Eigen values of A

1
Note: If  is an Eigen value of A then, is Eigen value of A-1

1
If  is an Eigen value of A-1 then, is Eigen value of A

Power Method to find largest Eigen Value

Scanned by CamScanner
Scanned by CamScanner
1. Determine the largest eigen value and the corresponding eigen vector of the matrix

1 2 3
 
A   0 4 2  and hence find the remaining eigen values of A .
0 0 7
 
0
 
Solution: Let X 10   0  be the initial eigen vector of A .
1
 

 1 2 3  0   3   0.43 
      
Then AX10   0 4 2  0    2   7  0.29  .
 0 0 7  1   7   1 
      

 0.43   1 2 3  0.43   4.01   0.57 


        
Let X21   0.29  . Then AX 21   0 4 2  0.29    0.84   7  0.12  .
 1   0 0 7  1   7   1 
        

 0.57   1 2 3  0.57   3.81  0.54 


        
Let X 32   0.12  . Then AX 32   0 4 2  0.12   1.52   7  0.22  .
 1   0 0 7  1   7   1 
        

 0.54   1 2 3  0.54   3.98   0.57 


        
Let X 43   0.22  . Then AX 34   0 4 2  0.22    1.12   7  0.16  .
 1   0 0 7  1   7   1 
        

 0.57   1 2 3  0.57   3.89   0.56 


        
Let X54   0.16  . Then AX 54   0 4 2  0.16    1.36   7  0.19  .
 1   0 0 7  1   7   1 
        

 0.56   1 2 3  0.56   3.94   0.56 


        
Let X65   0.19  . Then AX 65   0 4 2  0.19    1.24   7  0.18  .
 1   0 0 7  1   7   1 
        

 0.56 
 
Let X 67   0.18  . Since X 67 is very close to X65 , the largest eigen value is   7 and the
 1 
 
 0.56 
 
corresponding eigen vector is  0.18  .
 1 
 
For smallest Eigen value of A, we find largest Eigen value of A-1

 1 1 / 2 4 / 7  1
Then A1   0 1 / 4 1 / 14  , let X 1   0 
0 1 / 7  0
 0  

 1 1 / 2 4 / 7  1   1   1 
Now, A1 X 1   0 1 / 4 1 / 14      
 0    0   1 0   1 X 2 .
0 1 / 7      
 0  0   0   0 

1
Here, X 1  X 2   0  , then the largest Eigen value of A-1 is 1 =1.
0
 

Therefore, the smallest Eigen value of A is 1/ 1  1/ 1  1.

We know that ,

Trace(A) = Sum of diagonal elements of A = Sum of all Eigen values of A

1–4+7=7+1+  =-4

The Eigen values of A are 1, – 4, 7.

Exercise:
1

2 2

3 3

4 4

5 5

6 6

7 7 6
Jacobi's Method to find Eigen values and Eigen Vectors:

Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
 cos 0 sin  
S   0 1 0  ,
  sin  0 cos 

2aij 2a13 2 2 4  
Then tan         tan  
aii  a jj a11  a33 1  1 0 2 4

 1/ 2 0 1/ 2 
  
After putting   in S we get S   0 1 0  . Therefore,
4  
 1 / 2 0 1 / 2 

A1=S-1 AS =

 cos sin  0
S1    sin  cos 0  ,
 0 1 
 0

2aij 2a21 2 2 4  
Then tan         tan  
aii  a jj a22  a11 3  3 0 2 4

 1/ 2 1/ 2 0
 
S1   1 / 2 1 / 2 0 
 0 1 
 0
 
A2=S1-1 A1S1 =

Exercise:

2 2 
1. Find Find all eigen values and eigen vectors of the matrix A    using
 2 1
Jacob’s method.

 cos sin  
Note: For 2X2 matrix we write S as S  
  sin  cos 

You might also like