LU decomposition
In this section we focus again on solving linear systems given by . However now we discuss a method that allows us to solve the matrix equation above with different vectors without repeating the whole process for each case. The decomposition records the steps of Gaussian elimination by decomposing into a lower and an upper triangular matrix. Suppose that we can write as
for some lower triangular matrix and some upper triangular matrix . Then the matrix equation above becomes,
we let which, when substituted in Eq. (10.70), yields,
Thus, in order to solve Eq. (10.70), we solve (10.71) for and then use to solve for . We illustrate the ideas with an example. Consider the matrix,
We want to write it in the following form
where the stars indicate possibly nonzero entries. The stars represent 12 unknowns in and but we only have 9 equations for the entries in matrix . To make progress, we choose the diagonal entries of the lower triangular matrix to be all unity,
It follows that the first row of must be the first row of giving,
Between and , we now have 6 unknowns which can be solved for by solving 6 equations. Alternatively, we can reduce the coefficient matrix to upper triangular form, keeping track of row operations used. The latter is done through the use of elementary matrices (see Subsec. 10.3.1).
Starting with the coefficient matrix given in Eq. (10.72), we perform which is represented by the elementary matrix,
Recall that to perform this row operation on , we need to pre-multiply by the elementary matrix yielding,
Next, we continue with represented by the elementary matrix
and pre-multiplying by gives,
Finally, we undertake represented by the elementary matrix
and gives,
So far we have
where the elementary matrices are given by Eqs. (10.76), (10.78), and (10.80). From Eq. (10.82), we have,
It follows that by taking the inverses of the elementary matrices in reverse order, we obtain ,
The decomposition is therefore,
Suppose we wish to calculate the solution of for . We first solve the lower triangular system ,
This gives , and . We then solve for ,
This gives , and .
Exercises
- Use LU factorisation for the system where and the following values of : (a) ; (b) ; (c) .
- Use LU factorisation for the system where and the following values of : (a) (b) (c)