An square matrix can be decomposed into a
product of a lower triangular matrix and an upper
triangular matrix ,
|
(186) |
and the equation system
can be trivially
solved by two rounds of back substitution:
- Rewrite the equation as below and solve for
by back substitution (top-down):
|
(187) |
- Solve the equation below for by back substitution (bottom-up):
|
(188) |
We now consider how to find and . The ijth element of
the equation
can be written as
|
(189) |
Note that there are equations (one for each element) but
unknowns in both and . We can therefore arbitrarily
set the all diagonal elements of to 1:
.
Moreover, as and are both triangular, we do not have
to solve an nonlinear equations, as they can be disentangled if they
are solved in a specific order. Actually these equations can be solved in
iterations, each carried out in two steps for the jth column
(
):
- , find in step 1 and
in step 2;
- , find and in step 1 and
in step 2;
-
- , find
in step 1 and
in step 2;
- , find
in step 1.
Note that in each iteration for the jth column, we find all ()
in the upper triangle of , and all () in the lower triangle
of :
- For all , i.e.,
(upper triangle), find all
by
|
(190) |
If (when
)
|
(191) |
We see that the first row of is the same as the first two of
.
If (when
),
|
(192) |
where has been obtained in previous iteration for .
In general, for all
, we have
|
(193) |
All
in the ith row of have already been obtained
from previous iterations of .
- For all , i.e.,
(lower triangle), find all
by
|
(194) |
When and
,
|
(195) |
where has been found in step 1.
When and
,
|
(196) |
where and have been found in step 1.
In general, when
and , we have
|
(197) |
where
in the jth column of have been found
in step 1.
Example
- (for column 1)
- (for column 2)
- (for column 3)
Now the LU decomposition of is:
The LU decomposition can be used to solve linear systems.
where |
(198) |
We can first solve
for by forward
substitution, and then solve
for
by backward substitution:
|
(199) |
which can be easily solved for by forward substitution:
|
(200) |
And then can be found by solving
|
(201) |
which can be easily solved by backward substitution:
|
(202) |
Example
By LU decomposition, this system can be written as:
We first solve the system
to get
|
(203) |
We then solve the system
to get
.
The LU decomposition
can also be used to find the
inverse
that satisfies
|
(204) |
where
is the ith column vector of the
identity matrix with all element equal to 0 except the ith one which
is 1. The ith column of
can be found by solving the following
|
(205) |
Example
Find the inverse of
Note that
where , , and are the three columns of
, which can be found by solving three equation systems:
We use LU decomposition to get
i.e.,
Solving these three equation systems we get
i.e.,