The LU factorization
Let
be a field and
. Given a
, recall that the linear system
can be solved by performing Gaussian elimination (also known as row reduction) on the augmented matrix
to transform it into an augmented matrix of the form
, where
is upper triangular and
, which represents an equivalent linear system
. Such a system can then be solved readily by backward substitution. In fact, this process (under certain conditions) amounts to computing an LU factorization of
as
, where
is unit lower triangular and
is upper triangular.
To illustrate this, suppose that
and
Then the variable
can be eliminated from the second equation
by multiplying the first equation
by
and subtracting the resulting equation from the second. The quotient
is called a multiplier and the divisor
is called a pivot. In other words (ignoring the vector
for now),
Similarly,
can be eliminated from the third and fourth equations, yielding the factorization
(where blanks denote zeroes).
The variable
can then be eliminated analogously from the new third and fourth equations. For instance,
In view of the previous step, this means that
Thus, after the second step of the factorization, we have
Finally, an entirely analogous third step completes the LU factorization:
In general, we can regard LU factorization as partitioning a matrix
as
where
,
,
, and
. Provided that the pivot
is nonzero, we can eliminate
by using the multipliers
to write
for some
; the matrix
is known as the Schur complement of
in
. This yields the factorization
which can be recursively continued by computing an LU factorization
of
. If one exists, then
, so
is an LU factorization of
.
Existence and uniqueness
Let
denote the (
,
)-entry of
after the
th step in the LU factorization. From the example above, it is clear that
will have an LU factorization provided that the pivots
are nonzero. Moreover, we see after
steps that the
th leading principal minor of
is equal to
, so
will have an LU factorization if its first
leading principal minors are nonzero.
If
is nonsingular, this condition is also necessary because the
th leading principal minor of
must be equal to
. Furthermore, the LU factorization is unique in this case, for if
and
are both LU factorizations of
, then
must be simultaneously unit lower triangular and upper triangular, and hence equal to the identity.
Solving linear systems
If the same row operations that were applied to
are applied to
as well, evidently the resulting vector
will satisfy
(since
=
). Therefore the solutions of
will indeed be those of
. Notably, once an LU factorization of
has been computed, it is possible to solve
for any given
by solving
for
and then
for
, reusing the computed factors
and
! (The former system can be solved readily by forward substitution and the latter by backward substitution.)
The PLU factorization
It is possible to produce an LU-like factorization for any
by allowing for row interchanges in addition to the elementary row operation above. The resulting PLU factorization consists of a permutation matrix
along with matrices
and
as above such that
(or equivalently,
).
As an illustration, consider the matrix
Following one elimination step as before, we arrive at
Since the (2, 2)-entry of the factor on the right is zero, it is impossible to introduce zeroes in the second column using this entry as a pivot. However, by interchanging the second row with a row below it whose entry in the second column is nonzero, we can obtain a nonzero pivot to perform the elimination. Also, note that had such a row not existed, it could only have been because all subdiagonal entries in the second column were zero, in which case we could have immediately continued to the next elimination step!
For example, suppose we wish to use the (4, 2)-entry,
, as a pivot. We have
so if
is the permutation matrix that interchanges the second and fourth rows, then
from which elimination can proceed as in the LU factorization. Namely,
Once again, we see that a row interchange is required. We have
so if
is the permutation matrix that interchanges the third and fourth rows, then
The product of all the permutation matrices used for row interchanges becomes the permutation matrix
; if no interchange is performed in the
th step, we can regard this as multiplication by
at that step. For instance, after the final elimination step in our example (which is trivial since the (4, 3)-entry is already zero),
In general, given a matrix
, either there exists a permutation matrix
such that
is of the form
for some nonzero
, or the first column of
is zero, in which case
is of the form
for any permutation matrix
. Let
in the former case and
in the latter. Then
where
, and if
is a PLU factorization of
, then
is a PLU factorization of
.
Solving linear systems
By the same reasoning as above, row-reducing
in the manner that
was reduced results in a vector
satisfying
. Therefore the solutions of
will be those of
. Once a PLU factorization of
has been computed, it is possible to solve
for any given
by solving
for
and then
for
, reusing the computed factors
and
and the permutation represented by
.