Professional Documents
Culture Documents
If
L- lower triangular matrix
U- upper triangular matrix
Then,
[A]{X}={B} can be decomposed into two matrices [L] and [U] such that
[L][U]=[A]
[L][U]{X}={B}
Similar to first phase of Gauss elimination, consider
[U]{X}={D}
[L]{D}={B}
[L]{D}={B} is used to generate an intermediate vector {D} by
forward substitution
Then, [U]{X}={D} is used to get {X} by back substitution.
Example:
Use LU decomposition to determine the matrix inverse for the following
system. Check your results by verifying that | || | | | I A A =
1
.
Matrix Inversion
5 . 21 5
5 . 61 2 6 3
27 2 10
3 2 1
3 2 1
3 2 1
= + +
= +
= +
x x x
x x x
x x x
Solution:
First, we compute the LU decomposition. The coefficient a
21
is eliminated by
multiplying row 1 by f
21
= 3/10 = 0.3 and subtracting the result from row
2. a
31
is eliminated by multiplying row 1 by f
31
= 1/10 = 0.1 and subtracting
the result from row 3. The factors f
21
and f
31
can be stored in a
21
and a
31
.
(
(
1 . 5 8 . 0 1 . 0
7 . 1 4 . 5 3 . 0
1 2 10
a
32
is eliminated by multiplying row 2 by f
32
= 0.8/(5.4) = 0.148 and subtracting
the result from row 3. The factor f
32
can be stored in a
32
.
(
(
(
352 . 5 148 . 0 1 . 0
7 . 1 4 . 5 3 . 0
1 2 10
Therefore, the LU decomposition is
Matrix Inversion
(
(
(
=
1 1481 . 0 1 . 0
0 1 3 . 0
0 0 1
] [L
(
(
(
=
352 . 5 0 0
7 . 1 4 . 5 0
1 2 10
] [U
The first column of the inverse can be computed by using [L]{D} = {B}
(
(
(
0
0
1
1 148 . 0 1 . 0
0 1 3 . 0
0 0 1
3
2
1
d
d
d
This can be solved for d
1
= 1, d
2
= 0.3, and d
3
= 0.055. Then, we can
implement back substitution
(
(
(
055 . 0
3 . 0
1
352 . 5 0 0
7 . 1 4 . 5 0
1 2 10
3
2
1
x
x
x
to yield the first column of the inverse
=
0104 . 0
059 . 0
111 . 0
} {X
Matrix Inversion
For the second column use {B}
T
= {0 1 0} which gives
{D}
T
= {0 1 0.148}. Then, Back substitution gives
{X}
T
= {0.038 0.176 0.028}.
For the third column use {B}
T
= {0 0 1} which gives
{D}
T
= {0 0 1}. Back substitution then gives
{X}
T
= {0.0069 0.059 0.187}.
Therefore, the matrix inverse is
(
(
(