Chapter (5) Linear System of Equations
Chapter (5)
Linear System of
Equations.
Introduction
Gauss-Jacobi's iterative Method
Gauss-Seidel's iterative Method
1
Chapter 5 Linear System of Equations
Linear System of Equations
1. Introduction:
In this chapter we will introduce numerical methods for solving a
system of n linear equations in n unknowns of the form:
(1)
{
The previous form can be formulated in a matrix form as
(2)
[ ][ ] [ ]
Then the matrix notation before, for a system of simultaneous
linear equations can written as
Where:
Coefficient matrix
Unknown matrix
Constant matrix
Now we will consider a system of simultaneous linear
equations to introduce the approximation solution.
2. Gauss-Jacobi’s iterative method
Consider the system of linear equations
2
Chapter (5) Linear System of Equations
[ ][ ] [ ]
A matrix is said to be diagonally dominant if it
satisfy:
| | ∑ | |
This means the absolute value of the diagonal term is greater than
or equal to the sum of absolute values of other terms. A sufficient
(but not necessary) condition for the method to converge is that for
each row, for this reason the first step is to rearrange the linear
equations to satisfy that condition.
Now, we can write the system as:
Then, separate each unknown for each equation as:
(3)
This form can be formulated in a general form for n-equations as
the following:
[ ∑ ]
3
Chapter 5 Linear System of Equations
The initial approximations is given to be , then the
following iterations are then carried out from for
The iteration for equations takes the following:
( )
( ) (4)
( )
The above iteration process is continued until the values of ,
and are found to a pre-assigned degree of accuracy. That is, the
procedure is continued until the relative error between two
consecutive values is satisfactorily small.
The canonical form (general) for n-equations as the following:
[ ∑ ]
Theorem:
If A is diagonally dominant, then the sequence produced
by the Jacobi iteration converges to the solution of
for any starting vector.
Example 1
Use Gauss -Jacobi iterative method to approximate the solution for
linear system of equations.
[ ][ ] [ ]
4
Chapter (5) Linear System of Equations
Solution:
Rearrange equations such that: | | ∑| |
Gauss-Jacobi method:
[ ∑ ]
Iteration of the method:
( )
( )
( )
Since no given to the starting point, we will take it as
Table:
k
0 0 0 0
1 1.2 -1.1 1
2 0.99 -1.02 0.982
3 0.9998 -1.0026 1.003
4 0.99944 -0.99938 1.00028
5 1.000034 -0.999888 0.999994
6 1.000012 -1.0000046 0.9999854
7 1.000001 -1.0000041 0.9999928
The approximation solution as shown from the previous table
5
Chapter 5 Linear System of Equations
Example 2
Use Jacobi’s iterative method to find the approximation solution to
the linear system Ax = b given by
Correct to three decimal places.
Solution:
Rearrange equations such that: | | ∑| |
Gauss-Jacobi method:
[ ∑ ]
Iteration of the method:
The initial vector is not specified in the problem. Hence we choose
6
Chapter (5) Linear System of Equations
Table:
k
0 1 1 1
1 0 –1 0.75
2 0.5833 –0.375 0.5
3 0.29167 –0.47917 0.51042
4 0.32986 –0.40104 0.57862
5 0.32595 –0.45334 0.56728
6 0.34021 –0.44662 0.55329
7 0.3333 –0.44675 0.55498
8 0.33391 –0.44414 0.55498
9 0.33304 –0.44445 0.5555
The approximation solution as shown from the previous table
Algorithm for Gauss-Jacobi 's method:
INPUT ( ) integer N.
OUTPUT
for to N do
for to n do
( ∑ )
end for
output X
end for
STOP.
7
Chapter 5 Linear System of Equations
3. Gauss-Seidel’s iterative method
In the Jacobi method above, the equations are solved in order. But
if the components with the corresponding new values of
can be used so the approximation getting by Jacobi method
will improve. The new improve called Gauss-Seidel’s iterative
method and will take the form:
[ ∑ ∑ ] (5)
for
Example 3
Use Gauss-Seidel’s iterative method to find the approximation
solution to the linear system Ax = b given by
[ ][ ] [ ]
Correct to 4-decimal places, for the starting point, take it as
Solution:
Rearrange equations such that: | | ∑| |
Gauss-Seidel iterative method:
[ ∑ ∑ ]
8
Chapter (5) Linear System of Equations
Iteration of the method:
( )
( )
( )
The initial vector is specified in the problem. Hence we
choose:
Table:
k
0 0 0 0
1 1.2 -1.22 1.002
2 0.9778 -0.9974 1.002
3 1.0001 -0.9996 1.000
4 1.0000 -1.0000 1.000
5 1.0000 -1.0000 1.0000
The approximation solution as shown from the previous table
Example 4
Use Gauss-Seidel’s method to find the approximation solution to
the linear system Ax = b given by
Correct to 3-decimal places, for the starting point, take it as
Solution:
Rearrange equations such that: | | ∑| |
9
Chapter 5 Linear System of Equations
Gauss-Seidel iterative method:
[ ∑ ∑ ]
Iteration of the method:
( )
( )
( )
The initial vector is not specified in the problem. Hence we
choose
Table:
k
0 1 1 1
1 0 –0.5 0.625
2 0.375 –0.5 0.53125
3 0.34375 – 0.4375 0.55469
4 0.33075 –0. 44271 0.55664
5 0.33312 – 0.44488 0.5555
6 0.33346 –0.44448 0.55552
10