NA Lecture 13
NA Lecture 13
Analysis
Lecture13
Chapter 3
Solution of
Linear System
of Equations
and Matrix
Inversion
Introduction
Gaussian Elimination
Gauss-Jordon Elimination
Crout’s Reduction
Jacobi’s Gauss- Seidal Iteration
Relaxation
Matrix Inversion
Gauss–Seidel
Iteration
Method
It is another well-known
iterative method for solving a
system of linear equations of
the form
a11 x1 a12 x2 a1n xn b1
a21 x1 a22 x2 a2 n xn b2
an1 x1 an 2 x2 ann xn b1
In Jacobi’s method,
the (r + 1)th
approximation to the
above system is given
by Equations
( r 1) b1 a12 ( r ) a1n ( r )
x
1 x2 xn
a11 a11 a11
( r 1) b2 a21 (r ) a2 n ( r )
x 2 x1 xn
a22 a22 a22
( r 1) bn an1 (r )
an ( n 1) ( r )
x n x1 xn 1
ann ann ann
Here we can observe
( r 1)
that no element of xi
replaces xi entirely
(r )
second equation, we
substitute ( x1 , x3 ,..., xn ) and
( r 1) (r ) (r )
( r 1)
denote the result by x2
In the third equation, we
substitute ( x1 , x2 , x4 ,..., xn )
( r 1) ( r 1) (r ) (r )
Ri
dxi
aii
In other words, we change xi .
to ( xi dxi )
to relax Ri
that is to reduce Ri to zero.
Example
Solve the system of equations
6 x1 3 x2 x3 11
2 x1 x2 8 x3 15
x1 7 x2 x3 10
by the relaxation method,
starting with the vector (0, 0, 0).
Solution
At first, we transfer all the
terms to the right-hand side
and reorder the equations, so
that the largest coefficients in
the equations appear on the
diagonal.
Thus, we get
0 11 6 x1 3 x2 x3
0 10 x1 7 x2 x3
0 15 2 x1 x2 8 x3
after interchanging the 2 nd
and 3 equations.
rd
Starting with the initial
solution vector (0, 0, 0), that is
taking x1 x2 x3 0,
we find the residuals
R1 11, R2 10, R3 15
of which the largest residual in
magnitude is R3, i.e. the 3rd equation
has more error and needs immediate
attention for improvement.
Thus, we introduce a change,
dx3in x3 which is obtained
from the formula
R3 15
dx3 1.875
a33 8
Similarly, we find the new
residuals of large
magnitude and relax it to
zero, and so on.
We shall continue this
process, until all the
residuals are zero or very
small.
Iteration Residuals Maximum Difference Variables
number R1 R2 R3 x1 x2 x3
Ri dxi
number R1 R2 R3 x1 x2 x3
Ri dxi
number R1 R2 R3 x1 x2 x3
Ri
dxi