13.5. ITERATIVE METHODS FOR LINEAR SYSTEMS 343

Example 13.5.2 Use the Jacobi method to solve the system3 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 form3 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 toxr+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.

13.5. ITERATIVE METHODS FOR LINEAR SYSTEMS 343Example 13.5.2 Use the Jacobi method to solve the system3 1 0 0 ry 11410 a | | 2025 1 zz | | 30024 r4 4Of 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 reductionis ( s a & 38 ), which in terms of decimals is approximately equal to( 0.207 0.379 0.276 0.862 y.In terms of the matrices, the Jacobi iteration is of the form3.0 0 0 att 010 0 ry 10 4 0 0 att | 1010 x 2005 0 wt | fo 201 oy | 7] 3000 4 att 002 0 xy 4Multiplying by the inverse of the matrix on the left, this iteration reduces toatt 0 3 0 0 xy 5+1 1 1 r 1ry _— _ 4 0 4 0 T + 2 (13.15)att 0 2 0 : r3 3att 00 4 0 xy 1TNow iterate this starting with x! = ( 000 0 )Thus1 1 10 4 0 0 0 4 7>__| 7 9 |Z 0 0 > |_| 2x = 0 2 0 1 (0) + 3 _ 35 5 5 50 0 5 0 0 1 1Thenx2a—_—os1 1 104+ 0 0 3 3 . 1661 1 1 10 2 0 4 3 3 .20 0 $ 0 1 1 7Continuing this way one finally getsx5a0 3 0 0 .197 3 . 2166 | 7 0 GZ 0 351 4 | | .386~~) 9 2 9 2 2566 |? | 3 | | .2955 5 50 0 4 0 . 822 1 . 8711You 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.