Gauss Seidel Method
Gauss Seidel Method
Where the diagonal coefficients are not zero and are large compared to other coefficients. Such a
system is called a diagonally dominant system.
1
x 1= [ b −a x −a x ]
a11 1 12 2 13 3
1
x 2= [ b −a x −a x ]
a22 2 21 1 23 3
1
x 3= [ b −a x −a x ] … … … … …..(2)
a33 3 31 1 32 2
(0 ) ( 0) (0 )
Let the initial approximate solution be x 1 , x2 , x 3 .
1
x 1( 1) = [ b −a x ( 0)−a13 x 3(0 ) ] … … … … .(3)
a11 1 12 2
Substituting x 1(1) for x1 and x 3(0 ) for x3 in the second equation of (2), we get
1
x 2( 1 ) =
a 22
[ b2−a21 x 1(1)−a23 x 3(0 ) ] … … … … … … …(4 )
This is taken as the first approximation of x2.
Next, substituting x 1(1) for x1 and x 2(1) for x2 in the last equation of (2), we get
1
x 3 ( 1) =
a 33
[ b3−a31 x 1(1)−a32 x 2(1 )] … … … … ..(5)
The values obtained in (3),(4),(5) constitute the first iterates of the solution.
1
x 1(k+1 )= [ b −a x (k )−a 13 x 3(k) ]
a11 1 12 2
1
x 2(k+1 ) = [ b −a x ( k+1)−a23 x 3(k ) ]
a22 2 21 1
1
x 3(k +1) = [ b −a x ( k+1 )−a32 x 2(k +1) ] … … … … …(6)
a33 3 31 1
The iteration process is stopped when the desired order of approximation is reached or
two successive iterations are nearly the same. The final values of x1,x2,x3 so obtained
constitute an approximate solution of the system (2).
In Gauss-Seidel method, the current values of unknowns are used at each stage of
iteration in getting the values of unknowns.
Therefore, Gauss-Seidel method is very fast when compared to Jacobi’s method. The rate
of convergence of Gauss-Seidel method is two times than that of Jacobi’s method.
Problems
1. Use Gauss-Seidel iteration method to solve the system 10x+y+z = 12,
2x+10y+z =13, 2x+2y+10z =14
Solution: The given system is diagonally dominant.
Then we can write the equations
1
x= [ 12− y −z ] … … …(1)
10
1
y= [ 13−2 x−z ] … … … … .(2)
10
1
z= [ 14−2 x −2 y ] … … … … ..(3)
10
1
x (4 )= [ 12− y (3)−z ( 3) ] = 1 [ 12−1−1 ] = 1 [ 10 ] = 1
10 10 10
1 1 1
y ( 4)= [ 13−2 x( 4 )−z (3) ] = [ 13−2 ( 1 )−1 ] = [ 10 ] = 1
10 10 10
1 1 1
z (4 )= [ 14−2 x (4 )−2 y (4 ) ] = [ 14−2 (1 ) −2 ( 1 ) ] = [ 10 ] = 1
10 10 10
Convergence condition is satisfied, we apply iterative method for the given system of
(1), then we can write x,y,z as follows.
1
x= [ 20+3 y −2 z ] … … … … … .(2)
8
1
y= [ 33−4 x + z ] … … … … … .( 3)
11
1
z= [ 35−6 x−3 y ] … … … … ..(4 )
12
Iteration :( 1) Putting y=0,z= 0 in R.H.S of equation (2), we get
1 1 1
x 1= [ 20+3 y−2 z ] = [ 20+0−0 ] = [ 20 ] = 2.5
8 8 8
Putting x=x 1 =2.5 , z= 0 in R.H.S of equation (3), we get
1 1 1
y 1=
11
[ 33−4 x 1 + z ] =
11
[ 33−4 ( 2.5 ) +0 ] =
11
[ 23 ] = 2.091
Putting x=x 1=2.5 , y= y1 =2.091 in R.H.S of equation (4), we get
1 1 1
z 1= [ 35−6 x 1−3 y 1 ] =
12 12
[ 35−6 ( 2.5 )−3 ( 2.091 ) ] =
12
[ 13.727 ] = 1.144
1 1 1
x 2=
8
[ 20+3 y 1−2 z 1 ] = 8 [ 20+3 ( 2.091 )−2 ( 1.144 ) ] = 8 [ 23.985 ] = 2.998
1 1 1
y 2= [ 33−4 x 2 + z 1 ] = [ 33−4 ( 2.998 ) +1.144 ] = [ 22.152 ] = 2.014
11 11 11
1 1 1
z 2= [ 35−6 x 2−3 y 2 ] =
12 12
[ 35−6 ( 2.998 )−3 ( 2.014 ) ] =
12
[ 10.97 ] = 0.914
1 1 1
x4 = [ 20+3 y 3−2 z 3 ] = [ 20+3 ( 1.982 )−2 ( 0.908 ) ] = [ 24.13 ] = 3.016
8 8 8
1 1 1
y 4 = [ 33−4 x 4 + z 3 ] =
11 11
[ 33−4 ( 3.016 ) +0.908 ] =
11
[ 21.844 ] = 1.986
1 1 1
z 4 = [ 35−6 x 4−3 y 4 ] =
12 12
[ 35−6 ( 3.016 )−3 ( 1.986 ) ] =
12
[ 10.946 ] = 0.912
1 1 1
x 5= [ 20+3 y 4−2 z 4 ] = [ 20+3 ( 1.986 ) −2 ( 0.912 ) ] = [ 24.134 ] = 3.017
8 8 8
1 1 1
y 5=
11
[ 33−4 x 5 + z 4 ] =
11
[ 33−4 ( 3.017 ) +0.912 ] =
11
[ 21.844 ] = 1.986
1 1 1
z 5= [ 35−6 x 5−3 y 5 ] =
12 12
[ 35−6 ( 3.017 )−3 ( 1.986 ) ] =
12
[ 10.94 ] = 0.912
1 1 1
x 6= [ 20+ 3 y 5 −2 z 5 ] = [ 20+3 ( 1.986 ) −2 ( 0.912 ) ] = [ 24.134 ] = 3.017
8 8 8
1 1 1
y 6= [ 33−4 x 6 + z 5 ] =
11 11
[ 33−4 ( 3.017 ) +0.912 ] =
11
[ 21.844 ] = 1.986
1 1 1
z 6= [ 35−6 x6 −3 y 6 ] =
12 12
[ 35−6 ( 3.017 )−3 ( 1.986 ) ] = 12 [ 10.94 ] = 0.912