0% found this document useful (0 votes)
275 views62 pages

Chapter Four - Solutions of A System of Linear Equations

This document provides an overview of solving systems of linear equations. It begins with definitions of linear systems and their coefficient and augmented matrices. There are three possibilities for the solution of a linear system: unique solution, infinite solutions, or no solution. The document then discusses elementary transformations used to reduce the augmented matrix to echelon form in order to solve the system. Both direct methods like Gauss elimination and iterative methods like Gauss-Jacobi are introduced. Gauss elimination is then explained in more detail, showing the process of transforming the augmented matrix to echelon form and solving the resulting system through back substitution. An example illustrates the full Gauss elimination method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
275 views62 pages

Chapter Four - Solutions of A System of Linear Equations

This document provides an overview of solving systems of linear equations. It begins with definitions of linear systems and their coefficient and augmented matrices. There are three possibilities for the solution of a linear system: unique solution, infinite solutions, or no solution. The document then discusses elementary transformations used to reduce the augmented matrix to echelon form in order to solve the system. Both direct methods like Gauss elimination and iterative methods like Gauss-Jacobi are introduced. Gauss elimination is then explained in more detail, showing the process of transforming the augmented matrix to echelon form and solving the resulting system through back substitution. An example illustrates the full Gauss elimination method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

CHAPTER

9
Solutions of a System
of Linear Equations

Chapter Outline
9.1 Introduction
9.2 Solutions of a System of Linear Equations
9.3 Elementary Transformations
9.4 Numerical Methods for Solution of a System of Linear Equations
9.5 Gauss Elimination Method
9.6 Gauss Elimination Method with Partial Pivoting
9.7 Gauss–Jordan Method
9.8 Gauss–Jacobi Method
9.9 Gauss–Siedel Method

9.1 introduction

A system of m nonhomogenous linear equations in n variables x1, x2, ..., xn or simply


a linear system, is a set of m linear equations, each in n variables. A linear system is
represented by
a11 x1 + a12 x2 +  + a1n xn = b1
a21 x1 + a22 x2 +  + a2 n xn = b2
   
am1 x1 + am 2 x2 +  + amn xn = bm
Writing these equations in matrix form,
Ax = B
È a11 a12  a1n ˘
Í ˙
Í a21 a22  a2 n ˙
where A = is called the coefficient matrix of order m × n,
Í    ˙
Í ˙
ÍÎam1 am 2  amn ˙˚
9.2 Chapter 9 Solutions of a System of Linear Equations

È x1 ˘
Í ˙
x
x = Í 2 ˙ is any vector of order n ¥ 1
Í˙
Í ˙
ÎÍ xn ˚˙
È b1 ˘
Í ˙
b
B = Í 2 ˙ is any vector of order m ¥ 1
Í ˙
Í ˙
ÎÍbm ˚˙

9.2 SOlutiOnS Of a SyStem Of linear equatiOnS


For a system of m linear equations in n variables, there are three possibilities of the
solutions to the system:
(i) The system has a unique solution.
(ii) The system has infinite solutions.
(iii) The system has no solution.
When the system of linear equations has one or more solutions, the system is said to
be consistent, otherwise it is inconsistent.
È a11 a12  a1n b1 ˘
Í ˙
a a22  a2 n b2 ˙
The matrix [ A : B] = Í 21
Í     ˙
Í ˙
ÍÎam1 am 2  amn bm ˙˚
is called the augmented matrix of the given system of linear equations.
To solve a system of linear equations, elementary transformations are used to reduce
the augmented matrix to echelon form.

9.3 elementary tranSfOrmatiOnS


Elementary transformation is any one of the following operations on a matrix.
(i) The interchange of any two rows (or columns)
(ii) The multiplication of the elements of any row (or column) by any nonzero
number
(iii) The addition or subtraction of k times the elements of a row (or column) to the
corresponding elements of another row (or column), where k π 0
Symbols to be used for elementary transformation:
(i) Rij : Interchange of ith and jth row
(ii) kRi : Multiplication of ith row by a nonzero number k
(iii) Ri + kRj : Addition of k times the jth row to the ith row
9.4 Numerical Methods for Solutions of a System of Linear Equations 9.3

The corresponding column transformations are denoted by Cij, kCi, and Ci + kCj
respectively.

9.3.1 elementary matrices


A matrix obtained from a unit matrix by subjecting it to any row or column transfor-
mation is called an elementary matrix.

9.3.2 equivalence of matrices


If B be an m × n matrix obtained from an m × n matrix by elementary transformation
of A then A is equivalent to B. Symbolically, we can write A ~ B.

9.3.3 echelon form of a matrix


A matrix A is said to be in echelon form if it satisfies the following properties:
(i) Every zero row of the matrix A occurs below a nonzero row.
(ii) In a nonzero row the first nonzero number from the left is 1. This is called a
leading 1.
(iii) For each nonzero row, the leading 1 appears to the right of any leading 1 in
preceding rows.
The following matrices are in echelon form:
È1 1 0 ˘ È1 2 -1 3 ˘ È0 1 3 5 0 ˘
Í ˙ Í ˙ Í ˙
Í0 1 0 ˙ , Í0 1 5 6 ˙ , Í0 0 1 -1 0 ˙
ÍÎ0 0 0 ˙˚ ÍÎ0 0 1 4 ˙˚ ÍÎ0 0 0 0 1 ˙˚

9.4 numeriCal methOdS fOr SOlutiOnS Of a SyStem Of


linear equatiOnS

There are two methods to solve linear algebraic equations:


(i) Direct methods
(ii) Iterative methods

9.4.1 direct methods


Direct methods transform the original equations into equivalent equations that can be
solved easily. The transformation of the original equations is carried out by applying
elementary row transformations to the augmented matrix of the system of equations.
We will discuss two direct methods:
(i) Gauss elimination method
(ii) Gauss–Jordan method
9.4 Chapter 9 Solutions of a System of Linear Equations

9.4.2 iterative methods


The direct methods lead to exact solutions in many cases but are subject to errors due
to roundoff and other factors. In the iterative method, an approximation to the true
solution is assumed initially to start the method. By applying the method repeatedly,
better and better approximations are obtained. For large systems, iterative methods are
faster than direct methods and round-off errors are also smaller. Any error made at any
stage of computation gets automatically corrected in the subsequent steps.
We will discuss two iterative methods.
(i) Gauss–Jacobi method
(ii) Gauss–Seidel method

9.5 GauSS eliminatiOn methOd


This method solves a given system of equations by transforming the augmented matrix
to an echelon form. The corresponding linear system of equations is then solved for the
unknowns by back substitution.
Consider the system of equations
a11 x + a12 y + a13 z = b1
a21 x + a22 y + a23 z = b2
a31 x + a32 y + a33 z = b3
The matrix form of the system is
È a11 a12 a13 ˘ È x ˘ È b1 ˘
Í ˙Í ˙ Í ˙
Ía21 a22 a23 ˙ Í y ˙ = Íb2 ˙
ÍÎ a31 a32 a33 ˙˚ ÍÎ z ˙˚ ÍÎb3 ˙˚
The augmented matrix of the system is
È a11 a12 a13 b1 ˘
[ A : B] = ÍÍa21 a22 a23 b2 ˙˙
ÍÎ a31 a32 a33 b3 ˙˚
Reducing the augmented matrix to echelon form by using elementary row
transformations,
Èc11 c12 c13 d1 ˘
Í ˙
[ A : B] ærow
elementary
ææææææ
transformations
ÆÍ 0 c22 c23 d2 ˙
ÍÎ 0 0 c33 d3 ˙˚
The corresponding system of equations is
c11 x + c12 y + c13 z = d1
9.5 Gauss Elimination Method 9.5

c22 y + c23 z = d2
c33 z = d3

The solution of the system is obtained by solving these equations by back substitution.
Working rule
(i) Write the matrix form of the system of equations.
(ii) Write the augmented matrix.
(iii) Obtain the echelon form of the augmented matrix by using elementary row
transformations.
(iv) Write the corresponding linear system of equations from the echelon form.
(v) Solve the corresponding linear system of equations by back substitution.

example 1
Solve the following system of equations:
x + 3y + 2z = 5
2 x + 4 y - 6 z = -4
x + 5 y + 3z = 10
Solution
The matrix form of the system is
Ax = B
È1 3 2 ˘ È x ˘ È 5˘
Í ˙Í ˙ Í ˙
Í 2 4 - 6˙ Í y ˙ = Í- 4˙
ÍÎ 1 5 3˙˚ ÍÎ z ˙˚ ÍÎ 10 ˙˚
The augmented matrix of the system is
È1 3 2 5˘
Í ˙
[ ] Í
A : B = 2 4 - 6 - 4 ˙
ÍÎ 1 5 3 10 ˙˚
Reducing the augmented matrix to echelon form,
R2 - 2 R1 , R3 - R1

È1 3 2 5˘
[ A : B] ∼ Í0 -2 -10 -14˙˙
Í
ÍÎ0 2 1 5˙˚
9.6 Chapter 9 Solutions of a System of Linear Equations

Ê 1ˆ
ÁË - 2 ˜¯ R2

È1 3 2 5˘
Í ˙
∼ Í0 1 5 7 ˙
ÍÎ0 2 1 5˙˚

R3 - 2 R2

È1 3 2 5˘
Í ˙
∼ Í0 1 5 7 ˙
ÍÎ0 0 -9 -9˙˚
The corresponding system of equations is
x + 3y + 2z = 5
y + 5z = 7
- 9 z = -9
Solving these equations by back substitution,
z =1
y = 7 - 5z = 7 - 5 (1) = 2
x = 5 - 3 y - 2 z = 5 - 3 (2 ) - 2 (1) = -3

Hence, the solution is


x = - 3, y = 2, z = 1

example 2
Solve the following system of equations:
2 x + y + z = 10
3 x + 2 y + 3z = 18
x + 4 y + 9 z = 16

Solution
The matrix form of the system is
Ax = B
È2 1 1 ˘ È x ˘ È10 ˘
Í ˙Í ˙ Í ˙
Í3 2 3˙ Í y ˙ = Í18 ˙
ÍÎ1 4 9˙˚ ÎÍ z ˙˚ ÍÎ16 ˙˚
9.5 Gauss Elimination Method 9.7

The augmented matrix of the system is


