Uploaded by Kago Malibala

Systems of Linear Equations

advertisement
Chapter 6: Systems of Linear Equations
Topics: Solutions of systems of linear equations in two and three variables – Elementary row
operations, Elimination method, Substitution method, Gauss-Jordan method and Matrix inversion
method.
CONTENTS
6.1 Definition (system of linear equations)................................................................................ 1
6.1.1 Definition (system of linear equations in two and three variables) .............................. 1
6.2 Methods of Solving a System of Linear Equations ............................................................. 3
6.2.1 Example of system of linear equations in two variables............................................... 3
6.2.3 Example of system of linear equations in three variables............................................. 6
EXERCISES ............................................................................................................................ 10
PAST TEST-2 QUESTIONS WITH SOLUTION .................................................................. 11
PAST EXAM QUESTIONS WITH SOLUTION ................................................................... 11
6.1 Definition (system of linear equations)
For the system of equations
a11 x1    a1n x n  b1
a 21 x1    a 2 n x n  b2




a m1 x1    a mn x n  bm
,
a1n 
 a11


 is said to be the coefficient matrix of the system.
the m  n matrix A  




amn 
 am1
The (n1) vector of variable and the (m1) vectors of constants are respectively
x  ( x1 , x2 ,..., xn )T and b  (b1 , b2 ,..., bm )T . Note that the system of equations may be
represented as
Ax  b .
 a11
The matrix  A | b   
 am1
a1n
amn
| b1 
 is known as the augmented matrix of the system.
|

| bm 
Note: As far as this course is concerned we shall only consider up to a maximum of three
equations in three unknowns.
6.1.1 Definition (system of linear equations in two and three variables)
A system of two linear equations in two variables (unknowns) may be written in the form
a11 x1  a12 x2  b1
,
a21 x1  a22 x2  b2
1
while a system of three linear equations in three variables (unknowns) is written in the form
a11 x1  a12 x2  a13 x3  b1
a21 x1  a22 x2  a23 x3  b2 .
a31 x1  a32 x2  a33 x3  b3
The following theorem guarantees that there are in fact three operations that will not alter the
solution(s) of a system of linear equations.
Theorem 6.1 (Without Proof)
If a system of linear equations is transformed into another linear system by one of the
following operations:
(1) Interchanging any two equations.
(2) Multiplying the terms of any equation by a non-zero real number.
(3) Adding to the terms of any equation, a scalar multiple of the corresponding terms of
another equation,
then the two systems have the same solution(s).
The following example illustrates the use of Theorem 6.1.
Example 1: Solution of the system of equations in three variables)
Find the solution of the following system of equations.
2 x1  2 x2
4
...(1)
3x1  3x2  x3  9
...(2)
x2  x3  3
...(3)
To illustrate that the operations (using Theorem 6.1), we first write the augmented matrix of
the system.
4
2 2 0
3 3 1
9 

 0 1 1
3 
Note: Now we perform the operations mentioned in Theorem 6.1, on the coefficients of the
system. The augmented matrix corresponding to each step is also written. The operations
permitted in the theorem can be performed correspondingly on the augmented matrix.
Step 1
First obtain the coefficient 1 for x1 in the first equation by multiplying the terms of the first
equation by 1 2 .
x1  x2  2
2
1 1 0

3x1  3x2  x3  9
9  .
3 3 1
0 1 1
x2  x3  3
3 
Step 2
Secondly eliminate x1 from the other equations by adding the terms of the second equation to
–3 times the first equation.
2
x1  x2  2
x3  3
x2  x3  3
1 1 0
0 0 1

0 1 1
2
3  .
3 
Step 3
Now that x1 appears only in the first equation and has coefficient 1, we turn our attention
to x 2 . First obtain the coefficient 1 for x 2 by interchanging the second and third equations:
x1  x2  2
2
1 1 0

