2 Using LU decomposition to solve systems of equations
Once a matrix has been decomposed into lower and upper triangular parts it is possible to obtain the solution to in a direct way. The procedure can be summarised as follows
- Given , find and so that . Hence .
- Let so that . Solve this triangular system for .
- Finally solve the triangular system for .
The benefit of this approach is that we only ever need to solve triangular systems. The cost is that we have to solve two of them.
[Here we solve only small systems; a large system is presented in Engineering Example 1 on page 62.]
Example 6
Find the solution of of the system
Solution
-
The first step is to calculate the
decomposition of the coefficient matrix on the left-hand side. In this case that job has already been done since this is the matrix we considered earlier. We found that
-
The next step is to solve
for the vector
. That is we consider
which can be solved by forward substitution . From the top equation we see that . The middle equation states that and hence . Finally the bottom line says that from which we see that .
-
Now that we have found
we finish the procedure by solving
for
. That is we solve
by using back substitution . Starting with the bottom equation we see that so clearly . The middle equation implies that and it follows that . The top equation states that and consequently .
Therefore we have found that the solution to the system of simultaneous equations
Task!
Use the decomposition you found earlier in the last Task (page 24) to solve
.
We found earlier that the coefficient matrix is equal to .
First we solve for , we have
The top line implies that . The middle line states that and therefore . The last line tells us that and therefore .
Finally we solve for , we have
The bottom line shows that . The middle line then shows that , and then the top line gives us that . The required solution is .