È2 1 1 10 ˘
[ A : B] = ÍÍ3 2 3 18˙˙
ÍÎ1 4 9 16 ˙˚

Reducing the augmented matrix to echelon form,


R13

È1 4 9 16 ˘
[ A : B] ∼ ÍÍ3 2 3 18˙˙
ÍÎ2 1 1 10 ˙˚

R2 - 3 R1 , R3 - 2 R1

È1 4 9 16 ˘
Í ˙
~ Í0 -10 -24 -30 ˙
ÍÎ0 -7 -17 -22 ˙˚

Ê 1ˆ
ÁË - 10 ˜¯ R2

È1 4 9 16 ˘
Í ˙
24
~ Í0 1 3˙
Í 10 ˙
Í0 -7 -17 -22 ˙
Î ˚
R3 + 7 R2

È1 4 9 16 ˘
Í ˙
24
~ Í0 1 3˙
Í 10 ˙
Í 1 ˙
Í0 0 - -1˙
Î 5 ˚
The corresponding system of equations is

x + 4y + 9 z = 16
24
y+ z= 3
10
1
- z = -1
5
9.8 Chapter 9 Solutions of a System of Linear Equations

Solving these equations by back substitution,


z=5
24 24
y = 3- z = 3 - (5) = -9
10 10
x = 16 - 4 y - 9 z = 16 - 4(-9) - 9(5) = 7

Hence, the solution is


x = 7, y = - 9, z = 5

example 3
Solve the following system of equations:
6 x - y - z = 19
3 x + 4 y + z = 26
x + 2 y + 6 z = 22

Solution
The matrix form of the system is
Ax = B
È6 -1 -1˘ È x ˘ È19 ˘
Í ˙Í ˙ Í ˙
Í3 4 1˙ Í y ˙ = Í26 ˙
ÍÎ 1 2 6 ˙˚ ÍÎ z ˙˚ ÍÎ22 ˙˚
The augmented matrix of the system is
È6 -1 -1 19˘
[ ] ÍÍ3 4 1 26˙˙
A : B =
ÍÎ 1 2 6 22 ˙˚

Reducing the augmented matrix to echelon form,


R13
È 1 2 6 22 ˘
[ ] ÍÍ3 4 1 26˙˙
A : B ∼
ÍÎ6 -1 -1 19˙˚
9.5 Gauss Elimination Method 9.9

R2 – 3R1, R3 – 6R1
È1 2 6 22 ˘
Í ˙
~ Í0 -2 -17 - 40 ˙
ÍÎ0 -13 -37 -113˙˚

Ê 1ˆ
ÁË - 2 ˜¯ R2

È1 2 6 22 ˘
Í ˙
17
~ Í0 1 20 ˙
Í 2 ˙
Í0 -13 -37 -113˙
Î ˚
R3 + 13 R2
È1 2 6 22 ˘
Í ˙
17
~ Í0 1 20 ˙
Í 2 ˙
Í 147 ˙
Í0 0 147˙
Î 2 ˚
The corresponding system of equations is
x + 2y + 6 z = 22
17
y+ z = 20
2
147
z = 147
2
Solving these equations by back substitution,
z=2
17 17
y = 20 - z = 20 - (2 ) = 3
2 2
x = 22 - 2 y - 6 z = 22 - 2 (3) - 6 (2 ) = 4

Hence, the solution is


x = 4, y = 3, z = 2
9.10 Chapter 9 Solutions of a System of Linear Equations

example 4
Solve the following system of equations:
5 x + 5 y + 2 z = 12
2 x + 4 y + 5z = 2
39 x + 43 y + 45z = 74

Solution
The matrix form of the system is
Ax = B
È 5 5 2 ˘ È x ˘ È12 ˘
Í ˙Í ˙ Í ˙
Í 2 4 5˙ Í y ˙ = Í 2 ˙
ÍÎ39 43 45˙˚ ÍÎ z ˙˚ ÍÎ74 ˙˚
The augmented matrix of the system is
È 5 5 2 12 ˘
[ A : B] = ÍÍ 2 4 5 2˙˙
ÍÎ39 43 45 74 ˙˚
Reducing the augmented matrix to echelon form,
Ê 1ˆ
ÁË 5 ˜¯ R1

È 2 12 ˘
Í 1 1 5 5˙
Í ˙
[ A : B] ∼ Í 2 4 5 2˙
Í39 43 45 74 ˙
Í ˙
Î ˚
R2 - 2 R1 , R3 - 39 R1

È 2 12 ˘
Í1 1 5 5˙
Í ˙
Í
~ Í0 2
21 14 ˙
- ˙
5 5
Í ˙
Í0 4 147 98
- ˙
ÍÎ 5 5 ˙˚

Ê 1ˆ
ÁË 2 ˜¯ R2
9.5 Gauss Elimination Method 9.11

È 2 12 ˘
Í1 1 5 5˙
Í ˙
Í
~ Í0 1
21 14 ˙
- ˙
10 10
Í ˙
Í0 4 147 - 98 ˙
ÍÎ 5 5 ˙˚
R3 – 4R2
È 2 12 ˘
Í1 1 5 5˙
Í ˙
Í
~ Í0 1
21 14 ˙
- ˙
10 10
Í ˙
Î 0 0 21 -14 ˚
The corresponding system of equations is
2 12
x+ y+ z=
5 5
21 14
y+ z=-
10 10
21z = -14
Solving these equations by back substitution,
14 2
z=- =-
21 3
14 21 14 21 Ê 2 ˆ
y = - - z= - - Á- ˜ = 0
10 10 10 10 Ë 3 ¯
12 2 12 2 Ê 2 ˆ 8
x= - y- z= - - =
5 5 5 5 ÁË 3 ˜¯ 3
Hence, the solution is
8 2
x = , y = 0, z = -
3 3

example 5
Use the Gauss elimination method to solve the following equations:
x + 4y - z = - 5
x + y - 6 z = - 12
3x - y - z = 4 [Summer 2015]
9.12 Chapter 9 Solutions of a System of Linear Equations

Solution
The matrix form of the system is
Ax = B
È1 4 -1˘ È x ˘ È -5 ˘
Í ˙Í ˙ Í ˙
Í1 1 -6 ˙ Í y ˙ = Í-12 ˙
ÍÎ3 -1 -1˙˚ ÍÎ z ˙˚ ÍÎ 4 ˙˚

The augmented matrix of the system is


È1 4 -1 -5 ˘
Í ˙
[ A : B] = Í1 1 -6 -12 ˙
ÍÎ3 -1 -1 4 ˙˚
Reducing the augmented matrix to echelon form,
R2 – R1, R3 – 3R1
È1 4 -1 -5˘
Í ˙
[ A : B ] ~ Í 0 -3 -5 -7 ˙
ÍÎ0 -13 2 19 ˙˚
Ê 1ˆ
ÁË - ˜¯ R2
3
È1 4 -1 -5˘
Í ˙
5 7˙
~ Í0 1
Í 3 3˙
Í0 -13 2 19 ˙
Î ˚
R3 + 13 R2
È1 4 -1 -5 ˘
Í ˙
5 7 ˙
~ Í0 1
Í 3 3 ˙
Í 71 148 ˙
Í0 0 ˙
Î 3 3 ˚
The corresponding system of equations is
x + 4 y - z = -5
5 7
y+ z =
3 3
71 148
z=
3 3
9.5 Gauss Elimination Method 9.13

Solving these equations by back substitution,


148
z=
71
7 5 7 5 Ê 148 ˆ 81
y= - z= - Á ˜¯ = -
3 3 3 3 71Ë 71
Ê 81 ˆ 148 117
x = -5 - 4 y + z = -5 - 4 Á - ˜ + =
Ë 71¯ 71 71
Hence, the solution is
117 81 148
x= , y=- , z=
71 71 71

example 6
Solve the following system of linear equations:
8 y + 2 z = -7
3x + 5y + 2z = 8
6 x + 2 y + 8 z = 26 [Summer 2014]
Solution
The matrix form of the system is
Ax = B
È0 8 2 ˘ È x ˘ È-7˘
Í ˙Í ˙ Í ˙
Í3 5 2 ˙ Í y ˙ = Í 8 ˙
ÍÎ6 2 8 ˙˚ ÍÎ z ˙˚ ÍÎ 26 ˙˚

The augmented matrix of the system is


È0 8 2 -7˘
Í ˙
[ A : B] = Í 3 5 2 8 ˙
ÍÎ6 2 8 26 ˙˚

Reducing the augmented matrix to echelon form,


R12
È3 5 2 8 ˘
Í ˙
[ A : B] ~ Í0 8 2 -7˙
ÍÎ6 2 8 26 ˙˚
9.14 Chapter 9 Solutions of a System of Linear Equations

Ê 1ˆ
ÁË ˜¯ R1
3
È 5 2 8˘
Í1 3 3 3˙
Í ˙
~ Í0 8 2 -7˙
Í6 2 8 26 ˙˚
Î
R3 - 6 R1
È 5 2 8˘
Í1 3 3 3˙
Í ˙
~ Í0 8 2 -7˙
Í0 -8 4 10 ˙˚
Î
Ê 1ˆ
ÁË ˜¯ R2
8
È 5 2 8 ˘
Í1 3 3 3 ˙
Í ˙
~ ÍÍ0 1
1 7˙
- ˙
4 8
Í ˙
Î0 -8 4 10 ˚
R3 + 8 R2
È 5 2 8 ˘
Í1 3 3 3 ˙
Í ˙
~ ÍÍ0 - ˙˙
1 7
1
4 8
Í ˙
Î0 0 6 3 ˚
The corresponding system of equations is
5 2 8
x+ y+ z =
3 3 3
1 7
y+ z = -
4 8
6z = 3
Solving these equations by back substitution,
1
z=
2
7 1 7 1 Ê 1ˆ
y=- - z = - - Á ˜ = -1
8 4 8 4 Ë 2¯
8 5 2 8 5 2 Ê 1ˆ
x = - y - z = - (-1) - Á ˜ = 4
3 3 3 3 3 3 Ë 2¯
9.6 Gauss Elimination Method with Partial Pivoting 9.15

Hence, the solution is


1
x = 4, y = -1, z =
2

9.6 GauSS eliminatiOn methOd With


