Professional Documents
Culture Documents
=
3 9 3
6 4 2
3 2 1
A
1. Use Gaussian Elimination to get the upper triangular matrix U.
1 0 0
0 1 0
3 2 1
12 0 0
0 1 0
3 2 1
12 15 0
0 1 0
3 2 1
12 15 0
0 8 0
3 2 1
3 9 3
6 4 2
3 2 1
3
12
1
2 15 3
2
8
1
1 3 3
1 2 2
R
R R
R
R R
R R
2. Form the lower triangular matrix L by using the rules mentioned above for the
row operations involved to get U.
Start with the identity matrix.
1 0 0
0 1 0
0 0 1
Row operation 1: R2 2R1
1 0 0
0 1 2
0 0 1
Row operation 2: R3 3R1
1 0 3
0 1 2
0 0 1
Row operation 3: 1/8R1
1 0 3
0 8 2
0 0 1
Row operation 4: R3 +15R2
1 15 3
0 8 2
0 0 1
Row operation 5: 1/6R3
12 15 3
0 8 2
0 0 1
Thus an LU Decomposition is given by
1 0 0
0 1 0
3 2 1
12 15 3
0 8 2
0 0 1
3 9 3
6 4 2
3 2 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.
Example: Solve the following system using an LU decomposition.
=
= +
= + +
6 3 9 3
18 6 4 2
5 3 2
3 2 1
3 2 1
3 2 1
x x x
x x x
x x x
1. Set up the equation Ax = b.
=
= +
= + +
6
18
5
3 9 3
6 4 2
3 2 1
6 3 9 3
18 6 4 2
5 3 2
3
2
1
3 2 1
3 2 1
3 2 1
x
x
x
x x x
x x x
x x x
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
1 0 0
0 1 0
3 2 1
12 15 3
0 8 2
0 0 1
3 9 3
6 4 2
3 2 1
So. . .
6
18
5
1 0 0
0 1 0
3 2 1
12 15 3
0 8 2
0 0 1
6
18
5
3 9 3
6 4 2
3 2 1
3
2
1
3
2
1
x
x
x
x
x
x
.
and y = Ux
3
2
1
3
2
1
1 0 0
0 1 0
3 2 1
x
x
x
y
y
y
3. Let y = Ux. Then solve the equation Ly = b for y.
6
18
5
12 15 3
0 8 2
0 0 1
6
18
5
1 0 0
0 1 0
3 2 1
12 15 3
0 8 2
0 0 1
3
2
1
3
2
1
y
y
y
x
x
x
where y = Ux
3
2
1
3
2
1
1 0 0
0 1 0
3 2 1
x
x
x
y
y
y
.
Now solving for y gives the following values:
2
1
5
6 12 15 3
18 8 2
5
6
18
5
12 15 3
0 8 2
0 0 1
3
2
1
3 2 1
2 1
1
3
2
1
=
=
=
=
=
=
y
y
y
y y x
y y
y
y
y
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
1
1
2
1
5 3 2
1 0 0
0 1 0
3 2 1
2
1
5
1 0 0
0 1 0
3 2 1
3
2
1
3
2
3 2 1
3
2
1
3
2
1
3
2
1
=
=
=
=
=
= + +
x
x
x
x
x
x x x
x
x
x
x
x
x
y
y
y
Therefore, the solution to the system is x
1
= 1, x
2
= -1, and x
3
= 2.