Sei sulla pagina 1di 7

THE SOLUTION OF LINEAR SYSTEMS AX  B

DIRECT METRHOD

TRIANGULAR FACTORIZATION

Definition : The nonsingular matrix A has a triangular factoization if it can be expressed as the
product of a lower- triangular matrix L and an upper-triangular matrix U .

A  LU ..................................(1)

In the matrix form, this is written as (consider 3x3 matrix)

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


    
A   a21 a22 a23    l21 l22 0  0 u22 u23 
a a33   l31 l33   0 u33  (Note: Assume value of uii  1 or lii  1 )
 31 a32 l32 0

L U

For the solution of linear system using LU decomposition method is as follows

Ax  b
………(2)
( LU ) x  b

Solution of (2) is as follows

 Solve y using forward substitution Ly  b

 Solve x using backward substitution Ux  y

Note: if A  AT ( A is symmetric) then LU  LLT

1
CROUT DECOMPOSITION

Given Ax  b ,

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


    
A   a21 a22 a23    l21 l22 0 0 1 u23 

 a31 a32 a33   l31 l32 l33   0 0 1 

L U

Then, find elements of LU matrices

l11  a11
a12
l11u12  a12  u12 
l11
a13
l11u13  a13  u13 
l11

l21  a21
l21u12  l22  a22  l22  a22  l21u12
a23  l21u13
l21u13  l22 u23  a23  u23 
l22

l31  a31
l31u12  l32  a32  l32  a32  l31u13
l31u13  l32 u23  l33  a33  l33  a33  l31 u13  l32 u23

Example: Solve

2 x1  5 x2  x3  12
 x1  3 x2  x3  8
3 x1  4 x2  2 x3  16

using LU decomposition method

2
Solution:

 2 5 1   x1   12 
    
Ax  b   1 3 1   x 2    8 
 3 4 2   x   16 
  3   

Find LU matrices

 2 5 1   l11 0 0   1 u12 u13 


    
 1 3 1    l21 l22 0  0 1 u23 
 3 4 2   l l33   0 0 1 
   31 l32

L U

l11  2
5
l11u12  5  u12 
2
1
l11u13  1  u13 
2

l21  1
5 1
l21u12  l22  3  l22  3  
2 2
 1
1   (1)  
l21u13  l22 u23  1  u23   2
 1
1
2

l31  3

 5  7
l31u12  l32  4  l32  4   3   
 2  2
3 7
l31u13  l32 u23  l33  2  l33  2   4
2 2

3
 2 0 0   1 5 1 
  2 2
L   1 1 2 0  U  0 1 1 
   
 3 7  0 0 1 
 2 4  

Solve

 2 0 0   y   12 
 1
 1 1     
Ly  b
 2 0   y2     8  
 3 7 4   y3   16 
 2 

2 y1  12  y1  6
1
 y1  y2   8  y2   4
2
7
3 y1  y2  4 y3  16  y3  3
2

Solve Ux  y

 1 5 1 
 2 2   x1   6 
0    
1 1   x 2    4  
 
0 0 1   x3   3 
 

x3  3
x2  x3  4  x2  1
5 1
x1  x2  x3  6  x1  2
2 2
Solution set
 x1 , x2 , x3    2, 1, 3 

4
CHOLESKY DECOMPOSITION

Given Ax  b , if A  AT ( A is symmetric) then we can decompose as follows

 a11 a12 a13   l11 0 0   l11 l21 l31 


    
A  LL   a21
T
a22 a23    l21 l22 0  0 l22 l32  where, a21  a12 , a31  a13 , a32  a23
a a33   l31 l33   0 l33 
 31 a32 l32 0

L LT

a12
2
l11  a11  l11  a11 , l11l21  a12  l21 
l11
a13
l11l31  a13  l31  , 2
l21  l22
2
 a22  l22  a22  l21
2
l11
a23  l21l31
l21l31  l32 l22  a23  l32  , 2
l31  l32
2
 l33
2
 a33  l33  a33  l31
2
 l32
2
l22

Example : Solve the system of equations

4x  y  8
 x  4 y  z  3
 y  4z  4

by using LLT or LU decomposition

Solution: Matrix form of given linear system is

 4 1 0   x   8 
    
 1 4 1   y    3 
 0 1 4   z   4 
    

A x b

Where A  AT ( A is symmetric) use LLT

5
 4 1 0   l11 0 0   l11 l21 l31 
    
 1 4 1    l21 l22 0  0 l22 l32 
 0 1 4   l l33   0 l33 
   31 l32 0

1
2
l11  4  l11  2 , l11l21  1  l21 
2
1 15
l11l31  0  l31  0 , 2
l21  l22
2
 4  l22  4  
4 2
2 4 56
l21l31  l32 l22  1  l32  , 2
l31  l32
2
 l33
2
 4  l33  4  0  
15 15 15

 2 0 0
 
L   1 15 0 
 2 2 
 0 2 15 56 15 

Solve Ly  b

 2 0 0  y
  1   8 
 1 15 0   y2     3 
 2 2     
 0 2 15 56 15   y3   4 

2 56
y1  4 , y2  and y3  (exercise )
15 15

Solve LT x  y

 
2 1 0   
4 
 2  x 
 15    2 
0 2 2 15   y    
    15 
0 0 56 15   z   56 
   
 15 

x  2 , y  0 and z  1 (exercise )

EXERCISE
6
Q-1) Solve the following linear equations using LU decomposition for the matrix A such that
uii  2 for i  1, 2, 3

 6 10 0   x   1 
    
 12 26 4   y    1 
 0 9 12   z   0 
    

Q-2) Find an LU matrix decomposition for the following matrix provided that
lii  0.5 for i  1, 2, 3 where

 0.5 1 2 
 
A   1 2 5
 2 4 7
 

Q-3) Solve the following set of linear equations using LU decomposition method.

4 x1  2 x2  4
2 x1  4 x2  2 x3  2
2 x2  4 x3  1

Q-4) Solve the following set of linear equations using LU decomposition method.

x  3z  5
3 x  y  6 z  12
5 x  2 y  z  8

Potrebbero piacerti anche