Partial PivOtinG
For a large system of linear equations, the Gaussian elimination method can involve a
large number of arithmetic computations, each of which can produce rounding errors.
This is due to the fact that every computation is dependent on previous results.
Consequently, an error in the early step will tend to propagate, i.e., it will cause errors
in subsequent steps, and the final solution will become inaccurate. The rounding error
can be reduced by the Gaussian elimination method with partial pivoting.
Consider the system of equations:
a11 x + a12 y + a13 z = b1
a21 x + a22 y + a23 z = b2
a31 x + a32 y + a33 z = b3

The matrix form of the system is


È a11 a12 a13 ˘ È x ˘ È b1 ˘
Í ˙Í ˙ Í ˙
Ía21 a22 a23 ˙ Í y ˙ = Íb2 ˙
ÍÎ a31 a32 a33 ˙˚ ÍÎ z ˙˚ ÍÎb3 ˙˚

The augmented matrix of the system is


È a11 a12 a13 b1 ˘
Í ˙
[ A : B] = Ía21 a22 a23 b2 ˙
ÍÎ a31 a32 a33 b3 ˙˚

For the partial pivoting process, the left column is searched for the largest absolute-
value entry. This entry is called the pivot. The row interchange is performed, if
necessary, to bring the pivot in the first row. The first row is divided by the pivot and
elementary row operations are used to reduce the remaining entries in the first column
to zero. The completion of these steps is called a pass. After performing the first pass,
the first row and first column are ignored and the process is repeated on the remaining
submatrix. This process is continued until the matrix is in the row echelon form.
The term partial in partial pivoting refers to the fact that in each pivot search, only
entries in the left column of the matrix or submatrix are considered. This search can be
extended to include every entry in the coefficient matrix or submatrix. The resulting
method is called the Gaussian elimination method with complete pivoting. Generally,
partial pivoting is preferred because complete pivoting becomes very complicated.
9.16 Chapter 9 Solutions of a System of Linear Equations

example 1
Solve the following system of equations using partial pivoting by the
Gauss elimination method:
2 x1 + 2 x2 + x3 =6
4 x1 + 2 x2 + 3 x3 = 4
x1 + x2 + x3 = 0
[Summer 2015]

Solution
The matrix form of the system is
Ax = B
È2 2 1˘ È x1 ˘ È6 ˘
Í ˙Í ˙ Í ˙
Í 4 2 3 ˙ Í x2 ˙ = Í 4 ˙
ÍÎ1 1 1˙˚ ÍÎ x3 ˙˚ ÍÎ0 ˙˚

The augmented matrix of the system is


È2 2 1 6 ˘
Í ˙
[ A : B] = Í 4 2 3 4 ˙
ÍÎ1 1 1 0 ˙˚

In the left column, 4 is the pivot because it is the entry that has the largest absolute
value.
R12
È4 2 3 4 ˘
Í ˙
[ A : B] ~ Í2 2 1 6 ˙
ÍÎ1 1 1 0 ˙˚
Ê 1ˆ
ÁË 4 ˜¯ R1

È 1 3 ˘
Í1 2 4

Í ˙
~ Í2 2 1 6˙
Í1 0 ˙˚
Î 1 1
9.6 Gauss Elimination Method with Partial Pivoting 9.17

R2 - 2 R1 , R3 - R1
È 1 3 ˘
Í1 2 4

Í ˙
~ ÍÍ0 4 ˙˙
1
1 -
2
Í ˙
Í0 1 1
-1˙
ÎÍ 2 4 ˚˙

This completes the first pass. For the second pass, the pivot is 1 in the submatrix
formed by deleting the first row and first column.

1
R3 - R
2 2
È 1 3 ˘
Í1 2 4

Í ˙
~ ÍÍ0 4 ˙˙
1
1 -
2
Í ˙
Í0 1
0 -3˙
ÎÍ 2 ˙˚

The corresponding system of equations is


1 3
x1 + x2 + x3 = 1
2 4
1
x2 - x3 = 4
2
1
x = -3
2 3

Solving these equations by back substitution,


x3 = -6
1 1
x2 = 4 + x3 = 4 + (-6) = 1
2 2
1 3 1 3
x1 = 1 - x2 - x3 = 1 - (1) - (-6) = 5
2 4 2 4

Hence, the solution is


x1 = 5, x2 = 1, x3 = –6
9.18 Chapter 9 Solutions of a System of Linear Equations

example 2
Solve the following system of equations using the Gauss elimination
method with partial pivoting.
x + y+ z = 7
3 x + 3 y + 4 z = 24
2 x + y + 3z = 16

Solution
The matrix form of the system is
Ax = B
È1 1 1 ˘ È x ˘ È 7 ˘
Í ˙Í ˙ Í ˙
Í3 3 4 ˙ Í y ˙ = Í24 ˙
ÍÎ2 1 3 ˙˚ ÍÎ z ˙˚ ÍÎ16 ˙˚

The augmented matrix of the system is


È1 1 1 7 ˘
Í ˙
[ A : B] = Í3 3 4 24 ˙
ÍÎ2 1 3 16 ˙˚

In the left column, 3 is the pivot because it is the entry that has largest absolute value.
R12
È3 3 4 24 ˘
Í ˙
[ A : B] ~ Í1 1 1 7 ˙
ÍÎ2 1 3 16 ˙˚
Ê 1ˆ
ÁË 3 ˜¯ R1

È 4 ˘
Í1 1 3 8 ˙
Í ˙
~ Í1 1 1 7 ˙
Í2 1 3 16 ˙
Î ˚
R2 - R1 , R3 - 2 R1
È 4 ˘
Í1 1 3

Í ˙
Í
~ Í0 0 -
1
-1˙˙
3
Í ˙
Í0 -1 1 0˙
ÎÍ 3 ˚˙
9.6 Gauss Elimination Method with Partial Pivoting 9.19

This completes the first pass. For the second pass, the pivot is –1 in the submatrix
formed by deleting the first row and first column.
R23
È 4 ˘
Í1 1 3

Í ˙
Í
~ Í0 -1
1
0 ˙˙
3
Í ˙
Í0 0 - 1 -1˙
ÎÍ 3 ˚˙
(-1) R2
È 4 ˘
Í1 1 3 8˙
Í ˙
~ ÍÍ0 1 - 0 ˙˙
1
3
Í ˙
Í0 0 - 1 -1˙
ÎÍ 3 ˚˙
The corresponding system of equations is
4
x+y+ z=8
3
1
y- z = 0
3
1
- z = -1
3
Solving these equations by back substitution,
z=3
1 1
y= z = (3) = 1
3 3
4 4
x = 8 - y - z = 8 - 1 (3) = 3
3 3
Hence, the solution is
x = 3, y = 1, z=3

exerCiSe 9.1
Solve the following systems of equations by the Gauss elimination method:
1. x - y + z = 1
-3x + 2y - 3z = -6
2 x - 5y + 4 z = 5
ÈÎAns.: x = -2, y = 3, z = 6 ˘˚
9.20 Chapter 9 Solutions of a System of Linear Equations

2. x + 3y - 2 z = 5
2 x + y - 3z = 1
3x + 2y - z = 6
ÎÈAns.: x = 1, y = 2, z = 1˘˚
3. 6 x + 3y + 6 z = 30
2 x + 3y + 3z = 17
x + 2y + 2 z = 11
ÈÎAns.: x = 1, y = 2, z = 3˘˚

4. 2 x + y + z = 4
3y - 3 z = 0
- y + 2z = 1
ÈÎAns.: x = 1, y = 1, z = 1˘˚

5. 2 x + 2y + z = 12
3x + 2y + 2 z = 8
5x + 10 y - 8 z = 10
ÈÎAns.: x = -12.75, y = 14.375, z = 8.75˘˚

6. 3x + 4 y + 5z = 18
2 x - y + 8 z = 13
5x - 2y + 7 z = 20
ÎÈAns.: x = 3, y = 1, z = 1˘˚

7. 2 x + 6 y - z = -12
5x - y + z = 11
4 x - y + 3z = 10

È 113 172 22 ˘
Í Ans.: x = 69 , y = - 69 , z = 69 ˙
Î ˚

9.7 GauSS—JOrdan methOd

This method is a modification of the Gauss elimination method. This method


solves a given system of equations by transforming the coefficient matrix into a
unit matrix.
Consider the system of equations
a11 x + a12 y + a13 z = b1
9.7 Gauss—Jordan Method 9.21

a21 x + a22 y + a23 z = b2

a31 x + a32 y + a33 z = b3

The matrix form of the system is

È a11 a12 a13 ˘ È x ˘ È b1 ˘


Í ˙ Í ˙ Í ˙
Ía 21 a22 a23 ˙ Í y ˙ = Íb2 ˙
ÍÎ a31 a32 a33 ˙˚ ÍÎ z ˙˚ ÍÎb3 ˙˚

The augmented matrix of the system is


È a11 a12 a13 b1 ˘
Í ˙
[ A : B] = Ía21 a22 a23 b2 ˙
ÍÎ a31 a32 a33 b3 ˙˚

Applying elementary row transformations to augmented matrix to reduce coefficient


matrix to unit matrix,
È1 0 0 d1 ˘
Í ˙
[ A : B] ærow elementary
ææææææ
transformations
Æ Í0 1 0 d2 ˙
ÍÎ0 0 1 d3 ˙˚

The corresponding system of equations is


x = d1
y = d2
z = d3
Hence, the solution is
x = d1, y = d2, z = d3
Working rule
(i) Write the matrix form of the system of equations.
(ii) Write the augmented matrix.
(iii) Reduce the coefficient matrix to unit matrix by applying elementary row
transformations to the augmented matrix.
(iv) Write the corresponding linear system of equations to obtain the solution.

example 1
Solve the following system of equations:
x + 3 y + 2 z = 17
x + 2 y + 3z = 16
2 x - y + 4 z = 13
9.22 Chapter 9 Solutions of a System of Linear Equations

Solution
The matrix form of the system is
Ax = B
È1 3 2 ˘ È x ˘ È17 ˘
Í ˙Í ˙ Í ˙
Í1 2 3 ˙ Í y ˙ = Í16 ˙
ÍÎ2 -1 4 ˙˚ ÍÎ z ˙˚ ÍÎ13˙˚

The augmented matrix of the system is


È1 3 2 17 ˘
[ A : B] = ÍÍ1 2 3 16˙˙
ÍÎ2 -1 4 13˙˚
Applying elementary row transformations to the augmented matrix,
R2 - R1 , R3 - 2 R1

