0% found this document useful (0 votes)
64 views3 pages

LU Decomposition

The matrix is decomposed into lower triangular matrix L and upper triangular matrix U such that A = LU. Then forward substitution is used to solve Ly = b and backward substitution to solve Ux = y to find the values of the variables. The values obtained are: x1 = 1, x2 = 2, x3 = 2, x4 = 1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views3 pages

LU Decomposition

The matrix is decomposed into lower triangular matrix L and upper triangular matrix U such that A = LU. Then forward substitution is used to solve Ly = b and backward substitution to solve Ux = y to find the values of the variables. The values obtained are: x1 = 1, x2 = 2, x3 = 2, x4 = 1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

LU DECOMPOSITION / CROUTS METHOD

The matrix A is decomposed into a product of lower triangular matrix L, and an upper triangular matrix U, that is A=LU.
a11 a12 a13 … a1n l11 0 0 … 0 1 u12 u13 … u1n
a21 a22 a23 … a2n l21 l22 0 … 0 0 1 u23 … u2n


am1 am2 am3 … amn lm1 lm2 lm3 … lmn 0 0 0 … 1
Thus, by LU decomposition, the system of linear equations Ax = b can be solved in three steps:
1. Construct the lower triangular matrix, L and the upper triangular matrix U.
2. Using forward substitution solve Lȳ = b
3. Solve Ux = ȳ backward substitution
Given:
𝑥+𝑦+𝑧=5
2𝑥 + 3𝑦 + 5𝑧 = 8
4𝑥 + 5𝑧 = 2
Solve for x, y and z using LU Decomposition Method.
1 1 1 l11 0 0 1 u12 u13
2 3 5 l21 l22 0 0 1 u23
4 0 5 l31 l32 l33 0 0 1

a11 = l11(1) + 0(0) +0(0) Lȳ = b


l11 = 1 1 0 0 A 5
a12 = l11(u12) + 0(1) + 0(0) 2 1 0 B 8
1 = 1(u12) 4 -4 13 C 2
u12 = 1
a13 = l11(u13) + 0(u23) + 0(1) 1A + 0B + 0C = 5
1 = 1(u13)
A=5
u13 = 1 2A + 1B + 0C = 8
a21 = l21(1) + l22(0) + 0(0) 2(5) + B = 8
l21 = 2 B = -2
a22 = l21(u12) + l22(1) + 0(0) 4A -4B + 13C = 2
3 = 2(1) + l22 4(5) -4(-2) + 13C = 2
l22 = 1
C = -2
a23 = l21(u13) + l22(u23) + 0(1)
5 = 2(1) + 1(u23)
Ux = ȳ
u23 = 3
a31 = l31(1) + l32(0) + l33(0)
1 1 1 x 5
l31 = 4 0 1 3 y -2
a32 = l31(u12) + l32(1) + l33(0) 0 0 1 z -2
0 = 4(1) + l32
l32 = -4 0x + 0y + z = -2
a33 = l31(u13) + l32(u23) + l33(1) z = -2
5 = 4(1) + (-4)(3) + l33 0x + y + 3z = -2
l33 = 13 y + 3(-2) = -2
y=4
x+y+z=5
x + 4 + (-2) = 5
x=3
Therefore, the values for x, y and z are 3, 4 and -2.
Example 2: 9𝑥1 + 3𝑥2 + 3𝑥3 + 3𝑥4 = 24
3𝑥1 + 10𝑥2 − 2𝑥3 − 2𝑥4 = 17
3𝑥1 − 2𝑥2 + 18𝑥3 + 10𝑥4 = 45
3𝑥1 − 2𝑥2 + 10𝑥3 + 10𝑥4 = 29
Solve for x1, x2, x3, and x4 by Crouts Method
Solve for x, y and z using LU Decomposition Method.
9 3 3 3 l11 0 0 0 1 u12 u13 u14
3 10 -2 -2 l21 l22 0 0 0 1 u23 u24
3 -2 18 10 l31 l32 l33 0 0 0 1 u34
3 -2 10 10 l41 l42 l43 l44 0 0 0 1

