LU Decomposition Method
LU Decomposition Method
LU Decomposition Method
LU Decomposition Method
Ax=b------------------1
A=LU------------------2
[ ] [ ] [
A= a21 a22 a23 , L= l 21 l 22 0 , U = 0 1 u23
a31 a32 a33 l 31 l 32 l 33 0 0 1 ]
From 1 and 2, (LU) x=b, LU x=b
Ly=b-------------3
Y=U x--------------4
1 2 3 x1 5
[ ][ ] [ ]
2 −4 6 x 2 = 18
3 −9 −3 x 3 6
From 1, Ax=b
1 2 3 x1 5
[
3 −9 −3 x3 ] [] []
A= 2 −4 6 , X= x2 and b= 18
6
l 11 0 0 1 u12 u13
[ ] [
L= l 21 l 22 0 , U = 0 1 u23
l 31 l 32 l 33 0 0 1 ]
From 2, A=LU
1 2 3 l 11 0 0 1 u12 u13
[ 2 −4 6
3 −9 −3
=
][ ][
l 21 l 22 0 0 1 u23
l 31 l 32 l 33 0 0 1 ]
First Row
Second Row
1 2 3 l 11 0 0 1 u12 u13
[ ][ ][
2 −4 6 = l 21 l 22 0 0 1 u23
3 −9 −3 l 31 l 32 l 33 0 0 1 ]
2=l 21∗1+0+0 , l 21=2
Third Row
l 31=3
l 32=−15
l 33=−12
1 0 0 1 2 3
[
L= 2 −8 0 ,U= 0 1 0
3 −15 −12 0 0 1 ] [ ]
From 3, Ly=b
1 0 0 y1 5
[ 2 −8 0 y2
3 −15 −12 y 3
=
][ ] [ ]
18
6
Y1=5
2y1-8y2=18 y2=-1
3y1-15y2-12y3=6 Y3=2
From 4, Y=Ux
5 1 2 3 x1
[ ] [ ][ ]
−1 = 0 1 0 x2
2 0 0 1 x3
x1+2x2+3x3=5
Q2
From 1, Ax=b
0.2425 0 x1 247
] [] [ ]
−0.9701
A=
[0 0.2425 −0.9701 , X= x2 and
−0.2357 −0.2357 −0.9428 x3
b= 248
239
l 11 0 0 1 u12 u13
[ ] [
L= l 21 l 22 0 , U = 0 1 u23
l 31 l 32 l 33 0 0 1 ]
From 2, A=LU
][ ][ ]
−0.9701
[ 0 0.2425 −0.9701
−0.2357 −0.2357 −0.9428
= l 21 l 22 0 0 1 u23
l 31 l 32 l 33 0 0 1
][ ][ ]
−0.9701
[ 0 0.2425 −0.9701
−0.2357 −0.2357 −0.9428
= l 21 l 22 0 0 1 u23
l 31 l 32 l 33 0 0 1
][ ][ ]
−0.9701
[ 0 0.2425 −0.9701
−0.2357 −0.2357 −0.9428
= l 21 l 22 0 0 1 u23
l 31 l 32 l 33 0 0 1
−0.9428 =1.8856+l 33
0.2425 0 0 1 0 −4
L=
[0 0.2425 0
−0.2357 −0.2357 −2.8284
U= 0 1 −4
0 0 1 ] [ ]
From 3, Ly=b
0.2425 0 0 y1 247
[ 0 0.2425 0 y2
−0.2357 −0.2357 −2.8284 y 3
=
][ ] [ ]
248
239
1018.5567 1 0 −4 x 1
[ ][
1022.6804 = 0 1 −4 x 2
−254.5851 0 0 1 x 3 ][ ]
x1-4x3=1018.5567
x2-4x3= 1022.6804
X-3y+z=4
2x-8y+8z=-2
-6x+3y-15z=9
Q4
2x1− x2+ x3 = −1,
3x1+3x2+9x3 = 0,
3x1+3x2+5x3 = 4.