È 1 3 2 17˘
[ A : B] ∼ ÍÍ0 -1 1 -1˙˙
ÍÎ0 -7 0 -21˙˚

(-1) R2
È 1 3 2 17˘
Í ˙
∼ Í0 1 -1 1˙
ÍÎ0 -7 0 -21˙˚

R1 - 3 R2 , R3 + 7 R2
È1 0 5 14 ˘
Í ˙
~ Í0 1 -1 1˙
ÍÎ0 0 -7 -14 ˙˚

Ê 1ˆ
ÁË - 7 ˜¯ R3

È1 0 5 14 ˘
Í ˙
∼ Í0 1 -1 1˙
ÍÎ0 0 1 2˙˚
R1 - 5 R3 , R2 + R3

È1 0 0 4 ˘
Í ˙
~ Í0 1 0 3 ˙
ÍÎ0 0 1 2 ˙˚
9.7 Gauss—Jordan Method 9.23

The corresponding system of equations is


x=4
y=3
z=2
Hence, the solution is
x = 4, y = 3, z = 2

example 2
Solve the following system of equations:
3 x - 2 y + 5z = 2
4 x + y + 2z = 4
2 x - y + 4z = 7

Solution
The matrix form of the system is
Ax = B
È 3 -2 5˘ È x ˘ È2 ˘
Í ˙Í ˙ Í ˙
Í4 1 2 ˙ Í y ˙ = Í4 ˙
ÍÎ2 -1 4 ˙˚ ÍÎ z ˙˚ ÍÎ7 ˙˚
The augmented matrix of the system is
È 3 -2 5 2 ˘
[ A : B] = ÍÍ4 1 2 4˙˙
ÍÎ2 -1 4 7˙˚

Applying elementary row transformations to the augmented matrix,


R1 - R3
È1 -1 1 -5˘
[ A : B] ∼ ÍÍ4 1 2 4˙˙
ÍÎ2 -1 4 7˙˚
R2 - 4R1 , R3 - 2R1
È1 -1 1 -5˘
Í ˙
∼ Í0 5 -2 24 ˙
ÍÎ0 1 2 17 ˙˚
9.24 Chapter 9 Solutions of a System of Linear Equations

R23
È1 -1 1 -5˘
Í ˙
∼ Í0 1 2 17 ˙
ÍÎ0 5 -2 24 ˙˚

R1 + R2 , R3 - 5R2
È1 0 3 12˘
Í ˙
∼ Í0 1 2 17˙
ÍÎ0 0 -12 -61˙˚

Ê 1ˆ
ÁË - 12 ˜¯ R3

È1 0 3 12 ˘
Í ˙
Í ˙
∼ Í0 1 2 17 ˙
Í 61 ˙
Í0 0 1 ˙
Î 12 ˚
R1 - 3R3 , R2 - 2R3
È 13 ˘
Í1 0 0 - 4 ˙
Í ˙
Í
∼ Í0 1 0
41 ˙

Í ˙
Í0 0 1 61 ˙
ÍÎ 12 ˙˚
The corresponding system of equations is
13
x=-
4
41
y=
6
61
z=
12
Hence, the solution is
13 41 61
x=- , y= , z=
4 6 12
9.7 Gauss—Jordan Method 9.25

example 3
Solve the following system of equations:
x - 2y =- 4
- 5y + z = - 9
4x - 3z = - 10

Solution
The matrix form of the system is
Ax = B
È 1 -2 0 ˘ È x ˘ È -4 ˘
Í ˙ Í ˙ Í ˙
Í0 -5 1˙ Í y ˙ = Í -9˙
ÍÎ4 0 -3˙˚ ÍÎ z ˙˚ ÍÎ-10 ˙˚

The augmented matrix of the system is


È 1 -2 0 -4 ˘
[ A : B] = ÍÍ0 -5 1 -9˙˙
ÍÎ4 0 -3 -10 ˙˚
Applying elementary row transformations to the augmented matrix,
R3 - 4 R1
È 1 -2 0 -4 ˘
[ ] ÍÍ0 -5 1 -9˙˙
A : B ∼
ÍÎ0 8 -3 6 ˙˚

Ê 1ˆ
ÁË - 5 ˜¯ R2

È 1 -2 0 - 4˘
Í ˙
1 9˙
∼ Í0 1 -
Í 5 5˙
Í0 8 -3 6˙˚
Î
9.26 Chapter 9 Solutions of a System of Linear Equations

R1 + 2R2 , R3 - 8R2
È 2 2˘
Í1 0 - 5 - ˙
5
Í ˙
∼ ÍÍ0 1 -
1 9˙
5 5˙
Í ˙
Í0 0 - 7 42
- ˙
ÍÎ 5 5 ˙˚
Ê 5ˆ
ÁË - 7 ˜¯ R3

È 2 2˘
Í1 0 - - ˙
Í 5 5˙
Í
∼ Í0 1 - 1 9˙
˙
Í 5 5˙
Í0 0 1 6 ˙˙
ÍÎ ˚
Ê 2ˆ Ê 1ˆ
R1 + Á ˜ R3 , R2 + Á ˜ R3
Ë 5¯ Ë 5¯

È1 0 0 2 ˘
Í ˙
∼ Í0 1 0 3 ˙
ÍÎ0 0 1 6 ˙˚
The corresponding system of equations is
x=2
y=3
z=6
Hence, the solution is
x = 2, y = 3, z = 6

example 4
Solve the following system of equations:
2 x - 6 y + 8 z = 24
5 x + 4 y - 3z = 2
3 x + y + 2 z = 16
9.7 Gauss—Jordan Method 9.27

Solution
The matrix form of the system is
Ax = B
È2 -6 8˘ È x ˘ È24 ˘
Í ˙Í ˙ Í ˙
Í 5 4 -3˙ Í y ˙ = Í 2 ˙
ÍÎ 3 1 2 ˙˚ ÍÎ z ˙˚ ÍÎ16 ˙˚
The augmented matrix of the system is
È2 -6 8 24 ˘
[ A : B] = ÍÍ5 4 -3 2˙˙
ÍÎ 3 1 2 16 ˙˚
Applying elementary row transformations to the augmented matrix,
Ê 1ˆ
ÁË 2 ˜¯ R1

È1 -3 4 12 ˘
[ A : B] ∼ Í5 4 -3 2˙˙
Í
ÍÎ3 1 2 16 ˙˚

R2 - 5R1 , R3 - 3R1
È1 -3 4 12˘
Í ˙
∼ Í0 19 -23 -58˙
ÍÎ0 10 -10 -20 ˙˚

Ê 1ˆ
ÁË 19 ˜¯ R2

È1 -3 4 12 ˘
Í ˙
23 58
∼ Í0 1 - - ˙
Í 19 19 ˙
Í0 10 -10 -20 ˙
Î ˚
R1 + 3R2 , R3 - 10 R2
È 7 54 ˘
Í1 0 19 19 ˙
Í ˙
∼ ÍÍ0 1 -
23 58 ˙
-
19 19 ˙
Í ˙
Í0 0 40 200 ˙
ÍÎ 19 19 ˙˚
9.28 Chapter 9 Solutions of a System of Linear Equations

Ê 19 ˆ
ÁË 40 ˜¯ R3

È 7 54 ˘
Í1 0 19 19 ˙
Í ˙
∼ ÍÍ0 1 - ˙
23 58
- ˙
19 19
Í ˙
Î0 0 1 5 ˚
Ê 7ˆ Ê 23 ˆ
R1 - Á ˜ R3 , R2 + Á ˜ R3
Ë 19 ¯ Ë 19 ¯
È1 0 0 1 ˘
Í ˙
∼ Í0 1 0 3˙
ÍÎ0 0 1 5˙˚

The corresponding system of equations is


x=1
y=3
z=5
Hence, the solution is
x = 1, y = 3, z = 5

example 5
Solve the following system of linear equations:
2 x + 5 y - 3z = 1
5x + y + 4z = 2
7 x + 3y + z = 4

Solution
The matrix form of the system is
Ax = B
È2 5 -3˘ È x ˘ È1 ˘
Í ˙Í ˙ Í ˙
Í 5 1 4 ˙ Í y ˙ = Í2 ˙
ÍÎ7 3 1 ˙˚ ÍÎ z ˙˚ ÍÎ4 ˙˚
9.7 Gauss—Jordan Method 9.29

The augmented matrix of the system is


È2 5 -3 1 ˘
Í ˙
[ A : B] = Í 5 1 4 2 ˙
ÍÎ7 3 1 4 ˙˚

Applying elementary row transformations to the augmented matrix,


Ê 1ˆ
ÁË ˜¯ R1
2
È 5 3 1˘
Í1 -
2 2 2˙
Í ˙
[ A : B] ~ Í 5 1 4 2˙
Í7 3 1 4 ˙˚
Î
R2 - 5 R1 , R3 - 7 R1
È 5 3 1 ˘
Í1 -
2 2 2 ˙
Í ˙
~ ÍÍ0 -
23 23 1˙
- ˙
2 2 2
Í ˙
Í0 - 29 23 1 ˙
ÍÎ 2 2 2 ˙˚
Ê 2ˆ
ÁË - ˜¯ R2
23
È 5 3 1˘
Í1 -
2 2 2˙
Í ˙
~ Í0Í 1 -1

23 ˙
Í ˙
Í0 - 29 23 1 ˙
ÍÎ 2 2 2 ˙˚
5 29
R1 - R2 , R3 + R2
2 2
È 9˘
Í1 0 1 23 ˙
Í ˙
~ ÍÍ0 1 -1

23 ˙
Í ˙
Í0 0 -3 26 ˙
ÍÎ 23 ˙˚
9.30 Chapter 9 Solutions of a System of Linear Equations

Ê 1ˆ
ÁË - ˜¯ R3
3
È 9 ˘
Í1 0 1 23 ˙
Í ˙
Í
~ Í0 1 -1
1 ˙
23 ˙
Í ˙
Í0 0 1 - 26 ˙
ÍÎ 69 ˙˚
R1 - R3 , R2 + R3
È 53 ˘
Í1 0 0 69 ˙
Í ˙
Í 1˙
~ Í0 1 0 - ˙
3
Í ˙
26
Í0 0 1 - ˙
ÍÎ 69 ˙˚

The corresponding system of equations is


53
x=
69
1
y=-
3
26
z=-
69

Hence, the solution is


