13.5. ITERATIVE METHODS FOR LINEAR SYSTEMS 343
Example 13.5.2 Use the Jacobi method to solve the system3 1 0 0
1 4 1 0
0 2 5 1
0 0 2 4
x1
x2
x3
x4
=
1
2
3
4
Of course this is solved most easily using row reductions. The Jacobi method is use-
ful when the matrix is very large. This example is just to illustrate how the methodworks. First lets solve it using row operations. The exact solution from row reduction
is(
629
1129
829
2529
), which in terms of decimals is approximately equal to(
0.207 0.379 0.276 0.862)T
.
In terms of the matrices, the Jacobi iteration is of the form3 0 0 0
0 4 0 0
0 0 5 0
0 0 0 4
xr+11
xr+12
xr+13
xr+14
= −
0 1 0 0
1 0 1 0
0 2 0 1
0 0 2 0
xr1xr2xr3xr4
+
1
2
3
4
.
Multiplying by the inverse of the matrix on the left, 1this iteration reduces toxr+11
xr+12
xr+13
xr+14
= −
0 1
3 0 014 0 1
4 0
0 25 0 1
5
0 0 12 0
xr1xr2xr3xr4
+
131235
1
. (13.15)
Now iterate this starting with x1 ≡(
0 0 0 0)T
.
Thus
x2 = −
0 1
3 0 014 0 1
4 0
0 25 0 1
5
0 0 12 0
0
0
0
0
+
131235
1
=
131235
1
Then
x3 = −
0 1
3 0 014 0 1
4 0
0 25 0 1
5
0 0 12 0
x2︷ ︸︸ ︷131235
1
+
131235
1
=
. 166
. 26
. 2
. 7
Continuing this way one finally gets
x6 = −
0 1
3 0 014 0 1
4 0
0 25 0 1
5
0 0 12 0
x5︷ ︸︸ ︷. 197
. 351
. 256 6
. 822
+
131235
1
=
. 216
. 386
. 295
. 871
.
1You certainly would not compute the invese in solving a large system. This is just to show you how themethod works for this simple example. You would use the first description in terms of indices.