Linear Algebraic Equations:: Lu Decomposition
Linear Algebraic Equations:: Lu Decomposition
LU DECOMPOSITION
Chapter 3
Representing Linear Algebraic Equations
in Matrix Form
[ A]{ X } = {B}
LU DECOMPOSITION
• By using this method, system of linear equations
[A]{x}={b} will be transformed to [L][U]{x}={b} where
[L] is a lower triangular matrix and [U] is an upper
triangular matrix.
• In this course, 4 methods to decompose matrix A into
matrix L and U will be discussed which are :
(i) Gauss Elimination Method
(ii) Doolittle Method
(iii) Crout Method
(iv) Cholesky Method
LU DECOMPOSITION
3x1 − x 2 + 2 x3 = 12
x1 + 2 x 2 + 3x3 = 11
2 x1 − 2 x 2 − x3 = 2
SOLUTION 1
Step 1: Convert the system of linear equations into the matrix form,
[ A]{ x} = { b}.
3 − 1 2 x1 12
1 2
3 x 2 = 11
2 − 2 − 1 x3 2
SOLUTION 1
Step 2: Decompose [A] into [L] and [U] using Doolittle formula.
u11 = 3
u12 = −1
u13 = 2
1
1 = l 21 ( 3) → l 21 = = 0.3333
3
2 = ( 0.3333)( − 1) + u 22 → u 22 = 2.3333
3 = ( 0.3333)( 2 ) + u 23 → u 23 = 2.3334
2
2 = l31 ( 3) → l 31 = = 0.6667
3
− 1.3333
− 2 = ( 0.6667 )( − 1) + l32 ( 2.3333) → l32 = = −0.5714
2.3333
− 1 = ( 0.6667 )( 2 ) − ( 0.5714 )( 2.3334 ) + u 33 → u 33 = −1.0001
SOLUTION 1
Step 2: Decompose [A] into [L] and [U] using Doolittle formula.
3 − 1 2
1 2 3 = [ L][U ]
2 − 2 − 1
1 0 0 3 −1 2
= 0.3333 1 0 0 2.3333 2.3334
0.6667 − 0.5714 1 0 0 − 1.0001
SOLUTION 1
Step 3: Solve [ L ]{ y} = { b} using forward substitution.
1 0 0 y1 12
0.3333 1 0 y = 11
2
0.6667 − 0.5714 1 y 3 2
y1 = 12
0.3333(12 ) + y 2 = 11 → y 2 = 7.0004
2 x1 + 5 x2 + 8 x3 = 36
4 x1 + 8 x2 − 12 x3 = −16
x1 + 8 x2 + x3 = 20
Exercise 1
Solve the following system using Doolittle
and Cholesky methods. The exact
solution is given and compare the true
error between the methods.
5 x1 + 3x2 + x3 = 9 x1 = 1
3 x1 + 6 x2 + 2 x3 = 11 x2 = 1
x1 + 2 x2 + 7 x3 = 10 x = 1
3