53 1 26
x= ,y=- ,z=-
69 3 69

exerCiSe 9.2
Solve the following systems of equations by Gauss–Jordan method:

1. x + 2y + z = 3
2 x + 3y + 3z = 10
3x - y + 2 z = 13
ÈÎAns.: x = 2, y = -1, z = 3˘˚
9.8 Gauss—Jacobi Method 9.31

2. 2 x + 3y - z = 5
4 x + 4 y - 3z = 3
2 x - 3y + 2 z = 2
ÎÈAns. : x = 1, y = 2, z = 3˘˚

3. 10 x + y + z = 12
2 x + 10 y + z = 13
x + y + 5z = 7
ÈÎAns. : x = 1, y = 1, z = 1˘˚

4. 2 x1 + x 2 - 3x 3 = 11
4 x1 - 2 x 2 + 3 x 3 = 8
-2 x1 + 2 x 2 - x 3 = -6

ÈÎ Ans. : x1 = 3, x 2 = -1, x 3 = -2˘˚

5. 2 x1 + 6 x 2 + x 3 = 7
x1 + 2 x 2 - x 3 = -1
5 x1 + 7 x 2 - 4 x 3 = 9

ÈÎ Ans. : x1 = 10, x 2 = -3, x 3 = 5˘˚

6. 2 x + y + 4 z = 12
8 x - 3y + 2 z = 20
4 x + 11y - z = 33

ÎÈAns. : x = 3, y = 2, z = 1˘˚

7. x + y + z= 1
4 x + 3y - z = 6
3 x + 5y + 3 z = 4
È 1 1˘
Í Ans. : x = 1, y = 2 , z = - 2 ˙
Î ˚

9.8 GauSS—JaCObi methOd

This method is applicable to the system of equations in which leading diagonal elements
of the coefficient matrix are dominant (large in magnitude) in their respective rows.
Consider the system of equations
a11 x + a12 y + a13 z = b1 ¸
Ô
a21 x + a22 y + a23 z = b2 ˝ … (9.1)
a31 x + a32 y + a33 z = b3 Ô˛
9.32 Chapter 9 Solutions of a System of Linear Equations

| || || |
where a11 , a22 , a33 are large as compared to the other coefficients in the correspond-
ing row and satisfy the condition of convergence as follows:
a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32

Rewriting the equations for x, y, and z respectively,


1 ¸
x= (b1 - a12 y - a13 z ) Ô
a11 Ô
1 ÔÔ
y= (b2 - a21 x - a23 z ) ˝ … (9.2)
a22 Ô
1 Ô
z= (b3 - a31 x - a32 y) Ô
a33 Ô˛

iteration 1
Assuming x = x0, y = y0, z = z0 as initial approximation and substituting in Eq. (9.2),
1
x1 =
a11
(b1 - a12 y0 - a13 z0 )
1
y1 =
a22
(b2 - a21 x0 - a23 z0 )
1
z1 =
a33
(b3 - a31 x0 - a32 y0 )
Again substituting these values of x, y, z in Eq. (9.2), the next approximation is
obtained.
The above iteration process is continued until two successive approximations are
nearly equal.
Working rule
(i) Arrange the equations in such a manner that the leading diagonal elements are
large in magnitude in their respective rows satisfying the conditions
a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32

(ii) Express the variables having large coefficients in terms of other variables.
9.8 Gauss—Jacobi Method 9.33

(iii) Start the iteration 1 by assuming the initial values of (x, y, z) as (x0, y0, z0) and
obtain (x1, y1, z1).
(iv) Start the iteration 2 by putting x = x1, y = y1, z = z1 in equations of x, y, z and
obtain (x2, y2, z2).
(v) The above process is repeated for the next iterations and it continues until two
successive approximations are nearly equal.

example 1
Solve the following system of equations:
6x + 2y - z = 4
x + 5y + z = 3
2 x + y + 4 z = 27

Solution
Rewriting the equations,
1 ¸
x= (4 - 2 y + z) Ô
6
Ô
1 Ô
y = (3 - x - z ) ˝ … (1)
5 Ô
1 Ô
z = (27 - 2 x - y)Ô
4 ˛
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and putting in
Eq. (1),
2
x1 = = 0.67
3
3
y1 = = 0.6
5
27
z1 = = 6.75
4
Iteration 2: Putting x1, y1, z1 in Eq. (1),
1
x2 = È4 - 2 (0.6 ) + 6.75˘˚ = 1.59

1
y2 =
5
[3 - 0.67 - 6.75] = - 0.884
1
z2 = È27 - 2 (0.67) - 0.6 ˘˚ = 6.265

9.34 Chapter 9 Solutions of a System of Linear Equations

Iteration 3: Putting x2, y2, z2 in Eq. (1),


1
x3 = È4 - 2 ( -0.884 ) + 6.265˘˚ = 2.005

1
y3 =
5
[3 - 1.59 - 6.265] = - 0.971
1
z3 = È27 - 2 (1.59) - ( -0.884 )˘˚ = 6.176

Iteration 4: Putting x3, y3, z3 in Eq. (1),
1
x4 = È4 - 2 ( -0.971) + 6.176 ˘˚ = 2.01

1
y4 =
5
[3 - 2.005 - 6.176] = -1.03
1
z4 = È27 - 2 (2.005) - ( -0.971)˘˚ = 5.99

Iteration 5: Putting x4, y4, z4 in Eq. (1),
1
x5 = È4 - 2 ( -1.03) + 5.99˘˚ = 2.00

1
y5 =
5
[3 - 2.01 - 5.99] = -1.00
1
z5 = È27 - 2 (2.01) - ( -1.03)˘˚ = 6.00

Since the fourth and fifth iteration values are nearly equal, the approximate solution
is
x = 2, y = –1, z = 6

example 2
Solve the following system of equations:
8 x - y + 2 z = 13
x - 10 y + 3z = 17
3 x + 2 y + 12 z = 25
9.8 Gauss—Jacobi Method 9.35

Solution
Since absolute values of all diagonal elements are large as compared to absolute values
of other coefficients, rewriting the equations,
1 ¸
x=
8
(13 + y - 2 z ) Ô
Ô
1 Ô
y = - (17 - x - 3z )˝ …(1)
10 Ô
1 Ô
z = (25 - 3 x - 2 y ) Ô
12 ˛
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as first approximation and putting in Eq. (1),
13
x1 = = 1.625
8
17
y1 = - = -1.7
10
25
z1 = = 2.08
12
Iteration 2: Putting x1, y1, z1 in Eq. (1),
1
x2 = È13 - 1.7 - 2 (2.08)˘˚ = 0.8925

1
y2 = - È17 - 1.625 - 3 (2.08)˘˚ = - 0.9135
10 Î
1
z2 = È25 - 3 (1.625) - 2 ( -1.7)˘˚ = 1.9604
12 Î
Iteration 3: Putting x2, y2, z2 in Eq. (1),
1
x3 = È13 - 0.9135 - 2 (1.9604 )˘˚ = 1.0207

1
y3 = - ÈÎ17 - 0.8925 - 3 (1.9604 )˘˚ = - 1.0226
10
1
z3 = È25 - 3 (0.8925) - 2 ( - 0.9135)˘˚ = 2.0124
12 Î
Iteration 4: Putting x3, y3, z3 in Eq. (1),
1
x4 = ÈÎ13 - 1.0226 - 2 (2.0124 )˘˚ = 0.9941
8
1
y4 = - È17 - 1.0207 - 3 (2.0124 )˘˚ = - 0.9942
10 Î
9.36 Chapter 9 Solutions of a System of Linear Equations

1
z4 = È25 - 3 (1.0207) - 2 ( - 1.0226 )˘˚ = 1.9985
12 Î
Since the third and fourth iteration values are nearly equal, the approximate solution
is
x = 1, y = –1, z = 2
The above method can also be represented in tabular form as follows:

Iteration 1 1 1
x= (13 + y - 2 z ) y=– (17 – x – 3z ) z= (25 - 3 x - 2 y)
number 8 10 12

x0 = 0 y0 = 0 z0 = 0
1
x1 = 1.625 y1 = – 1.7 z1 = 2.08
2 x2 = 0.8925 y2 = – 0.9135 z2 = 1.9604
3 x3 = 1.0207 y3 = – 1.0226 z3 = 2.0124
4 x4 = 0.9941 y4 = – 0.9942 z4 = 1.9985

exerCiSe 9.3
Solve the following system of equations by using Gauss–Jacobi method:
1. 4 x + y + 3z = 17
x + 5y + z = 14
2 x - y + 8 z = 12
ÎÈAns.: x = 3, y = 2, z = 1˘˚
2. 10 x + y + 2 z = 13
2 x + 10 y + 3z = 15
x + 3y + 10 z = 14
ÎÈAns.: x = 1, y = 1, z = 1˘˚

3. 10 x - 2y - 3z = 205
2 x - 10 y + 2 z = -154
2 x + y - 10 z = -120
ÎÈAns.: x = 32, y = 26, z = 21˘˚

4. 12 x + 2y + z = 27
2 x + 15y - 3z = 16
2 x - 3y + 25z = 23
ÈÎAns.: x = 2.0148, y = 0.9731, z = 0.8756 ˘˚
9.9  Gauss―Siedel Method        9.37

5. 20 x + y - 2 z = 17
3x + 20 y - z = -18
2 x - 3y + 20 z = 25

ÈÎAns.: x = 1, y = -1, z = 1˘˚

6. 10 x - 5y - 2 z = 3
4 x - 10 y + 3z = -3
x + 6 y + 10 z = -3

ÎÈAns.: x = 0.342, y = 0.285, z = -0.505˘˚

7. 8 x - 3y + 2 z = 20
4 x + 11y - z = 33
6 x + 3y + 12 z = 35

ÎÈAns.: x = 3.0168, y = 1.9859, z = 0.9118 ˘˚

8. x + y + 54 z = 110
27 x + 6 y - z = 85
6 x + 15y + 2 z = 72

ÎÈAns.: x = 2.425, y = 3.573, z = 1.926 ˘˚

9.9 Gauss―siedel Method

This method is applicable to the system of equations in which leading diagonal elements
of the coefficient matrix are dominant (large in magnitude) in their respective rows.
Consider the system of equations
a11 x + a12 y + a13 z = b1 ¸
Ô
a21 x + a22 y + a23 z = b2 ˝ …(9.3)
a31 x + a32 y + a33 z = b3 Ô˛
| || || |
where a11 , a22 , a33 are large as compared to the other coefficients in the correspond-
ing row and satisfy the condition of convergence as follows:
a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32


