An
square matrix
can be decomposed into a
product of a lower triangular matrix
and an upper
triangular matrix
,
![$\displaystyle {\bf A}=\left[ \begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{...
...ddots & \vdots \\
0 & 0 & \cdots & u_{NN} \end{array} \right]
={\bf L} {\bf U}$](img761.svg) |
(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:
![$\displaystyle \left[ \begin{array}{cccc}
l_{11} & 0 & 0 & 0 \\
l_{21} & l_{22}...
...rray}\right]=
\left[\begin{array}{c}
b_1\\ b_2\\ \vdots\\ b_N\end{array}\right]$](img813.svg) |
(199) |
which can be easily solved for
by forward substitution:
 |
(200) |
And then
can be found by solving
![$\displaystyle \left[ \begin{array}{cccc}
u_{11} & u_{12} & \cdots & u_{1N} \\
...
...ay}\right]
\left[\begin{array}{c}
y_1 \\ y_2 \\ \vdots \\ y_N\end{array}\right]$](img816.svg) |
(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
![$\displaystyle {\bf y}=[14, -17, 54]^T$](img821.svg) |
(203) |
We then solve the system
to get
.
The LU decomposition
can also be used to find the
inverse
that satisfies
![$\displaystyle {\bf A}{\bf A}^{-1}={\bf I}=diag(1,\cdots,1)=\left[{\bf e}_1,\cdots,{\bf e}_n \right]$](img825.svg) |
(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.,