We will study an iterative method for solving linear systems: the Gauss-Seidel method. The aim is to build a sequence of approximations that converges to the true solution.

Iterative method

The Gauss-Seidel method is an iterative method for solving linear systems such as

Ax=b

For this, we use a sequence x(k) which converges to the fixed point(solution) x.

For x(0) given, we build a sequence x(k)such x(k+1)=F(x(k)) with kN.

A=MN where M is an invertible matrix.

Ax=bMx=Nx+bx=M1Nx+M1b=F(x)

where F is an affine function.

Algorithm

{x(0) given,x(k+1)=M1Nx(k)+M1belse.

If x is solution of Ax=b then x=M1Nx+M1b

Error

Let e(k) be the error vector

e(k+1)=x(k+1)x(k)=M1N(x(k)x(k1))=M1Ne(k)

We put B=M1N, which gives

e(k+1)=Be(k)=B(k+1)e(0).

Convergence

The algorithm converges if limk|e(k)|=0limk|Bk|=0 (null matrix).

Theorem: limk|Bk|=0 if and only if the spectral radius of the matrix B checks: ρ(B)<1, we remind that ρ(B)=maxi=1,,n|λi| where λ1,,λn represent the eigenvalues of B.

Theorem: If A is strictly diagonally dominant, |aii|>ij|aij|,i=1,,n then for all x0 the Gauss-Seidel algorithm will converge to the solution x of the system Ax=b.

Gauss-Seidel Method

We decompose A in the following way :A=DEF with

  • D the diagonal
  • E the strictly lower triangular part of A
  • F the strictly upper triangular part of A.

In the Gauss-Seidel method we choose M=DE and N=F (in the Jacobi method, M=D et N=E+F).

x(k+1)=(DE)1Fx(k)+(DE)1b

We obtain

xi(k+1)=bij=1i1aijxj(k+1)j=i+1naijxj(k)aii

Stop criteria

For the stop criteria , we can use the residual vector, wich gives for a given precision ϵ :

r(k)b=bAx(k)b<ϵ