9.38 Chapter 9 Solutions of a System of Linear Equations

Rewriting the equations for x, y, and z respectively,


1 ¸
x=
a11
( b1 - a12 y - a13 z ) Ô
Ô
1 ÔÔ
y=
a22
( b2 - a21 x - a23 z )˝ …(9.4)
Ô
1 Ô
z= ( b3 - a31 x - a32 y ) Ô
a33 Ô˛

Iteration 1
Assuming x = x0, y = y0, z = z0 as initial approximations and substituting in the equation
of x,
1
x1 = (b1 - a12 y0 - a13 z0 )
a11
Now, substituting x = x1, z = z0 in the equation of y,
1
y1 = (b2 - a21 x1 - a23 z0 )
a22
Substituting x = x1, y = y1 in the equation of z,
1
z1 = (b3 - a31 x1 - a32 y)
a33

Iteration 2
Substituting y = y1, z = z1 in the equation of x,
1
x2 = (b1 - a12 y1 - a13 z1 )
a11
Substituting x = x2, z = z1 in the equation of y,
1
y2 = (b2 - a21 x2 - a23 z1 )
a22
Substituting x = x2, y = y2 in the equation of z,
1
z2 = (b3 - a31 x2 - a32 y2 )
a33

The above iteration process is continued until two successive approximations are
nearly equal.
Working rule
(i) Arrange the equations in such a manner that the leading diagonal elements are
large in magnitude in their respective rows such that
9.9  Gauss―Siedel Method        9.39

a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32

(ii) Express the variables having large coefficients in terms of other variables.
(iii) Start the iteration 1 by assuming the initial values of (x, y, z) as (x0, y0, z0).
(iv) In the iteration 1, put y = y0, z = z0 in the equation of x to obtain x1, put
x = x1, z = z0 in the equation of y to obtain y1, put x = x1, y = y1 in the equation
of z to obtain z1.
(v) The above process is repeated for the next iterations and it continues until two
successive approximations are nearly equal.

example 1
Solve the following system of equations:
3 x - 0.1y - 0.2 z = 7.85
0.1x + 7 y - 0.3z = -19.3
0.3 x - 0.2 y + 10 z = 71.4

Solution
Since diagonal elements are largest, the Gauss–Siedel method can be applied.
Rewriting the equations.

(7.85 + 0.1y + 0.2 z ) ¸Ô


1
x=
3
Ô
1 Ô
y = ( -19.3 - 0.1x + 0.3z )˝ …(1)
7 Ô
1 Ô
z = (71.4 - 0.3 x + 0.22 y ) Ô
10 ˛
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in
the equation of x,
1
x1 = (7.85) = 2.6167
3
Putting x = x1, z = z0 in the equation of y,
1
y1 = (-19.3 - 0.1x1 + 0.3z0 )
7
1
= È-19.3 - 0.1 (2.6167) + 0.3 (0 )˘˚

= -2.7945
9.40 Chapter 9 Solutions of a System of Linear Equations

Putting x = x1, y = y1 in the equation of z,


1
z1 = (71.4 - 0.3 x1 + 0.2 y1 )
10
1
=
10
[71.4 - 0.3(2.6167) + 0.2(-2.7945)]
= 7.0056
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 = (7.85 + 0.1y1 + 0.2 z1 )
3
1
=
3
[7.85 + 0.1(-2.7945) + 0.2(7.0056)]
= 2.9906
Putting x = x2, z = z1 in the equation of y,
1
y2 = (-19.3 - 0.1x2 + 0.3z1 )
7
1
=
7
[-19.3 - 0.1(2.9906) + 0.3(7.0056)]
= –2.4996
Putting x = x2, y = y2 in the equation of z,
1
z2 = (71.4 - 0.3 x2 + 0.2 y2 )
10
1
=
10
[71.4 - 0.3(2.9906) + 0.2(-2.4996)]
= 7.0003
Iteration 3: Putting y = y2, z = z2 in the equation of x,
1
x3 = (7.85 + 0.1y2 + 0.2 z2 )
3
1
=
3
[7.85 + 0.1(-2.4996) + 0.2(7.0003)]
= 3.000
Putting x = x3, z = z2 in the equation of y,
1
y3 = (-19.3 - 0.1x3 + 0.3z2 )
7
1
=
7
[-19.3 - 0.1(3) + 0.3(7.0003)]
= –2.4999
9.9  Gauss―Siedel Method        9.41

Putting x = x3, y = y3 in the equation of z,


1
z3 = (71.4 - 0.3 x3 + 0.2 y3 )
10
1
=
10
[71.4 - 0.3(3) + 0.2(-2.4999)]
= 7.0000
Since the second and third iteration values are nearly equal, the approximate solution
is
x = 3, y = –2.5, z = 7

example 2
Solve the following system of equations:
5 x + y - z = 10
2 x + 4 y + z = 14
x + y + 8 z = 20
Solution
Since diagonal elements are largest, the Gauss–Siedel method can be applied.
Rewriting the equations,
1
x = (10 - y + z )
5
1
y=
4
(14 - 2 x - z )
1
z=
8
(20 - x - y )
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in
the equation of x,
1
x1 = (10) = 2
5
Putting x = x1, z = z0 in the equation of y,
1
y1 =
4
(14 - 2 x1 - z0 )
1
=
4
[14 - 2(2) - 0]
= 2.5
9.42 Chapter 9 Solutions of a System of Linear Equations

Putting x = x1, y = y1 in the equation of z,


1
z1 =
8
(20 - x1 - y1 )
1
= (20 - 2 - 2.5)
8
= 1.9375
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 =
5
(10 - y1 + z1 )
1
= (10 - 2.5 + 1.9375)
5
= 1.8875
Putting x = x2, z = z1 in the equation of y,
1
y2 = (14 - 2 x2 - z1 )
4
1
= ÈÎ14 - 2 (1.8875) - 1.9375˘˚
4
= 2.0719
Putting x = x2, y = y2 in the equation of z,
1
z2 = (20 - x2 - y2 )
8
1
= (20 - 1.8875 - 2.0719)
8
= 2.0050
Iteration 3: Putting y = y2, z = z2 in the equation of x,
1
x3 =
5
(10 - y2 + z2 )
1
= (10 - 2.0719 + 2.0050 )
5
= 1.9866
Putting x = x3, z = z2 in the equation of y,
1
y3 = (14 - 2 x3 - z2 )
4
1
= ÈÎ14 - 2 (1.9866 ) - 2.005˘˚
4
= 2.0055
9.9  Gauss―Siedel Method        9.43

Putting x = x3, y = y3 in the equation of z,


1
z3 = (20 - x3 - y3 )
8
1
= (20 - 1.9866 - 2.0055)
8
= 2.0009
Iteration 4: Putting y = y3, z = z3 in the equation of x,
1
x4 = (10 - y3 + z3 )
5
1
= (10 - 2.0055 + 2.0009)
5
= 1.9991
Putting x = x4, z = z3 in the equation of y,
1
y4 = (14 - 2 x4 - z3 )
4
1
= ÈÎ14 - 2 (1.9991) - 2.0009˘˚
4
= 2.0002
Putting x = x4, y = y4 in the equation of z,
1
z4 = (20 - x4 - y4 )
8
1
= (20 - 1.9991 - 2.0002 )
8
= 2.0001
Since the third and fourth iteration values are nearly equal, the approximate solution
is
x = 2, y = 2, z = 2

example 3
Solve the following system of linear equations:
8x + y + z = 5
x + 8y + z = 5
x + y + 8z = 5 [Summer 2015, Winter 2013]
9.44 Chapter 9 Solutions of a System of Linear Equations

Solution
Since diagonal elements are largest, the Gauss–Seidel method can be applied.
Rewriting the equations,
1
x= (5 - y - z )
8
1
y = (5 - x - z )
8
1
z = (5 - x - y )
8

Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in


the equation of x.
1
x1 = (5) = 0.625
8
Putting x = x1, z = z0 in the equation of y,
1
y1 = (5 - x1 - z0 )
8
1
= (5 - 0.625 - 0)
8
= 0.5469
Putting x = x1, y = y1 in the equation of z,
1
z1 = (5 - x1 - y1 )
8
1
= (5 - 0.625 - 0.5469)
8
= 0.4785
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 = (5 - y1 - z1 )
8
1
= (5 - 0.5469 - 0.4785)
8
= 0.4968
Putting x = x2, z = z1 in the equation of y,
1
y2 = (5 - x2 - z1 )
8
1
= (5 - 0.4968 - 0.4785)
8
= 0.5031
9.9  Gauss―Siedel Method        9.45

Putting x = x2, y = y2 in the equation of z,


1
z2 = (5 - x2 - y2 )
8
1
= (5 - 0.4968 - 0.5031)
8
= 0.5

Iteration 3: Putting y = y2, z = z2 in the equation x,


1
x3 = (5 - y2 - z2 )
8
1
= (5 - 0.5031 - 0.5)
8
= 0.4996
Putting x = x3, z = z2 in the equation of y,
1
y3 = (5 - x3 - z2 )
8
1
= (5 - 0.4996 - 0.5)
8
= 0.5001
Putting x = x3, y = y3 in the equation of z,
1
z3 = (5 - x3 - y3 )
8
1
= (5 - 0.4996 - 0.5001)
8
= 0.5

Since the second and third iteration values are nearly equal, the approximate solution
is
x = 0.5, y = 0.5, z = 0.5

example 4
Use the Gauss–Siedel method to solve
6 x + y + z = 105
4 x + 8 y + 3z = 155
5 x + 4 y - 10 z = 65 [Summer 2015]
9.46 Chapter 9 Solutions of a System of Linear Equations

Solution
Since diagonal elements are largest, the Gauss–Seidel method can be applied.
Rewriting the equations,
1
x= (105 - y - z )
6
1
y = (155 - 4 x - 3z )
8
1
z = - (65 - 5 x - 4 y)
10

Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in


the equation of x,
1
x1 = (105) = 17.5
6
Putting x = x1, z = z0 in the equation of y,
1
y1 = (155 - 4 x1 - 3z0 )
8
1
= [155 - 4(17.5) - 3(0)]
8
= 10.625