x2  x3  3
3  .
0 1 1
0 0 1
x3  3
3 
Step 4
Now eliminate x 2 from the other equation by adding the terms of the first equation to -1 time
the corresponding terms in the second equation.
x1  x3  1
1
1 0 1

x2  x3  3
3  .
0 1 1
x3  3
3 
0 0 1
Step 4
Now that x 2 appears only in the second equation and has coefficient 1, we turn our attention
to x3 . In the third equation, x3 has coefficient 1. Therefore we proceed immediately to
eliminate x3 from the other equations by adding to the terms of the first equation the
corresponding terms of the third equation and by adding to the corresponding terms of the
second equation –1 times the corresponding terms of the third equation.
x1  2
2
1 0 0

x2  0
0  .
0 1 0
0 0 1
x3  3
3 
The solution of the latter system is (2, 0, 3) and by Theorem 6.1, the solution of the systems
in each step is also (2, 0, 3).
Remark: When two systems of linear equations have the same set of solutions, the systems are
said to be equivalent.
Hence the systems in each step of the previous example are all equivalent.
6.2 Methods of Solving a System of Linear Equations
(i)
(ii)
(iii)
(iv)
Elimination Method
Substitution Method
The Gauss-Jordan Method
Matrix Inversion Method
6.2.1 Example of system of linear equations in two variables
Example 2: Solve the following system of linear equations
2x-y = 1
3x+2y=12
The solution of the above linear equation are illustrated using the four methods of solving a
system of Linear equations and shown that solutions are same. If any one of the four methods
is not specified, one can use either method.
3
(i) Elimination Method
Solution
We have
2x-y = 1
3x+2y=12
Let us eliminate y .
2 x (1)
4x-2y=2
(2)
3x+2y=12
(3)+(4)
7x =14
x=2
From (5), substitute x =2 in (1), we have
2(2)-y=1
-y=1-4 →y=3
Hence the solution for the system of equations 1 and  2  is x  2 and y  3 .
(1)
(2)
(3)
(4)
(5)
Remark: In order to solve two independent linear equations simultaneously, we first
eliminate one of the two unknowns from the two equations. We then solve the resulting
equation in the other unknown. To find the eliminated unknown, we substitute the value
obtained in either one of the given equations.
(ii) Substitution Method
Solution
We have
2x-y = 1
3x+2y=12
From (1) we get y=-(1-2x). Substituting for y in (2) we get
3x-2(1-2x) =12 →3x-2+4x=12→7x=12+2=14
7x=14→x=2
(1)
(2)
(3)
From (3), substituting x=2 in (1) we have 2 (2)-y=1→ 4-y=1
y=3
Thus the solution is x=2 and y=3
Remark: In order to solve two independent linear equations simultaneously, we first find the
value of x or y from any one equation and substitute the value of x or y in another equation.
(iii) The Gauss-Jordan Method
The Gauss Jordan method is based on the elementary row operations. We have noticed that
operations ordinarily performed on equations of a given system can be performed on the
corresponding rows of the associated augmented matrix. It is a general procedure for solving
the system of linear equations by performing the sequence of elementary row operations that
transform the augmented matrix into its unique reduced form (or reduced echelon form).
The following operations performed on a matrix are called elementary row operations:
1. The interchange of any two rows.
2. The multiplication of the entries of any row by a non-zero real number.
3. The addition to the entries of any row, k times the corresponding entries of any other row,
where k is a real number.
4
Solution
2x-y = 1
3x+2y=12
 2 1
The augmented matrix is 
3 2
R1→(1/2) R1
1
3

R2→R2-3 R1
1
0

R2→(-1/7)R2
1
0

R1→ R1+R2
R2→(-2)R2
1
0

(1)
(2)
1
12 
1 / 2
2
1 / 2
12 
1 / 2
7/2
1/ 2 
21 / 2 
1 / 2
1 / 2
1/ 2 
3 / 2 
0
1
4 / 2
1 0


6 / 2
0 1
2
3
x  2
 whose solution is (2,3)
