Professional Documents
Culture Documents
LU Decomposition PDF
LU Decomposition PDF
A = 2 4 6
3 9 3
1. Use Gaussian Elimination to get the upper triangular matrix U.
3 R22 R1 1 2
3 1
3
1 2
1 2
1 2 3 1
1 2 3
R2
R3
2 4 6
R33R1
R3+15R 2
8
12
0 8
0
0 1
0
0 1 0
0 1 0
3 9 3
0 15 12
0 15 12
0 0 12
0 0 1
2. Form the lower triangular matrix L by using the rules mentioned above for the
row operations involved to get U.
1 0 0
Start with the identity matrix. 0 1 0
0 0 1
1 0 0
Row operation 1: R2 2R1 2 1 0
0 0 1
1 0 0
Row operation 2: R3 3R1 2 1 0
3 0 1
1 0 0
Row operation 3: 1/8R1 2 8 0
3 0 1
1 0 0
Row operation 4: R3 +15R2 2 8 0
3 15 1
0
1 0
0
Row operation 5: 1/6R3 2 8
3 15 12
Thus an LU Decomposition is given by
3 1
0
0 1 2 3
1 2
2 4 6 = 2 8
0 0 1 0 .
3 9 3 3 15 12 0 0 1
Next we show how an LU decomposition can be used to solve a system of
equations.
Steps to solve a system using an LU decomposition:
1. Set up the equation Ax = b.
2. Find an LU decomposition for A. This will yield the equation
(LU)x = b.
3. Let y = Ux. Then solve the equation Ly = b for y.
4. Take the values for y and solve the equation y = Ux for x. This will give the
solution to the system Ax = b.
2 x1 4 x 2 + 6 x3 = 18
3x 9 x 3x = 6
2
3
1
1. Set up the equation Ax = b.
3 x1 5
1 2
x1 + 2 x 2 + 3 x3 = 5
2 x1 4 x 2 + 6 x3 = 18 2 4 6 x 2 = 18
3x 9 x 3x = 6
3 9 3 x3 6
2
3
1
2. Find an LU decomposition for A. This will yield the equation
(LU)x = b.
*Note: We found the LU composition for A earlier. Its given by
3 1
0
0 1 2 3
1 2
2 4 6 = 2 8
0 0 1 0
3 9 3 3 15 12 0 0 1
So. . .
3 x1 5
0 1 2 3 x1 5
1 2
1 0
2 4 6 x = 18 2 8
0 0 1 0 x 2 = 18 .
3 9 3 x3 6
3 15 12 0 0 1 x3 6
y1 1 2 3 x1
and y = Ux y 2 = 0 1 0 x 2
y3 0 0 1 x3
3. Let y = Ux. Then solve the equation Ly = b for y.
0
0 1 2 3 x1 5
0
0 y1 5
1
1
2 8
0 0 1 0 x 2 = 18 2 8
0 y 2 = 18
3 15 12 0 0 1 x3 6
3 15 12 y 3 6
y1 1 2 3 x1
where y = Ux y 2 = 0 1 0 x 2 .
y 3 0 0 1 x3
Now solving for y gives the following values:
y1 = 5
y1 = 5
0
0 y1 5
1
2 8
0 y 2 = 18 2 y1 8 y 2 = 18
y 2 = 1
3 15 12 y 3 6
y3 = 2
3 x1 15 y 2 12 y 3 = 6
4. Take the values for y and solve the equation y = Ux for x. This will give
the solution to the system Ax = b.
x1 = 1
y1 1 2 3 x1
5 1 2 3 x1
x1 + 2 x 2 + 3 x3 = 5
y = 0 1 0 x 1 = 0 1 0 x
x 2 = 1
x 2 = 1
2
2
2
y3 0 0 1 x3
2 0 0 1 x3
x3 = 2
x3 = 2