14.2. USING MATLAB TO ITERATE 337

This yields .207.3793.2759.8621

 , k = 8, 1.581×10−4

Thus it took only 8 iterations rather than 14. This is typical. The Gauss Seidel method ismore complicated but tends to converge more quickly.

Now consider the following example.

Example 14.2.3 Use the Gauss Seidel method to solve the system1 4 0 01 4 1 00 2 5 10 0 2 4



x1

x2

x3

x4

=

1234

The exact solution is given by doing row operations on the augmented matrix. When

this is done the row echelon form is1 0 0 0 60 1 0 0 − 5

4

0 0 1 0 10 0 0 1 1

2

and so the solution is 

6− 5

4

112

=

6.0−1.25

1.0.5

Using the same iteration scheme, you get the following.

1.0×1045

−8.23092.2839−1.004.502

 , k = 1000, 9.114×1044

Thus the answer is totally useless, this after 1000 iterations. The error in approximating thesolution is larger than 1044. In other words, the method failed spectacularly to converge toanything. Row operations worked fine but this iterative procedure failed.

Why is the process which worked so well in the other examples not working here? Abetter question might be: Why does either process ever work at all? A complete answer tothis question is given in more advanced linear algebra books. You can also see it in [13].

Both iterative procedures for solving

Ax = b (14.6)