y  3
and since the original system is equivalent to the final system, it follows that (2,3) is also the
solution of the original system.
The final matrix is the augmented matrix of the system
(iv) Matrix Inversion Method
Solution
We have
2x-y = 1
3x+2y=12
In matrix notation we have
1  x  1 
2

3
2   y  12 

A
X
(1)
(2)
 b
AX=b
A-1AX=A-1b→IX= A-1b→X= A-1b
(3)
To get the solution, we have to find the inverse of A and premultiply by column vector b.
Inverse of A by cofactor method:
det( A)  [2 x2  3(1)]  [4  3]  7
Cofactors/Ad joint
c11  2, c12  3; c21  1, c22  2 hence
1  c11
A 

det( A)  c21
1
T
c12 
1  2 3   2 / 7
 


c22 
2   3 / 7
7 1
T
From equation (3) we have
X= A-1b
5
1/ 7 
2 / 7 
i.e.
 x   2 / 7 1 / 7  1  (2 / 7).1  (1 / 7).12  2 


 y    3 / 7
2 / 7  12  (-3 / 7).1  (2 / 7).12  3 
  
Thus the solution is x=2 and y=3
6.2.3 Example of system of linear equations in three variables
Solve the following system of linear equations.
2 x1  4 x2  6 x3  22
3x1  8 x2  5 x3  27
 x1  x2  2 x3  2
The solution of the above linear equation are illustrated using the four methods of solving a
system of Linear equations and shown that solutions are same. If any one of the four methods
is not specified, one can use either method.
(i) Elimination Method
Solution
We have
2x1+4x2+6x3 =22
3x1+8 x2+5 x3 =27
-x1+x2+2x3
=2
(1)
(2)
(3)
Consider equations 1 and  2  Let us eliminate x2
2x(1)
4x1+8x2+12x3 =44
(2)
3x1+8x2+5x3 =27
(4) -(5)
x1+7x3
=17
(4)
(5)
(6)
Consider equations 1 and (3) Let us eliminate x2 .
(1)
2x1+4x2+6x3 =22
4x(3)
-4x1+4 x2+8 x3 =8
(7) -(8)
6x1-2x3
=14
(7)
(8)
(9)
Now, consider equations (6) and (9), Let us eliminate x1.
6x(6)
6x1+42x3
= 102
(9)
6x1-2x3
= 14
(10)-(11)
44 x3=88
x3= 2
From (12) substitute value of x3 in (6),
x1+7(2)
= 17
x1= 3
Substitutes the values of x1 and x3 in (3), we have
-3+x2+4
=2
x2 = 1
Hence the system has the solution x1  3 , x2  1 and x3  2 .
6
(10)
(11)
(12)
(13)
(ii) Substitution Method
Solution
We have
2x1+4x2+6x3 =22
3x1+8 x2+5 x3 =27
-x1+x2+2x3
=2
(1)
(2)
(3)
Substitute x2=2+x1-2x3 from (3) in (1), we have
2x1+4 (2+x1-2x3)+6x3 =22
2x1+8-8x3+6x3 =22
2x1+4x1-8x3+6x3=22-8
6x1-2x3= 14
(4)
Substitute x2=2+x1-2x3 from (3) in (2), we have
3x1+8 (2+x1-2x3 )+5 x3
=27
3x1+16 +8x1-16x3+5 x3
=27
3x1+8x1-16x3+5 x3
=27-16
11x1-11x3
= 11
(5)
Substitute x1=1+x3 from (5) in (4), we have
6(1+x3)-2x3 = 14
6+6x3-2x3
= 14
6+4x3
= 14
4x3
= 14-6
4x3= 8 →x3 = 2
(6)
Substitute x3= 2 from (6) in either of equations (4) or (5), let us substitute in (5),
11x1-11(2)
= 11
11x1
= 11+22
11x1 = 33→x1 = 3
(7)
Substitute x3= 2 and x1= 3 in (3),
-3+x2+2(2)
=2
x2=2-4+3→x2= 1
(8)
Hence the system has the solution x1  3 , x2  1 and x3  2 .
(iii) The Gauss-Jordan Method
Solution
We have
2x1+4x2+6x3 =22
3x1+8 x2+5 x3 =27
-x1+x2+2x3
=2
2
The augmented matrix is 3

 1