Putting x = x1, y = y1 in the equation of z,


1
z1 = - (65 - 5 x1 - 4 y1 )
10
1
= - [65 - 5(17.5) - 4(10.625)]
10
= 6.5
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 = (105 - y1 - z1 )
6
1
= (105 - 10.625 - 6.5)
6
= 14.6458
Putting x = x2, z = z1 in the equation of y,
1
y2 = (155 - 4 x2 - 3z1 )
8
1
= [155 - 4(14.6458) - 3(6.5)]
8
= 9.6146
9.9  Gauss―Siedel Method        9.47

Putting x = x2, y = y2 in the equation of z,


1
z2 = - (65 - 5 x2 - 4 y2 )
10
1
= - [65 - 5(14.6458) - 4(9.6146)]
10
= 4.6687

Iteration 3: Putting y = y2, z = z2 in the equation of x,


1
x3 = (105 - y2 - z2 )
6
1
= (105 - 9.6146 - 4.6687)
6
= 15.1195
Putting x = x3, z = z2 in the equation of y,
1
y3 = (155 - 4 x3 - 3z2 )
8
1
= [155 - 4(15.1195) - 3(4.6687)]
8
= 10.0645
Putting x = x3, y = y3 in the equation of z,
1
z3 = - (65 - 5 x3 - 4 y3 )
10
1
= - [65 - 5(15.1195) - 4(10.0645)]
10
= 5.0856

Iteration 4: Putting y = y3, z = z3 in the equation of y,


1
x4 = (105 - y3 - z3 )
6
1
= (105 - 10.0645 - 5.0856)
6
= 14.975
Putting x = x4, z = z3 in the equation of y,
1
y4 = (155 - 4 x4 - 3z3 )
8
1
= [155 - 4(14.975) - 3(5.0856)]
8
= 9.9804
9.48 Chapter 9 Solutions of a System of Linear Equations

Putting x = x4, y = y4 in the equation of z,


1
z4 = - (65 - 5 x4 - 4 y4 )
10
1
= - [65 - 5(14.975) - 4(9.9804)]
10
= 4.9797

Iteration 5: Putting y = y4, z = z4 in the equation of x,


1
x5 = (105 - y4 - z4 )
6
1
= (105 - 9.9804 - 4.9797)
6
= 15.0067

Putting x = x5, z = z4 in the equation of y,


1
y5 = (155 - 4 x5 - 3z4 )
8
1
= [155 - 4(15.0067) - 3(4.9797)]
8
= 10.0043

Putting x = x5, y = y5 in the equation of z,


1
z5 = - (65 - 5 x5 - 4 y5 )
10
1
= - [65 - 5(15.0067) - 4(10.0043)]
10
= 5.0051

Since the fourth and fifth iteration values are nearly equal, the approximate solution
is
x = 15, y = 10, z = 5

example 5
Solve the following system of equations:
25 x + 2 y - 3z = 48
3 x + 27 y - 2 z = 56
x + 2 y + 23z = 52
starting with (1, 1, 0).
9.9  Gauss―Siedel Method        9.49

Solution
Since diagonal elements are largest, the Gauss–Siedel method can be applied.
Rewriting the equations,
1
x=
25
(48 - 2 y + 3z )
1
y=
27
(56 - 3 x + 2 z )
1
z=
23
(52 - x - 2 y )
Iteration 1: It is given that x0 = 1, y0 = 1, z0 = 0. Putting y = y0, z = z0 in the equation
of x,
1
x1 =
25
(48 - 2 y0 + 3z0 )
1
= [ 48 - 2(1) + 3(0)]
25
= 1.84
Putting x = x1, z = z0 in the equation of y,
1
y1 =
27
(56 - 3 x1 + 2 z0 )
1
=
27
[56 - 3(1.84) + 2(0)]
= 1.8696
Putting x = x1, y = y1 in the equation of z,
1
z1 =
23
(52 - x1 - 2 y1 )
1
= È52 - 1.84 - 2 (1.8696 )˘˚
23 Î
= 2.0183
Iteration 2: Putting y = y1, z = z1, in the equation of x,
1
x2 =
25
(48 - 2 y1 + 3z1 )
1
= È48 - 2 (1.8696 ) + 3 (2.0183)˘˚
25 Î
= 2.0126
Putting x = x2, z = z1 in the equation of y,
1
y2 =
27
(56 - 3 x2 + 2 z1 )
9.50 Chapter 9 Solutions of a System of Linear Equations

1
= È56 - 3 (2.0126 ) + 2 (2.0183)˘˚
27 Î
= 1.9999
Putting x = x2 , y = y2 in the equation of z,
1
z2 =
23
(52 - x2 - 2 y2 )
1
= È52 - 2.0126 - 2 (1.9999)˘˚
23 Î
= 1.9994
Iteration 3: Putting y = y2, z = z2 in the equation of x,
1
x3 =
25
(48 - 2 y2 + 3z2 )
1
= È48 - 2 (1.9999) + 3 (1.9994 )˘˚
25 Î
= 1.9999
Putting x = x3, z = z2 in the equation of y,
1
y3 =
27
(56 - 3 x3 + 2 z2 )
1
= È56 - 3 (1.9999) + 2 (1.9994 )˘˚
27 Î
= 1.9999
Putting x = x3, y = y3 in the equation of z,
1
z3 =
23
(52 - x3 - 2 y3 )
1
= È52 - 1.9999 - 2 (1.9999)˘˚
23 Î
= 2.0000
Since the second and third iteration values are nearly equal, the approximate solution is
x = 2, y = 2, z = 2

example 6
Solve the following system of equations, by the Gauss–Seidel method:
2 x + y + 6z = 9
8 x + 3 y + 2 z = 13
x + 5y + z = 7 [Summer 2015]
9.9  Gauss―Siedel Method        9.51

Solution
Since diagonal elements are not largest in their respective rows, rearranging the equations,
we have
8 x + 3 y + 2 z = 13
x + 5y + z = 7
2 x + y + 6z = 9
Now, diagonal elements are largest. Rewriting the equations,
1
x= (13 - 3 y - 2 z )
8
1
y = (7 - x - z )
5
1
z = (9 - 2 x - y)
6
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in
the equation of x,
1
x1 = (13) = 1.625
8

Putting x = x1, z = z0 in the equation of y,


1
y1 = (7 - x1 - z0 )
5
1
= (7 - 1.625 - 0)
5
= 1.075

Putting x = x1, y = y1 in the equation of z,


1
z1 = (9 - 2 x1 - y1 )
6
1
= [9 - 2(1.625) - 1.075]
6
= 0.7792
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 = (13 - 3 y1 - 2 z1 )
8
1
= [13 - 3(1.075) - 2(0.7792)]
8
= 1.0271
9.52 Chapter 9 Solutions of a System of Linear Equations

Putting x = x2, z = z1 in the equation of y,


1
y2 = (7 - x2 - z1 )
5
1
= (7 - 1.0271 - 0.7792)
5
= 1.0387

Putting x = x2, y = y2 in the equation of z,


1
z2 = (9 - 2 x2 - y2 )
6
1
= [9 - 2(1.0271) - 1.0387]
6
= 0.9845

Iteration 3: Putting y = y2, z = z2 in the equation of x,


1
x3 = (13 - 3 y2 - 2 z2 )
8
1
= [13 - 3(1.0387) - 2(0.9845)]
8
= 0.9894

Putting x = x3, z = z2 in the equation of y,


1
y3 = (7 - x3 - z2 )
5
1
= (7 - 0.9894 - 0.9845)
5
= 1.0052

Putting x = x3, y = y3 in the equation of z,


1
z3 = (9 - 2 x3 - y3 )
6
1
= [9 - 2(0.9894) - 1.0052 ]
6
= 1.0027

Iteration 4: Putting y = y3, z = z3 in the equation of x,


1
x4 = (13 - 3 y3 - 2 z3 )
8
1
= [13 - 3(1.0052) - 2(1.0027)]
8
= 0.9974
9.9  Gauss―Siedel Method        9.53

Putting x = x4, z = z3 in the equation of y,


1
y4 = (7 - x4 - z3 )
5
1
= (7 - 0.9974 - 1.0027)
5
=1

Putting x = x4, y = y4 in the equation of z,


1
z4 = (9 - 2 x4 - y4 )
6
1
= [9 - 2(0.9974) - 1]
6
= 1.0009

Since the third and fourth iteration values are nearly equal, the approximate solution
is
x = 1, y = 1, z = 1

example 7
Solve the following system of equations:
x + 2y + z = 0
3x + y - z = 0
x - y + 4z = 3
starting with (1, 1, 1).
Solution
Since diagonal elements are not largest in their respective rows, rearranging the equations,
3x + y - z = 0
x + 2y + z = 0
x - y + 4z = 3
Now, diagonal elements are largest. Rewriting the equations,
1
x = (- y + z)
3
1
y= (- x - z)
2
1
z= (3 - x + y)
4
9.54 Chapter 9 Solutions of a System of Linear Equations

Iteration 1: Assuming x0 = 1, y0 = 1, z0 = 1 as initial approximation and substituting in


the equation of x,
1
x1 = (- y0 + z0 )
3
1
= (-1 + 1)
3
=0
Putting x = x1, z = z0 in the equation of y,
1
y1 = (- x1 - z0 )
2
1
= (-0 - 1)
2
= - 0.5
Putting x = x1, y = y1 in the equation of z,
1
z1 = (3 - x1 + y1 )
4
1
= (3 - 0 - 0.5)
4
= 0.625
Iteration 2: Putting y = y1, z = z1 in the equation of x,
1
x2 = (- y1 + z1 )
3
1
= [ -(-0.5) + 0.625]
3
= 0.375
Putting x = x2, z = z1, in the equation of y,
1
y2 = (- x2 - z1 )
2
1
= (-0.375 - 0.625)
2
= - 0.5
Putting x = x2, y = y2 in the equation of z,
1
z2 = (3 - x2 + y2 )
4
1
= (3 - 0.375 - 0.5)
4
= 0.5313
9.9  Gauss―Siedel Method        9.55

Iteration 3: Putting y = y2, z = z2 in the equation of x,


