1 Iterative methods
Suppose we have the system of equations
The aim here is to find a sequence of approximations which gradually approach . We will denote these approximations
where is our initial “guess", and the hope is that after a short while these successive iterates will be so close to each other that the process can be deemed to have converged to the required solution .
Key Point 10
An iterative method is one in which a sequence of approximations (or iterates ) is produced. The method is successful if these iterates converge to the true solution of the given problem.
It is convenient to split the matrix into three parts. We write
where consists of the elements of strictly below the diagonal and zeros elsewhere; is a diagonal matrix consisting of the diagonal entries of ; and consists of the elements of strictly above the diagonal. Note that and here are not the same matrices as appeared in the decomposition! The current and are much easier to find.
For example
and
and, more generally for matrices
1.1 The Jacobi iteration
The simplest iterative method is called Jacobi iteration and the basic idea is to use the partitioning of to write in the form
We use this equation as the motivation to define the iterative process
which gives as long as has no zeros down its diagonal, that is as long as is invertible. This is Jacobi iteration.
Example 18
Use the Jacobi iteration to approximate the solution of
Use the initial guess .
Solution
In this case
and
.
First iteration
.
The first iteration is
, or in full
since the initial guess was .
Taking this information row by row we see that
Thus the first Jacobi iteration gives us as an approximation to .
Second iteration
.
The second iteration is
, or in full
Taking this information row by row we see that
Therefore the second iterate approximating is .
Third iteration
.
The third iteration is
, or in full
Taking this information row by row we see that
Therefore the third iterate approximating is .
More iterations ...
Three iterations is plenty when doing these calculations by hand! But the repetitive nature of the process is ideally suited to its implementation on a computer. It turns out that the next few iterates are
to 3 d.p. Carrying on even further , to 4 d.p. After about 40 iterations successive iterates are equal to 4 d.p. Continuing the iteration even further causes the iterates to agree to more and more decimal places. The method converges to the exact answer
.
The following Task involves calculating just two iterations of the Jacobi method.
Task!
Carry out two iterations of the Jacobi method to approximate the solution of
with the initial guess .
The first iteration is , that is,
from which it follows that .
The second iteration is , that is,
from which it follows that .
Notice that at each iteration the first thing we do is get a new approximation for and then we continue to use the old approximation to in subsequent calculations for that iteration! Only at the next iteration do we use the new value. Similarly, we continue to use an old approximation to even after we have worked out a new one. And so on.
Given that the iterative process is supposed to improve our approximations why not use the better values straight away? This observation is the motivation for what follows.
1.2 Gauss-Seidel iteration
The approach here is very similar to that used in Jacobi iteration. The only difference is that we use new approximations to the entries of as soon as they are available. As we will see in the Example below, this means rearranging slightly differently from what we did for Jacobi. We write
and use this as the motivation to define the iteration
Example 19 which follows revisits the system of equations we saw earlier in this Section in Example 18.
Example 19
Use the Gauss-Seidel iteration to approximate the solution of Use the initial guess .
Solution
In this case and .
First iteration .
The first iteration is , or in full
since the initial guess was .
Taking this information row by row we see that
(Notice how the new approximations to and were used immediately after they were found.)
Thus the first Gauss-Seidel iteration gives us as an approximation to .
Solution
Second iteration
.
The second iteration is
, or in full
Taking this information row by row we see that
Therefore the second iterate approximating is .
Third iteration
.
The third iteration is
, or in full
Taking this information row by row we see that
to 4 d.p. Therefore the third iterate approximating is
More iterations ...
Again, there is little to be learned from pushing this further by hand. Putting the procedure on a computer and seeing how it progresses is instructive, however, and the iteration continues as follows:
(to 4 d.p.). Subsequent iterates are equal to to this number of decimal places. The Gauss-Seidel iteration has converged to 4 d.p. in 9 iterations. It took the Jacobi method almost 40 iterations to achieve this!
Task!
Carry out two iterations of the Gauss-Seidel method to approximate the solution of
with the initial guess .
The first iteration is , that is,
from which it follows that .
The second iteration is , that is,
from which it follows that .