(1)
(2)
(3)
4
8
1
: 22 
: 27 

: 2 
6
5
2
7
R1→(1/2)R1
1
3

 1
2
8
1
3
5
2
:11 
: 27 

: 2 
1
0

 1
2
11
1
3
11
2
:11 
: 33

: 2 
1
0

0
2
11
3
3
11
5
:11 
: 33

:13 
1
0

0
2
1
3
3
1
5
:11
:3 

:13
1
0

0
0
1
3
1
1
5
:5 
:3 

:13
1
0

0
0
1
0
1
1
2
: 5
: 3

: 4 
1
0

0
0
1
0
1
1
1
: 5
: 3

: 2 
1
0

0
0
1
0
0
1
1
: 3
: 3

: 2 
1
0

0
0
1
0
0
0
1
: 3
:1 

: 2 
R2→R2+3R3
R3→R1+R3
R2→(1/11) R2
R1→R1-2 R2
R3→R3-3 R2
R3→(1/2)R3
R1→R1-R3
R2→R2-R3
x1  3 

The final matrix is the augmented matrix of the system x2  1  whose solution is (3,1,2) and
x3  2 
since the original system is equivalent to the final system, it follows that (3,1,2) is also the
solution of the original system.
8
(iv) Matrix Inversion Method
Solution
We have
2x1+4x2+6x3 =22
3x1+8 x2+5 x3 =27
-x1+x2+2x3
=2
(1)
(2)
(3)
In matrix notation we have
4
6   x1   22 
2
3
8
5   x2    27 

   
1
2   x3   2 
 1
A
X
 b
AX=b
A-1AX=A-1b→IX= A-1b→X= A-1b
(3)
To get the solution, we have to find the inverse of A and premultiply by column vector b.
The inverse of A by cofactor method
T
c12
c13 
 c11
1
1 
A1 
adjA 
c21
c22
c23 


det( A)
det( A)
 c31
c32
c33 
det( A)  [2(8.2  1.5)  4(3.2  5.( 1))  6(3.1  ( 1).8)]
det( A)  [2(11)  4(11)  6(11)]  22  44  66  44
Cofactors/Ad joint
8
5
c11 
 (8.2  1.5)  16  5  11;
1
2
c12  
c13 
3
1
c21  
c22 
3
1
4
1
2
1
c23  
2
1
5
 (3.2  ( 1).5)  (6  5)  11;
2
8
 (3.1  ( 1).8)  16  5  11;
1
6
 (4.2  1.6)  (8  6)  2;
2
6
 (2.2  ( 1).6)  (4  6)  10;
2
4
 (2.1  ( 1).4)  (2  4)  6;
1
9
c31 
4
8
c32  
c33 
6
 (4.5  8.6)  (20  48)  28;
5
2
3
2
3
6
 (2.5  3.6)  (10  18)  8;
5
4
 (2.8  3.4)  (16  12)  4;
8
11
1
1 
1
A 
adjA 
2
det( A)
44 
 28
 11
 44

11
1
A  
 44
 11

 44
2
44
10
44
6

44

11
10
8
T
11 
11
1 

6 
11

44 
4 
11
2
10
6
28
8 

4 
28 
44 

8 
44 
4 

44 

X= A-1b
 11

 x1   44
 x     11
 2   44
 x3   11

 44
2
44
10
44
6

44

28 
44   22 

8  
27
44   
2 
4  

44 

2
28
 11

 44 .22  44 .27  44 .2 
 x1  
 3 
 x     11 .22  10 .27  8 .2   1 
 2   44
44
44   
  2 
 x3   11
6
4
 .22  .27  .2 
44
44
 44

