Sunteți pe pagina 1din 9

SOLUTION OF

SYSTEM OF LINEAR
EQUATIONS
Lecture 3: Crout's method or
LU decomposition method.
Crout's Method (LU Decomposition method)

It is a distinct method of solving a system of linear equations of the form Ax  b,

where the matrix A is decomposed into a product of a lower triangular matrix L


and an upper triangular matrix U, that is A  LU
Explicitly, we can write it as

 a11 a12 a13 ..... a1n   l11 0 0 ..... 0   1 u12 u13 ..... u1n 
   
 a21 a22 a23 ..... a2 n   l21 l22 0 ..... 0   0 1 u23 ..... u2n 

 ... ... ... ... ...   ... ... ... ... ...   ... ... ... ... ... 
    
a
 n1 an 2 an 3 ..... ann   ln1 ln 2 ln 3 ..... lnn   0 0 0 ..... 1 

Therefore, by LU-decomposition, the system of linear equations A x  b can be


solved in three steps:
I. Construct the lower triangular matrix L and upper triangular matrix U.
II. Using forward substitution, solve L y  b
III. Solve U x  y , backward substitution.
We further elaborate the process by considering a 3×3 matrix A. We consider
solving the system of equation of the form A x  b , where,

 a11 a12 a13   x1   b1 


     
A   a21 a22 a23  , x   x2  and b   b2  .
a a33  x  b 
 31 a32  3  3
The matrix A is factorized as a product of two matrices L (lower triangular
matrix) and U (upper triangular matrix) as follows:

 l11 0 0   1 u12 u13   a11 a12 a13 


    
 l21 l22 0 0 1 u23    a21 a22 a23 
l
 31 l32 l33   0 0 1   a31 a32 a33 
 l11 l11u12 l11u13   a11 a12 a13 
   
l21 l21u12  l22 l21u13  l22 u23    a21 a22 a23 
 
 l31 l31u12  l32 l31u13  l32 u23  l33   a31 a32 a33 

This implies
l11  a11 , l21  a21 , l31  a31 ;
a12 a12
l11u12  a12  u12   ;
l11 a11
a13 a13
l11u13  a13  u13   ;
l11 a11
l21u12  l22  a22  l22  a22  l21u12 ;
1
l21u13  l22 u23  a23  u23   a23  l21u13  ;
l22
l31u12  l32  a32  l32  a32  l31u12 ;
l31u13  l32 u32  l33  a33  l33  a33  l31u13  l32u23

Once all the value of lij's and uij's are obtained, we can write
Ax  b as LU x  b

Let U x  y , then L y  b
 l11 0 0   y1   b1 
    
  l21 l22 0   y2    b2 
l l33   y3   b3 
 31 l32

 l11 y1   b1 
   
 l21 y1  l22 y2    b2 
 l y l y l y  b 
 31 1 32 2 33 3   3

b1 1 1
 y1  , y2   b2  l21 y1  and y3   b3  l31 y1  l32 y2 
l11 l22 l33
By forward substitution we obtain, U x  y

 1 u12 u13   x1   y1 
    
 0 1 u23   x2    y2 
0 0 1    
  x3   y3 
By back substitution we get,
x3  y3
x2  u23 x3  y2  x2  y2  u23 x3
x1  u12 x2  u13 x3  y1  x1  y1  u12 x2  u13 x3

Example 4. Solve the following system of linear equations, by Crout's method:

10 x1  3x2  4 x3  15
2 x1  10 x2  3x3  37
3x1  2 x2  10 x3  10

Solution: In matrix form, the given system of equation can be written as

10 3 4   x1   15 
    
 2 10 3 x
 2    37 
3 2 10   x3   10 
   

which is of the form A x  b . Let A =LU, which implies

 10 3 4   l11 0 0   1 u12 u13 


    
 2 10 3    l21 l22 0 0 1 u23 
3 2 10   l31 l32 l33   0 0 1 

 l11 l11u12 l11u13 


 
  l21 l21u12  l22 l21u13  l22 u23 
l l31u13  l32 u23  l33 
 31 l31u12  l32
3 4
 l11  10, l21  2, l31  3; u12 , u13  ;
10 10
3 106
l21u12  l22  10  l22  10  2   ;
10 10
 4 
 3  2  10 
l21u13  l22 u23  3  u23      11 ;
 106  53
  10 
 
