0% found this document useful (0 votes)
93 views

LU Decomposition Method

The document describes solving a system of linear equations using LU decomposition. It provides the steps to decompose a coefficient matrix A into lower triangular matrix L and upper triangular matrix U, such that A = LU. It then shows how to solve for y in Ly = b, and then back substitute into Ux = y to solve for x. There are two examples provided that show the full working through of setting up and solving systems of linear equations using LU decomposition.

Uploaded by

Hussain Hbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

LU Decomposition Method

The document describes solving a system of linear equations using LU decomposition. It provides the steps to decompose a coefficient matrix A into lower triangular matrix L and upper triangular matrix U, such that A = LU. It then shows how to solve for y in Ly = b, and then back substitute into Ux = y to solve for x. There are two examples provided that show the full working through of setting up and solving systems of linear equations using LU decomposition.

Uploaded by

Hussain Hbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Direct Method for Solving Linear System

LU Decomposition Method

There are three system equations.

a11 x1+a12 x2+a13 x3=0

a21 x1+a22 x2+a23 x3=0

a31 x1+a32 x2+a33 x3=0

Ax=b------------------1

A=LU------------------2

a 11 a12 a13 l 11 0 0 1 u12 u13

[ ] [ ] [
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

Q1 solve the system equation by LU Decomposition Method.

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

1=l 11∗1+ 0+0, l 11=1

2=l 11 u12+ 0+0 , u12=2

3=l 11 u13+ 0+0, u13=3

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

-4=l 21 u12 +l 22∗1+0

-4=2*2+l 22, l 22=−8

6=l 21 u13 +l 22 u23 +0

6=2¿ 3+(−8)u 23, u23=0

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

x2=-1, x3=2, x1=1

Solution Set {x1=1, x2=-1, and x3=2}

Q2

0.2425 0 −0.9701 x 1 247


[ 0
][ ] [ ]
0.2425 −0.9701 x 2 = 248
−0.2357 −0.2357 −0.9428 x 3 239

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.2425 0 l 11 0 0 1 u12 u13

][ ][ ]
−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

For First Row

0.2425=l 11∗1+ 0+0, l 11=0.2425

0=l 11 u12+ 0+0, u12=0

−0.9701=l 11 u13+ 0+0

−0.9701=0.2425 u13, u13=−4


For Second Row
0.2425 0 l 11 0 0 1 u12 u13

][ ][ ]
−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=l 21∗1+0+0 , l 21=0

0.2425=l 21 u12 +l 22∗1+0

0.2425=l 22, l 22=0.2425

−0.9701=l 21 u13 +l 22 u23 +0

−0.9701=0.2425 u23 , u23=−4

For Third Row

0.2425 0 l 11 0 0 1 u12 u13

][ ][ ]
−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.2357 =l 31∗1+0+0 , l 31=−0.2357

−0.2357 =l 31 u12 +l 32∗1+0

−0.2357 =l 32, l 32=−0.2357

−0.9428 =l 31 u13 +l 32 u23 +l 33

−0.9428 =−0.2357 (−4)±0.2357(−4)+l 33

−0.9428 =1.8856+l 33

−2.8284 =l 33, l 33=−2.8284

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

0.2425 Y1=247 y 1=1018.5567

0.2425 y2=248 y 2=1022.6804

−0.2357 y1−0.2357 y2−2.8284 y3=239 Y3=-254.5851


From 4, Y=Ux

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

x3=−254.5851, x2=4.34, x1=0.2167 Solution Set { x1=0.2167, x2=4.34,and x3=−254.5851}

Q3 Solve the given equations. Ans{3,-1,-2}

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.

Q5 1.012x1 − 2.132x2 + 3.104x3 = 1.984,


−2.132x1 + 4.096x2 − 7.013x3 = −5.049,
3.104x1 − 7.013x2 + 0.014x3 = −3.895.

You might also like