Thus the solution is x1=3, x2=1 and x3=2
EXERCISES
1. Express the following system of linear equations as a single matrix equation and
define each matrix used. Also solve the system of equations using any method that
you know.
x1  x2  2
x2  3 x3  1 .
x1  2 x2  7
10
2.
Solve the following systems of linear equations using all the four methods you
learnt in this chapter and verify whether all the methods lead to the same set of solutions.
.
3x  2 y  4 z  5
4 x  6 y  10 z  6
yz 2
5x  6 y  7
(i)
, (ii) 2 x  3 y  z  8 , (iii) x  2 y  3z  1
and (iv) x  y  1
2x  y  4
x  2 y  4z  5
x  4y  5
2x  y  z  6
PAST TEST-2 QUESTIONS WITH SOLUTION
2010
Question 4
Solve the following system of linear equations by any method of your choice.
x1  x2
1
2 x1  5 x2  x3  2
 x1  3x2  x3  2
[20 Marks]
2011
Question 1
Solve the following system of linear equations by any method of your choice.
x1  2 x2  x3  7
x1  x2  x3  1
.
2 x1  3 x2  x3  9
[20 Marks]
2012
Question 4
Solve the following system of linear equations by any method of your choice:
x1  x2  x3  5
x2  x3  3
3x1  x2  2 x3  1
[20 Marks]
PAST EXAM QUESTIONS WITH SOLUTION
2012
Question 1
(h) Solve for the following simultaneous equations (use any method)
5 Marks
Solution
(h) solution by substitution methdod
From equation (1) we have, x  5  2 y
Substituting for x in 2 x  3 y  3 , we get
2 5  2 y   3 y  3
 10  4 y  3 y  3
 7 y  3  10  7
 y  1.
Finally, x  5  2   1  3
11
Question 2
(a)
Solve the following system of linear equations by any method that you know.
15 Marks
Solution
(a) Solution by Elimination Method
First, consider Eqs. (1) and (2): Eliminate
by 3 x Eq.(2)+Eq.(1) to obtain
(4)
Next, consider Eqs. (3) and (4) as each has only 2 variables
Eliminate by 2 x Eq.(3)+Eq.(4)
13
So, by Eq.(3),
And, substituting
into Eq. (2) yields
Thus, solution is
(b) Alternative Solution by Gauss-Jordan Method
Augmented matrix:
12
and
(easiest to handle!):
2013
1h) Solve the following system using Gauss-Jordan (Elementary Row Operation) method:
2x  y  4
x y 3
[5 Marks]
Solution
Consider the augmented system given by:
 2 1 4  R1  R2   1 0 1 



1
3

 2 R2  R1  0 1 2
 A, b  1
Thus the solution is x  1, y  2 .
(1+2+2 =5)
4c) Solve the following system of linear equations:
2 x  4 y  6 z  22
3x  8 y  5 z  27
x  y  2z  2
[12 Marks]
2014
1h) Solve the equations for x and y :
3x  y  1, x  2y  5.
[5 Marks]
4b) Solve the following system of linear equations:
3x  3 y  z  6
x  y  2z  5
2x  2 y  z  3
[20 Marks]
Solution
We have,
3x  3 y  z  6
x  y  2z  5
2x  2 y  z  3
(1)
(2)
(3)
We shall use substitution method.
From (1) z  3x  3 y  6
Substitute (4) in (2) to get x  y  23x  3 y  6  5
 x-y+6 x+6 y-12=5
 7 x  5 y = 17
13
(4)
(5)
Substitute (4) in (3) to get 2 x+2 y-( 3x+3 y-6 )=3
 2 x+2 y-3x  3 y  6=3
 x y=3
From (6), substituting, x=3 - y in (5) we get ,
73  y   5 y=17
 21  7 y  5 y  17
 2 y  4
 y2
From (6), x=3  y  3  2  1 , and finally from (1) z  3.1  3.2  6  3
Thus, x= 1, y= 2 and z = 3
14
(6)
Download