System of Two Linear Equations
System of Two Linear Equations
System of Two Linear Equations
a11 x1 + a12 x2 = b1
a21 x1 + a22 x2 = b2
or
AX = B
a11 a12 x b
Where A = , X = 1 and B = 1 .
a21 a22 x2 b2
The matrix A is called the coefficient matrix of the system.
System of three Linear Equations: The system of 3 linear equations in 3
1
unknowns of the form
or
AX = B
a11 a12 a13 x1 b
1
Where A = a21 a22 a23 , X = x2 and B = b2 .
a31 a32 a33 x3 b3
The matrix A is called the coefficient matrix of the system.
2
Matrix Inversion Method
Since the non-homogeneous system of linear equations AX = B with n linear
equations and n unknowns has a unique solution X = A−1 B, so we can solve
the system by finding A−1 . We discuss this method in the following example.
Example 1: If possible, find the solution of the linear system by the matrix
inversion method.
3x1 − 2x2 + x3 = 1
x1 − 3x3 = 3
3 −2 1 x 1
1
where the coefficient matrix is A = 5 6 2 , X = x2 , B = 2.
1 0 −3 x3 3
3 −2 1
6 2 5 2 5 6
|A| = 5 6 2 = 3 − (−2) +1
0 −3 1 −3 1 0
1 0 −3
3
= 3(−18) + 2(−15 − 2) − 6
= −54 − 34 − 6 = −94 6= 0
4
−60 30
−60
1 −94 47
−6 3
= −6 = −94 =
−94
47
74
74 −94
− 37
47
30 3 37
⇒ x1 = 47
, x2 = 47
, x3 = − 47 To verify this solution, we put these values in all
three equations of the given system, i.e.
30 37 90 − 6 − 37
3 47
3x1 − 2x2 + x3 = 3 −2 − = = =1
47 47 47 47 47
30 3 37 150 + 18 − 74 94
5x1 + 6x2 + 2x3 = 5 +6 +2 − = = =2
47 47 47 47 47
30 37 30 + 111 141
x1 − 3x3 = −3 − = = =3
47 47 47 47
30 3 37
This verifies that x1 = 47
, x2 = 47
, x3 = − 47 is the solution of the given system.
Cramer’s Rule: Consider the non-homogeneous system of linear equations
in three variables
or
AX = B
5
a a a x b
11 12 13 1 1
Where A = a21 a22 a23 , X = x2 and B = b2 .
a31 a32 a33 x3 b3
b1 C11 +b2 C21 +b3 C31
|A|
b1 C12 +b2 C22 +b3 C32
= |A|
b1 C13 +b2 C23 +b3 C33
|A|
6
b1 a12 a13 a11 b1 a13 a11 a12 b1
b2 a22 a23 a21 b2 a23 a21 a22 b2
b3 a32 a33 a31 b3 a33 a31 a32 b3
⇒ x1 = , x2 = , x3 =
|A| |A| |A|
or
b1 a12 a13 a11 b1 a13 a11 a12 b1
b2 a22 a23 a21 b2 a23 a21 a22 b2
b3 a32 a33 a31 b3 a33 a31 a32 b3
⇒ x1 = , x2 = , x3 =
a11 a12 a13 a11 a12 a13 a11 a12 a13
a21 a22 a23 a21 a22 a23 a21 a22 a23
a31 a32 a33 a31 a32 a33 a31 a32 a33
7x1 + x2 = 4
3x1 − 6x2 = 8
7 1
Solution: The coefficient matrix is A = , so
3 −6
7 1
|A| =
= −42 − 3 = −45
3 −6
4 1 7 4
8 −6 3 8
−24 − 8 32 56 − 12 44
x1 = = = and x2 = = =−
|A| −45 45 |A| −45 45
7
Example 3: Use Cramer’s rule to solve the system
x+y+z =2
x + y − 2z = 3
3x − 5y + z = 7
1 1 1
Solution: The coefficient matrix is A = 1 1 −2
, so
3 −5 1
1 1 1
1 −2 1 −2 1 1
|A| = 1 1 −2 = 1 − 1 +1
−5 1 3 1 3 −5
3 −5 1
1 1
=− [2(1 − 10) − 1(3 + 14) + 1(−15 − 7)] = − [2(−9) − 1(17) + 1(−22)]
24 24
1 57 19
= − 24 [−18 − 17 − 22] = 24
= 8
8
1 2 1
1 3 −2
3 7 1
1 3 −2 1 −2 1 3
y= = 1 −2
+1
|A| −24 7 1 3 1
3 7
1 1 1
=− [1(3 + 14) − 2(1 + 6) + 1(7 − 9)] = − (1) = −
24 24 24
1 1 2
1 1 3
3 −5 7
1 1 3 1 3 1 1
x= = 1 −1
+2
|A| −24 −5 7 3 7
3 −5
1 1 1
=− [1(7 + 15) − 1(7 − 9) + 2(−5 − 3)] = − [22 + 2 − 16] = −
24 24 3
19 1
Thus, the required solution is x = 8
,y = − 24 , z = − 31 .
9
Practice Exercise
Use cramer’s rule to find the solution, if possible, each of the following systems
of non-homogeneous equations.
Q. 1
2x + y + z = 1
3x + y − 5z = 8
4x − y + z = 5
Q. 2
5x1 − 2x2 + x3 = 3
x1 + x2 + 3x3 = 2
Q. 3
2x − y + z = 1
3x + y − 5z = 8
4x + y + z = 5
6x1 + 5x2 = 3
3x1 + 4x2 = 32
10
Q. 5 Solve the following system of equations using Matrix method.
3x1 + x2 − x3 = −4
x1 + x2 − 2x3 = −4
−x1 + 2x2 − x3 = 1
3x + y + z = 3
2x + 2y + 5z = −1
x − 3y − 4z = 2
2x − y + z = 5
4x + 2y + 3z = 8
3x − 4y − z = 3
2x − y − z = 2
x + y − 2z = −4
3x + 2y − z = 1
11