Gauss-Seidel Method
Gauss-Seidel Method
Gauss-Seidel Method
BACKGROUND:
In numerical liner algebra, the Gauss-Seidel method is an iterative method used to solve a linear
system of equations. It is named after German mathematician Carl Friedrich Gauss and Ludwig von
Seidel.
OBJECTIVE:
To determine the solution of linear system of equation.
THEORY:
Gauss-Seidel method is a technique for solving the equations of linear system of equation one at a
time in sequence, and uses previously computed results as soon as they are available,
(𝑘) (𝑘−1)
𝑏𝑖 − ∑𝑖>𝑗 𝑎𝑖𝑗 𝑥𝑗 − ∑𝑗<𝑖 𝑎𝑖𝑗 𝑥𝑗
(k)
xi =
𝑎𝑖𝑖
There are two important characteristics of the Gauss-Seidel method should be noted. Firstly, the
computations appear to be serial. Since each component of the new iterate depends upon all
previously computed components, the updates cannot be done simultaneously as in the Jacobi method.
Secondly, the new iterates depends upon the order in which the equations were examined. If this
ordering is changed, the components of the new iterates will also change.
In terms of matrices, the definition of the gauss-Seidel method can be expressed as,
METHODOLOGY:
The Gauss-Seidel method is an iterative method for solving a square system of a linear equations of
unknown x:
𝑳𝒙(𝒌+𝟏) = 𝒃 − 𝑼𝒙(𝒌)
Where x(k) is the kth approximation or iteration of x, x(k+1) is the (k+1) iteration. Then the
decomposition of A into its lower triangular component and its strictly upper triangular components:
𝑨=𝑳+𝑼
Where,
𝒂𝟏𝟏 𝒂𝟏𝟐 ⋯ 𝒂𝟏𝒏 𝟎 𝒂𝟏𝟐 ⋯ 𝒂𝟏𝒏
𝒂𝟐𝟏 𝒂𝟐𝟐 ⋯ 𝒂𝟐𝒏 𝟎 𝟎 ⋮ 𝒂𝟐𝒏
𝑳= [ ⋮ ⋮ ⋱ ⋮ ] , 𝑼= [ ]
⋮ ⋮ ⋱ ⋮
𝒂𝒏𝟏 𝒂𝒏𝟐 ⋯ 𝒂𝒏𝒏 𝟎 𝟎 ⋯ 𝟎
The system of linear equation may be rewritten as :
𝑳𝒙 = 𝒃 − 𝑼𝒙
The Gauss-Seidel method now solves the left hand side of the expression for x, using previous value
for x on the right hand side. Analytically
(𝒌) (𝒌−𝟏)
𝒃𝒊 − ∑𝒊>𝒋 𝒂𝒊𝒋 𝒙𝒋 − ∑𝒋<𝒊 𝒂𝒊𝒋 𝒙𝒋
(k)
xi =
𝒂𝒊𝒊
The procedure is generally continued until the changes is made by an iteration are below some
tolerance, such as sufficiently small residual.
n i1 i2
1 1 0
2 6.25 1/4
3 1.52083 1.5625
4 1.1267 0.3802
5 1.0938 0.2816
6 1.0911 0.2735
7 1.0909 0.2727
8 1.0909 0.2727
ALGORITHM:
1. Start
Do for i=1 to n
Do for j=1 to n
Read a[i][j]
Repeat for j
Repeat for i
5. Read the coefficient b[i] fori =1 to n
7. Set key = 0
8. For i=1 to n
9. For j=1 to n
Repeat j
Set key = 1
Repeat i
Goto step 6
FLOWCHART:
START
Input n
For i=1,n
For j=1,n+1
Input a(i,j)
T
T
x(i)=0
y(i)=0
itr =0
itr=itr+1
For i = 1,n
If i = j
x(i)=x(i) – a(i,j)*x(j)
x(i)=x(i)/a(i,i)
For k= 1,n
If abs(x(k)-
y(k))>.0001
Print itr
For i=1,n
y(i)=x(i)
Print x(i)
STOP
SIMULTION IN MATLAB PROGRAMMING ENVIRONMENT:
clc
clear
x1(1)=0;
x2(1)=0;
x3(1)=0;
for i=1:100;
x1(i+1)=(5-x2(i)-x3(i))/2;
x2(i+1)=(15-3*x1(i+1)-2*x3(i))/5;
x3(i+1)=(8-2*x1(i+1)-x2(i+1))/4;
break
end
end
OUTPUT:
1.0000 0 0 0
DISCUSSION:
From the example and programme, we found that the Gauss-Seidel method is much accurate then
other methods.
CONCLUSION:
Gauss-Seidel method is very much important in both mathematical and engineering field.