Chapter Four - Solutions of A System of Linear Equations
Chapter Four - Solutions of A System of Linear Equations
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
È x1 ˘
Í ˙
x
x = Í 2 ˙ is any vector of order n ¥ 1
Í˙
Í ˙
ÎÍ xn ˚˙
È b1 ˘
Í ˙
b
B = Í 2 ˙ is any vector of order m ¥ 1
Í ˙
Í ˙
ÎÍbm ˚˙
The corresponding column transformations are denoted by Cij, kCi, and Ci + kCj
respectively.
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
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
È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
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 ˙˚
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
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 ˙˚
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 ˙˚
Ê 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
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 ˙˚
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
1˙
Í ˙
~ Í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
1˙
Í ˙
~ ÍÍ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
1˙
Í ˙
~ ÍÍ0 4 ˙˙
1
1 -
2
Í ˙
Í0 1
0 -3˙
ÎÍ 2 ˙˚
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 ˙˚
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
8˙
Í ˙
Í
~ Í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
8˙
Í ˙
Í
~ Í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 ˙
Î ˚
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˙˚
È 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
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˙˚
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 ˙
6˙
Í ˙
Í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 ˙˚
Ê 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˙˚
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
Ê 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 ˙˚
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
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
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 ˙
Î ˚
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
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
(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
6Î
1
y2 =
5
[3 - 0.67 - 6.75] = - 0.884
1
z2 = È27 - 2 (0.67) - 0.6 ˘˚ = 6.265
4Î
9.34 Chapter 9 Solutions of a System of Linear Equations
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
8Î
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
8Î
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
6. 10 x - 5y - 2 z = 3
4 x - 10 y + 3z = -3
x + 6 y + 10 z = -3
7. 8 x - 3y + 2 z = 20
4 x + 11y - z = 33
6 x + 3y + 12 z = 35
8. x + y + 54 z = 110
27 x + 6 y - z = 85
6 x + 15y + 2 z = 72
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
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
(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.
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
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
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
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
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
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
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
5. 28 x + 4 y - z = 32
2 x + 17 y + 4 z = 35
x + 3y + 10 z = 24
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
(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