3 11
l31u12  l32  2  l32  2  l31u12  2  3   ;
10 10

l31u13  l32 u23  l33  10  l33  10  l31u13  l32 u23
4 11 11 1163
 10  3    
10 10 53 106
Therefore, we get,

   3 4 
 1
 10 0 0  10 10 
   
106 11 
L 2 0  and U   0 1
 10   53 
   
 3 11 1163  0 0 1 
 
 10 106   
Now, let U x  y , then L y  b implies
 
 10 0 0 
   y1   15 
2 106    
0   y2    37 
 10 
  y   10 
 3 11 1163   3   

 10 106 
3
10 y1  15  y1 
2
106 170
2 y1  y2  37  y2 
This implies 10 53
11 1163
y1  y2  y3  10  y3  1
10 106
 32 
 170 
Thus, y   53  and U x  y gives
 
 1 
 3 4   3 
1 
10 10  x   y   2 
  1 1  
0 11       170  , which implies
1 x2  y 2 
 53       53 
  x  
1   3  3  1 
y
0 0
   
   
3 4 3
x1  x2  x3 
10 10 2
11 170
x2  x3 
53 53
x3  1
By back substitution, we get,

x3  1
11  1 170
x2    3
53 53
3 3 4 3 3 4
x1   x2  x3     3   1  2
2 10 10 2 10 10

Therefore, the required solution by Crout's method (LU decomposition method) is


x1  2, x2  3, x3  1.
Example 5. Solve the following system of linear equations by Crout's Method (LU
factorization or decomposition method):

9 x1  3x2  3x3  3x4  24


3x1  10 x2  2 x3  2 x4  17
3x1  2 x2  18 x3  10 x4  45
3x1  2 x2  10 x3  10 x4  29

Solution: The given system of equation can be written in matrix form as

 9 3 3 3   x1   24 
    
 3 10 2 2   x2    17 
 3 2 18 10   x3   45 
    
 3 2 10 10   x4   29 

 9 3 3 3   l11 0 0 0   1 u12 u13 u14 


    
 3 10 2 2   l21 l22 0 0 0 1 u23 u24 
Let 
 3 2 18 10   l31 l32 l33 0 0 0 1 u34 
    
 3 2 10 10   l41 l42 l43 l44   0 0 0 1 
Comparing, we get,

l11  9, l21  3, l31  3, l41  3;


1 1
l11u12  3  u12  . Similarly, u13  u14  ;
3 3
1
l21u12  l22  10  l22  10  l21u 12  10  3   9
3
2  l21u13 1
l21u13  l22 u23  2  u23  
l22 3
2  l21u14 1
l21u14  l22 u24  2  u24  
l22 3
l31u12  l32  2  l32  2  l31u12  3
l31u13  l32u23  l33  18  l33  18  l31u13  l32 u23  16
10  l31u14  l32 u24 1
l31u14  l32 u24  l33u34  10  u34  
l33 2
l41u12  l42  2  l42  2  l41u12  3
l41u13  l42 u23  l43  10  l43  10  l41u13  l42u23  8
l41u14  l42 u24  l43u34  l44  10
 l44  10  l41u14  l42u24  l43u34  4

Therefore, we get
1 1 1 1 
9 0 0 0  3 3 3 
  0 1 1 1 
3 9 0 0
L and U   3 3 
 3 3 16 0  0 0 1 
  1
 2 
 3 3 8 4  0 0 1 
 0

Forward substitution gives


8
9 y1  24  y1 
3
3 y1  9 y2  17  y2  1
5
3 y1  3 y2  16 y3  45  y3 
2
3 y1  3 y2  8 y3  4 y4  29  y4  1

 83 
 
1
Thus, y    and U x  y gives
5 
 2 
1
1 1
3
1
3
1
3  1 
x  y1   8 3 
 1 1       
0 1 x y 1
3 3 2   2 
0 0 1 1  x 
3  y3   5 
 2
      2 
0 0 0 1   x4   y 4   1 
By back substitution we get,

x4  1
1 5
x3  x4   x3  2
2 2
1 1
x2  x3  x4  1  x2  2
3 3
1 1 1 8
x1  x2  x3  x4   x1  1
3 3 3 3

Therefore, the required solution by Crout's method is


x1  1, x2  2, x3  2, x4  1

S-ar putea să vă placă și