a11 = l11(1) + 0(0) +0(0) + 0(0) Lȳ = b


l11 = 9 9 0 0 0 y1 24
a12 = l11(u12) + 0(1) + 0(0) + 0(0) 3 9 0 0 y2 17
3 = 9(u12) 3 -3 16 0 y3 45
u12 = 1/3
3 -3 8 4 y4 29
a13 = l11(u13) + 0(u23) + 0(1) + 0(0)
3 = 9(u13)
9y1 + 0y2 + 0y3 + 0y4 = 24
u13 = 1/3
y1 = 8/3
a14 = l11(u14) + 0(u24) + 0(u34) + 0(1)
3y1 + 9y2 + 0y3 + 0y4 = 17
3 = 9(u14)
3(8/3) + 9y2 = 17
u14 = 1/3
y2 = 1
a21 = l21(1) + l22(0) + 0(0) + 0(0)
3y1 - 3y2 + 16y3 + 0y4 = 45
l21 = 3
3(8/3) – 3(1) + 16y3 = 45
a22 = l21(u12) + l22(1) + 0(0) + 0(0)
y3 = 5/2
10 = 3(1/3) + l22
3y1 - 3y2 + 8y3 + 4y4 = 29
l22 = 9
3(8/3) – 3(1) + 8(5/2) + 4y4 = 29
a23 = l21(u13) + l22(u23) + 0(1) + 0(0)
y4 = 1
-2 = 3(1/3) + 9(u23)
u23 = -1/3
a24 = l21(u14) + l22(u24) + 0(u34) + 0(1)
Ux = ȳ
-2 = 3(1/3) + 9(u24) 1 1/3 1/3 1/3 x1 8/3
u24 = -1/3 0 1 -1/3 -1/3 x2 1
a31 = l31(1) + l32(0) + l33(0) + 0(0) 0 0 1 1/2 x3 5/2
l31 = 3 0 0 0 1 x4 1
a32 = l31(u12) + l32(1) + l33(0) +0(0)
-2 = 3(1/3) + l32 0x1 + 0x2 + 0x3 + x4 = 1
l32 = -3 x4 = 1
a33 = l31(u13) + l32(u23) + l33(1) + 0(0) 0x1 + 0x2 + x3 + 1/2x4 = 5/2
18 = 3(1/3) + (-3)(-1/3) + l33 x3 + ½(1) = 5/2
l33 = 16 x3 = 2
a34 = l31(u14) + l32(u24) + l33(u34) + 0(1) 0x1 + x2 – 1/3x3 - 1/3x4 = 1
10 = 3(1/3) + (-3)(-1/3) + 16(u34) x2 – 1/3(2) – 1/3(1) = 1
u34 = ½ x2 = 2
a41 = l41(1) + l42(0) + l43(0) + l44(0) x1 + 1/3x2 + 1/3x3 + 1/3x4 = 8/3
l41 = 3 x1 + 1/3(2) + 1/3(2) + 1/3(1) = 8/3
a42 = l41(u12) + l42(1) + l43(0) +l44(0) x1 = 1
-2 = 3(1/3) + l42 Therefore, the values for x1, x2, x3, and x4 are 1, 2, 2 and 1.
l42 = -3
a43 = l41(u13) + l42(u23) + l43(1) + l44(0)
10 = 3(1/3) + (-3)(-1/3) + l43
l43 = 8
a44 = l41(u14) + l42(u24) + l43(u34) + l44(1)
10 = 3(1/3) + (-3)(-1/3) + 8(1/2) + l44
l44 = 4
No: Name: Schedule: Score:
____ LU Decomposition Activity Target Deadline: 1April2020
Given:

Solve for the values of the variables using LU decomposition method.

You might also like