You are on page 1of 26

LU DECOMPOSITION

INTRODUCTION:
LU decomposition is a method to solve a system of
linear equations by converting the coefficient matrix
as a product of a lower triangular matrix(L) and a
upper triangular matrix(U).
PROCESS:

Suppose a system of linear equations in matrix


form is given by [A][X] = [C]
Where [A] is coefficient matrix
Now matrix [A] is written as
[A] = [L][U]

1 0 0 u11 u12 u13 


 A   LU   21 1 0  0 u22 u 23 
31 32 1  0 0 u33 
FINDING MATRICES L AND U
Method -1: Assume the remaining elements as some assumed variables, make
equations using A = L U and solve them by equating the corresponding elements
on both sides to find thosevariables.
Method – 2: The matrice U can be achieved by converting matrix A into echelon
form.
EXAMPLE:

 25 5 1  x1  106.8 
 64 8 1  x   177.2 
   2  
144 12 1  x3  279.2

In the above system of linear equations value of ‘x’ to be


found out using LU decomposition.
FINDING THE [U] MATRIX

 25 5 1
 64 8 1
 
144 12 1

Step-1:
 25 5 1 
64
 2.56; Row2  Row1 2.56   0  4.8  1.56
25
144 12 1 
25 5 1 
144
 5.76; Row3  Row1 5.76    0  4.8  1.56 
25
 0  16.8  4.76

Step -2:

25 5 1 
 16.8
 3.5; Row3  Row2 3.5   0  4.8  1.56
 4. 8
 0 0 0.7 
25 5 1 
U    0  4.8  1.56
 0 0 0.7 
FINDING THE [L] MATRIX
Let L matrix is

1 0 0
 0
 21 1
31 32 1

 25 5 1 a 21 64
From the first step of  64 8 1 21    2.56
a11 25
forward elimination  
144 12 1
a 31 144
31    5.76
a11 25
From the second
step of forward
elimination
25 5 1 
 0  4.8  1.56  a 32  16.8
32    3.5
  a 22  4.8
 0  16.8  4.76

 1 0 0
 L  2.56 1 0
5.76 3.5 1
USING LU DECOMPOSITION TO SOLVE THE SLES
NOW:

 1 0 0 25 5 1 
 A   LU   2.56 1 0  0  4.8  1.56
5.76 3.5 1  0 0 0.7 

Set [L][Z] = [C]


 1 0 0  z1  106.8 
2.56 1 0  z 2   177.2 

5.76 3.5 1  z3  279.2
SOLVE FOR [Z]

z1  10
2.56 z1  z2  177.2
5.76 z1  3.5 z 2  z3  279.2

z1  106.8
z 2  177.2  2.56 z1
 177.2  2.56106.8
 96.2
z3  279.2  5.76 z1  3.5 z 2
 279.2  5.76106.8  3.5  96.21
 0.735
 z1   106.8 
Hence  Z    z2    96.21
 z3   0.735 

Now set Set [U][X] = [Z]

25 5 1   x1   106.8 
 0  4.8  1.56  x    96.21
   2  
 0 0 0.7   x3   0.735 
Solve for [X]

The 3 equations become

25a1  5a2  a3  106.8


 4.8a2  1.56a3  96.21
0.7a3  0.735
From the 3rd equation
0.7 a3  0.735
0.735
a3 
0.7
a3  1.050
Substituting in a3 and using the second equation

 4.8a2  1.56a3  96.21

 96.21  1.56a3
a2 
 4.8
 96.21  1.561.050 
a2 
 4.8
a2  19.70
Substituting in a3 and a2 using the first equation

25a1  5a2  a3  106.8

106.8  5a2  a3
a1 
25
106.8  519.70  1.050

25
 0.2900

Hence the Solution Vector is:


 a1  0.2900
a    19.70 
 2  
 a3   1.050 
FINDING THE INVERSE OF A SQUARE MATRIX

The inverse [B] of a square matrix [A] is


defined as
[A][B] = [I] = [B][A]
How can LU Decomposition be used to find the inverse?
Assume the first column of [B] to be [b11 b12 … bn1]T
Using this and the definition of matrix multiplication

First column of [B] Second column of [B]

b11  1  b12  0


b  0  b  1 
 A  21      A  22    
         
       
bn1  0 bn 2  0

The remaining columns in [B] can be found in the same manner


CHOLESKY DECOMPOSITION

A = [L][*L]T
REFERENCES:-
 https://
www.sciencedirect.com/topics/engineering/cholesky
-decomposition
 http://numericalmethods.eng.usf.edu
THANK YOU

You might also like