Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

2.

JACOBI ITERATION
We write the system as in (4) of section 2.1 as

a11 x1 = a12 x2 a13 x3 ..... a1n xn + y1

a 22 x2 = a 21 x1 a 23 x3 ..... a 2 n xn + y 2
...... ......

. . . . . . . .(11)

......

a nn xn = a n1 x1 a n 2 x2 ..... a nn1 x n1 + y n
We start with an initial vector,

x(

0)

x1(0)
(0)
x
= 2 . . . . . . . .(12)
M
(0)
xn

and substitute this vector for x in the RHS of (11) and calculate x1,x2, .., xn and this
vector is called x(1). We now substitute this vector in the RHS of (11) to calculate again
x1, x2, .., xn and call this new vector as x(2) and continue this procedure to calculate the
sequence {x (k) } . Thus,
The equation (11) can be written as,
Dx = - (L + U) x + y . (13)
which we can write as
x = -D-1 (L+U) x +D-1 y,

giving

x = J x + y (14)

where
J = -D-1 (L + U) .(15)
and, we get
x(0)

starting vector
.(16)
(k1)

x = Jx
(k )

+ y for k =1,2,........
57

as the iterative scheme. This is similar to (2 in section 2.1) with the iterating matrix M as
J = -D-1 (L + U); J is called the Jacobi Iteration Matrix. The scheme will converge to the
solution x of our system if J sp < 1 . We shall see an easier condition below:
We have
1
a11

-1
D =

a22
O

1
ann

and therefore

a12
0

a11

a21
0
1
a22
J = D ( L + U ) =
....
....

a
an1
n2

a
ann
nn

a13

a23

a11

....

a22

....
....

....

a11

a2n

a22
....

....

an,n1
ann

a1n

Now therefore the ith Absolute row sum for J is

Ri =
j i

aij
aii

If Ri <1

(a

i1

+ ai 2 + .... + ai ,i 1 + ai ,i +1 + .... + ain

)
aii

for every i =1,2,3,..,n

then
J

= max{R1 ,....., Rn } < 1

and we have convergence.


Now

Ri < 1 means

58

ai1 + ai 2 + ..... + ai ,i 1 + ai ,i +1 + ..... + ain < aii


i.e. in each row of A the sum of the absolute values of the non diagonal entries is
dominated by the absolute value of the diagonal entry (in which case A is called strictly
row diagonally dominant). Thus the Jacobi iteration scheme for the system (3)
converges if A is strictly row diagonally dominant (Of course, this condition may not be
satisfied) and still Jacobi iteration scheme may converge if J sp < 1.
Example 1:
Consider the system
x1 + 2x2 2x3 = 1
x1 + x2 + x3 = 0
2x1 + 2x2 + x3 = 0

.(I)

Let us apply the Jacobi iteration scheme with the initial vector as

(0)

0

= = 0
0

We have A = 1
2

L +U = 1
2

2
0
2

2
1
2

.(II)

1
1

D = 0
0

1 ;
0

0
1
0

0
1

1

y = 0
0

0 2 + 2

J = D 1 (L + U ) = 1 0 1
2 2 0

1

y = D y = 0
0

1

Thus the Jacobi scheme (16) becomes

(0 )

0

= 0
0

59

x( ) = Jx(
k

k1)

+ y,

k = 1, 2,.......

1

x = Jx + y = y = 0 since x (0) is the zero vector.
0

(1)

(2 )

( 0)

= Jx

(1)

0 2 + 2 1 1

+ y = 1 0
1 0 + 0
2 2 0 0 0

0 1 1

= 1 + 0 = 1
2 0 2

(3 )

= Jx

(2 )

0 2 2 1 1

+ y = 1 0 1 1 + 0
2 2 0 2 0

2 1 1

= 1 + 0 = 1
0 0 0

x (4 )

0 2 2 1 1

= Jx (3) + y = 1 0 1 1 + 0
2 2 0 0 0

2 1 1


= 1 + 0 = 1 = x (3 )
0 0 0

x(4) = x(5) = x(6) = . = x(3)


x(k) = x(3) and x(k) converges to x(3)

60

The solution is

x = lim x
k

(k)

=x

(3)

1

= 1
0

We can easily check that this is the exact solution.


Here, there is no convergence problem at all.
Example 2:
8x1 + 2x2 2x3 = 8
x1 - 8x2 + 3x3 = 19
2x1 + x2 + 9x3 = 30
Let us apply Jacobi iteration scheme starting with x (0 )

We have

8 0 0

D = 0 8 0
0 0 9

D 1

J = D 1 (L + U ) = + 0.125
0.22222

0

= 0
0

1
9

0.25
0

+ 0.25

0.375
0.11111
0

1
y = D y = 2 .375
3.33333

Now the matrix is such that


a11 = 8 and

a12 + a13 = 2 + 2 = 4

a 11 > a 12 + a13

a22 = 8 and

a21 + a23 = 1 + 3 = 4;

a 22 > a 21 + a 23

61

a31 + a32 = 2 + 1 = 3

a33 = 9 and

a 33 > a 31 + a 32

Thus we have strict row diagonally dominant matrix A.


scheme will converge. The scheme is,

Hence the Jacobi iteration

0

x 0 = 0
0

x ( k ) = Jx ( k 1) + y
0
0.25
0.25

0
0.375 x ( k 1) + y
= 0.125
0.22222 0.11111
0

(1)

= y = 2 .375
3 .33333

We continue the iteration until the components of x(k) and x(k+1) differ by at most, say;
3x10-5 , that is,

x ( k +1 ) x ( k )

3 x10 5 , we get x (1) x (0 )

= 3 .33333 . So we

continue

(2 )

(3 )

(4 )

= Jx

(1)

= Jx

(2 )

= Jx

(3 )

2.42708

+ y = 1.00000
3.37500

x (2 ) x (1 )

2 .09375

+ y = 0 .80599 ;
2 .90509

x (3 ) x ( 2 )

1 .92777

+ y = 1 .02387
2 .95761

x ( 4 ) x (3 )

= 1.42708

= 0.46991

= 0 .21788

62

(5 )

(6 )

(7 )

(8 )

(9 )

x (10 )

(11 )

(12 )

1 .99537

+ y = 1 .02492
3 .01870

x (5 ) x ( 4 )

2 .01091

= Jx (5 ) + y = 0 .99356
3 .00380

x ( 6 ) x (5 )

1 .99934

+ y = 0 .99721 ;
2 .99686

x ( 7 ) x (6 )

= Jx

= Jx

(4 )

(6 )

1 .99852

= Jx (7 ) + y = 1 .00126
2 .99984

= Jx

(8 )

x (8 ) x ( 7 )

2 .00027

+ y = 1 .00025 ;
3 .00047

x (9 ) x (8 )

2 .00018

= Jx (9 ) + y = 0 .99979
2 .99997

= Jx

(10 )

= Jx

(11 )

1 .99994

+ y = 0 .99999
2 .99994

= 0.03136

= 0 .01157

= 0 .00405

= 0 .00176

x (10 ) x (9 )

( )
( )
; x 11 x 10

1 .99998

+ y = 1 .00003 ;
3 .00001

= 0 .06760

x (12 ) x (11 )

= 0 .00050

= 0 .00024

= 0 .00008

63

(13 )

= Jx

(12 )

2 .00001

+ y = 1 .00000
3 .00001

x (13 ) x (12 )

= 0 .00003 =

Hence the solution is x1=2 ; x2=-1, x3=3.00001


(The Exact solution is x1 = 1, x2 = -2, x3 =3).

64

You might also like