1
x3 = (- y2 + z2 )
3
1
=
3
[-(-0.5) + 0.5313]
= 0.3438
Putting x = x3, z = z2 in the equation of y,
1
y3 = (- x3 - z2 )
2
1
= (-0.3438 - 0.5313)
2
= - 0.4376
Putting x = x3, y = y3 in the equation of z,
1
z3 = (3 - x3 + y3 )
4
1
= (3 - 0.3438 - 0.4376)
4
= 0.5547
Iteration 4: Putting y = y3, z = z3 in the equation of x,
1
x4 = (- y3 + z3 )
3
1
=
3
[-(-0.4376) + 0.5547]
= 0.3307
Putting x = x4, z = z3 in the equation of y,
1
y4 = (- x4 - z3 )
2
1
= (- 0.3307 - 0.5547)
2
= - 0.4427
Putting x = x4, y = y4 in the equation of z,
1
z4 = (3 - x4 + y4 )
4
1
= (3 - 0.3307 - 0.4427)
4
= 0.5566
9.56 Chapter 9 Solutions of a System of Linear Equations

Iteration 5: Putting y = y4, z = z4 in the equation of z,


1
x5 = (- y4 + z4 )
3
1
=
3
[-(-0.4427) + 0.5566]
= 0.3331
Putting x = x5, z = z4 in the equation of y,
1
y5 = (- x5 - z4 )
2
1
= (-0.3331 - 0.5566)
2
= - 0.4449
Putting x = x5, y = y5 in the equation of z,
1
z5 = (3 - x5 + y5 )
4
1
= (3 - 0.3331 - 0.4449)
4
= 0.5555
Iteration 6: Putting y = y5, z = z5 in the equation of z,
1
x6 = (- y5 + z5 )
3
1
=
3
[-(-0.4449) + 0.5555]
= 0.3335
Putting x = x6, z = z5 in the equation of y,
1
y6 = (- x6 - z5 )
2
1
= (-0.3335 - 0.5555)
2
= - 0.4445

Putting x = x6, y = y6 in the equation of z,


1
z6 = (3 - x6 + y6 )
4
1
= (3 - 0.3335 - 0.4445)
4
= 0.5555
9.9  Gauss―Siedel Method        9.57

Since the fifth and sixth iteration values are nearly equal, the approximate solution is
x = 0.333, y = – 0.444, z = 0.555

example 8
Solve the following system of equations:
2 x - 15 y + 6 z = 72
- x + 6 y - 27 z = 85
54 x + y + z = 110
Solution
Since diagonal elements are not largest in their respective rows, rearranging the equations,
we have
54 x + y + z = 110
2 x - 15 y + 6 z = 72
- x + 6 y - 27 z = 85

Now, diagonal elements are largest. Rewriting the equations,


1
x= (110 - y - z )
54
1
y = - (72 - 2 x - 6 z )
15
1
z=- (85 + x - 6 y)
27
Iteration 1: Assuming x0 = 0, y0 = 0, z0 = 0 as initial approximation and substituting in
the equation of x,
1
x1 = (110) = 2.037
54
Putting x = x1, z = z0 in the equation of y,
1
y1 = - (72 - 2 x1 - 6 z0 )
15
1
=-
15
[72 - 2(2.037) - 6(0)]
= - 4.5284
9.58 Chapter 9 Solutions of a System of Linear Equations

Putting x = x1, y = y1 in the equation of z,


1
z1 = - (85 + x1 - 6 y1 )
27
1
= - [85 + 2.037 - 6(-4.5284)]
27
= - 4.2299
Iteration 2: Putting y = y1, z = z1, in the equation of x,
1
x2 = (110 - y1 - z1 )
54
1
=
54
[110 - (-4.5284) - (-4.2299)]
= 2.1992
Putting x = x2, z = z1 in the equation of y,
1
y2 = - (72 - 2 x2 - 6 z1 )
15
1
=-
15
[72 - 2(2.1992) - 6(-4.2299)]
= - 6.1987
Putting x = x2, y = y2 in the equation of z,
1
z2 = - (85 + x2 - 6 y2 )
27
1
=-
27
[85 + 2.1992 - 6(-6.1987)]
= - 4.6071
Iteration 3: Putting y = y2, z = z2, in the equation of x,
1
x3 = (110 - y2 - z2 )
54
1
=
54
[110 - (-6.1987) - (-4.6071)]
= 2.2371
Putting x = x3, z = z2 in the equation of y,
1
y3 = - (72 - 2 x3 - 6 z2 )
15
1
=-
15
[72 - 2(2.2371) - 6(-4.6071)]
= - 6.3446
9.9  Gauss―Siedel Method        9.59

Putting x = x3, y = y3 in the equation of z,


1
z3 = - (85 + x3 - 6 y3 )
27
1
=-
27
[85 + 2.2371 - 6(-6.3446)]
= - 4.6409
Iteration 4: Putting y = y3, z = z3, in the equation of x,
1
x4 = (110 - y3 - z3 )
54
1
=
54
[110 - (-6.3446) - (-4.6409)]
= 2.2405
Putting x = x4, z = z3 in the equation of y,
1
y4 = - (72 - 2 x4 - 6 z3 )
15
1
=-
15
[72 - 2(2.2405) - 6(-4.6409)]
= - 6.3576
Putting x = x4, y = y4 in the equation of z,
1
z4 = - (85 + x4 - 6 y4 )
27
1
=-
27
[85 + 2.2405 - 6(-6.3576)]
= - 4.6439
Iteration 5: Putting y = y4, z = z4, in the equation of x,
1
x5 = (110 - y4 - z4 )
54
1
=
54
[110 - (-6.3576) - (-4.6439)]
= 2.2408
Putting x = x5, z = z4 in the equation of y,
1
y5 = - (72 - 2 x5 - 6 z4 )
15
1
=-
15
[72 - 2(2.2408) - 6(-4.6439)]
= - 6.3588
9.60 Chapter 9 Solutions of a System of Linear Equations

Putting x = x5, y = y5 in the equation of z,


1
z5 = - (85 + x5 - 6 y5 )
27
1
= - [85 + 2.2408 - 6(-6.3588)]
27
= - 4.6442
Iteration 6: Putting y = y5, z = z5, in the equation of x,
1
x6 = (110 - y5 - z5 )
54
1
=
54
[110 - (-6.3588) - (-4.6442)]
= 2.2408
Putting x = x6, z = z5 in the equation of y,
1
y6 = - (72 - 2 x6 - 6 z5 )
15
1
= - [72 - 2(2.2408) - 6(-4.6442)]
15
= - 6.3589
Putting x = x6, y = y6 in the equation of z,
1
z6 = - (85 + x6 - 6 y6 )
27
1
= - [85 + 2.2408 - 6(- 6.3589)]
27
= - 4.6442
Since the fifth and sixth iteration values are nearly equal, the approximate solution is
x = 2.2408, y = –6.3589, z = –4.6442
The above method can also be represented in tabular form as follows:

Iteration 1 1 1
x= (110 - y - z ) y=– (72 - 2 x - 6 z ) z=- (85 + x - 6 y)
number 54 15 27

x0 = 0 y0 = 0 z0 = 0
1
x1 = 2.037 y1 = –4.5284 z1 = –4.2299
2 x2 = 2.1992 y2 = –6.1987 z2 = –4.6071
3 x3 = 2.2371 y3 = –6.3446 z3 = –4.6409
4 x4 = 2.2405 y4 = –6.3576 z4 = –4.6439
5 x5 = 2.2408 y5 = –6.3588 z5 = –4.6442
6 x6 = 2.2408 y6 = –6.3589 z6 = –4.6442
Points to Remember 9.61

exerCiSe 9.4
Solve the following system of equations by using Gauss–Seidel method:
1. 54 x + y + z = 110
2 x + 15y + 6 z = 72
- x + 6 y + 27 z = 85
ÈÎAns.: x = 1.92, y = 3.57, z = 2.42˘˚

2. 20 x + y - 2 z = 17
3x + 20 y - z = -18
2 x - 3y + 20 z = 25
 [ Ans.: x = 1, y = -1, z = 1]

3. 10 x + y + z = 12
2 x + 10 y + z = 13
2 x + 2y + 10 z = 14
 ÈÎAns.: x = 1, y = 1, z = 1˘˚

4. 27 x + 6 y - z = 85
6 x + 15y + 2 z = 72
x + y + 54 z = 110

ÈÎAns.: x = 2.43, y = 3.57, z = 1.92˘˚

5. 28 x + 4 y - z = 32
2 x + 17 y + 4 z = 35
x + 3y + 10 z = 24

[ Ans.: x = 0.99, y = 1.51, z = 1.85]

Points to remember
Gauss Elimination Method
(i) Write the matrix form of the system of equations.
(ii) Write the augmented matrix.
(iii) Obtain the echelon form of the augmented matrix by using elementary row
transformations.
(iv) Write the corresponding linear system of equations from the echelon form.
(v) Solve the corresponding linear system of equations by back substitution.
9.62 Chapter 9 Solutions of a System of Linear Equations

Gauss–Jordan Method
(i) Write the matrix form of the system of equations.
(ii) Write the augmented matrix.
(iii) Reduce the coefficient matrix to unit matrix by applying elementary row
transformations to the augmented matrix.
(iv) Write the corresponding linear system of equations to obtain the solution.
Gauss–Jacobi Method
(i) Arrange the equations in such a manner that the leading diagonal elements
are large in magnitude in their respective rows satisfying the conditions
a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32

(ii) Express the variables having large coefficients in terms of other variables.
(iii) Start the iteration 1 by assuming the initial values of (x, y, z) as (x0, y0, z0)
and obtain (x1, y1, z1).
(iv) Start the iteration 2 by putting x = x1, y = y1, z = z1 in equations of x, y, z and
obtain (x2, y2, z2).
(v) The above process is repeated for the next iterations and it continues until
two successive approximations are nearly equal.

Gauss–Siedel Method
(i) Arrange the equations in such a manner that the leading diagonal elements
are large in magnitude in their respective rows such that
a11 > a12 + a13

a22 > a21 + a23

a33 > a31 + a32


(ii) Express the variables having large coefficients in terms of other variables.
(iii) Start the iteration 1 by assuming the initial values of (x, y, z) as (x0, y0, z0).
(iv) In the iteration 1, put y = y0, z = z0 in the equation of x to obtain x1, put
x = x1, z = z0 in the equation of y to obtain y1, put x = x1, y = y1 in the equa-
tion of z to obtain z1.
(v) The above process is repeated for the next iterations and it continues until
two successive approximations are nearly equal.

You might also like