2 Using LU decomposition to solve systems of equations

Once a matrix A has been decomposed into lower and upper triangular parts it is possible to obtain the solution to A X = B in a direct way. The procedure can be summarised as follows

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 X = x 1 x 2 x 3 of the system 1 2 4 3 8 14 2 6 13 x 1 x 2 x 3 = 3 13 4 .

Solution

Therefore we have found that the solution to the system of simultaneous equations

1 2 4 3 8 14 2 6 13 x 1 x 2 x 3 = 3 13 4 is X = 3 4 2 .

Task!

Use the L U decomposition you found earlier in the last Task (page 24) to solve

3 1 6 6 0 16 0 8 17 x 1 x 2 x 3 = 0 4 17 .

We found earlier that the coefficient matrix is equal to L U = 1 0 0 2 1 0 0 4 1 3 1 6 0 2 4 0 0 1 .

First we solve L Y = B for Y , we have

1 0 0 2 1 0 0 4 1 y 1 y 2 y 3 = 0 4 17 .

The top line implies that y 1 = 0 . The middle line states that 2 y 1 + y 2 = 4 and therefore y 2 = 4 . The last line tells us that 4 y 2 + y 3 = 17 and therefore y 3 = 1 .

Finally we solve U X = Y for X , we have

3 1 6 0 2 4 0 0 1 x 1 x 2 x 3 = 0 4 1 .

The bottom line shows that x 3 = 1 . The middle line then shows that x 2 = 0 , and then the top line gives us that x 1 = 2 . The required solution is X = 2 0 1 .