You are on page 1of 4

Lecture # 18

CRAMER’S RULE

Gabriel Cramer (1704 - 1752) was a Swiss mathematician who published this rule in
1750. This rule is useful for finding the solution of n linear equations in n unknowns.
Although the method to solve the system of non-homogeneous linear equations Ax =b,
presented by Cramer is straight forward, nevertheless it is not recommended to use it if
the system contains more than four variables and equations.

In section 3.1, we have discussed that the system of two linear equations
a1 x  b1 y  c1
a 2 x  b2 y  c 2
a1 b1
has a solution if    0, and the solution is given by
a2 b2
1 2
x , y I 
 
where
c1 b1 a c1
1  and  2  1 
c2 b2 a2 c2
Further, we studied that the system of three linear equations
a1 x  b1 y  c1 z  d1
a 2 x  b2 y  c 2 z  d 2
a3 x  b3 y  c3 z  d 3
a1 b1 c1
has a unique solution if   a 2 b2 c 2  0, and then the solution is given by
a3 b3 c3
1 2 3
x , y , z II 
  

where
d1 b1 c1 a1 d1 c1 a1 b1 d1
1  d 2 b2 c2 ,  2  a2 d2 c2 and  3  a2 b2 d2 
d3 b3 c3 a3 d3 c3 a3 b3 d3
Similarly, if we have n linear equations in n unknowns such as

a11 x1  a12 x 2    a1n x n  b1


a 21 x1  a 22 x 2    a 2 n x n  b2
.......... .......... .......... .......... .......
a n1 x1  a n 2 x 2    a nn x n  bn
and

Muhammad Azam Joyo Page 1


a11 a12 ... a1n
a 21 a 22 ... a 2 n
  0, then the system has a solution which
... ... ... ...
a n1 a n2 ... a nn
is given by
1  
x1  , x 2  2 , , x n  n III 
  
where

b1 a12 ... a1n a11 b1 ... a1n a11 a12 ... b1


b a22 ... a2n a b2 ... a 2 n a 21 a 22 ... b2
1  2 ,  2  21 ,......... .......,  n  ;
... ... ... ... ... ... ... ... ... ... ... ...
bn an 2 ... ann a n1 bn ... a nn a n1 a n2 ... bn
that is,  is the determinant of the matrix of the coefficients and  j is obtained by
replacing the j th column of  by the column on R.H.S. of the linear system.

To find the solution of a system of linear equations by I , II  or III  is called Cramer’s
Rule.
NOTE: Sometimes we also use D in place of   Thus, if det A  D  , then
Dn D D
x1  , x 2  2 , , x n  n ;
D D D
where
D1  1 , D2   2 and Dn   n 

EXAMPLE 01: Solve the following system of linear equations by Cramer’s Rule:
x1  x 2  x 3  x 4  6
x1  x2  x3  1
3x  5y  2 2x1  x 3  x4  4
(i) (ii) 2x1  3x2  4x3  3 (iii)
2x  4y  3 3x3  6x4  3
4x1  9x2  10x3  11
x1  x4  5
Solution: (i) Given that
3x–5y=2
2x–4y=3
Let
3  5 3 5
A   Then det A  D   12  10  2  0
 2  4 2 4
2 5 3 2
D1   8  15  7 and D2   9  4  5;
3 4 2 3
Therefore,
D1 7 7 D 5 5
x   and y  2    x  7 / 2 and y  5 / 2
D 2 2 D 2 2

(ii) Given system of linear equation is

Muhammad Azam Joyo Page 2


x1  x 2  x 3  1
2x1  3x2  4x3  3
4x1  9x2  10x3  11
Here

1 1 1 1 1 1
D  2 3 4 R 2   2 R1 , R3   4 R1  D  0 1 2 (expanding by C1)
4 9 10 0 5 6
1 2
D   D  6  10  4  0
5 6
1 1 1 1 1 1 1 1 1
 D1  3 3 4  2 , D2  2 3 4 = -8 , D3  2 3 3
11 9 10 4 11 10 4 9 11
Now, we have
D1 2 1 D 8 D 2 1
x1     , x2  2   2, and x3  3   
D 4 2 D 4 D 4 2
Hence, the required solution of the above system of linear equations is:

x1 = -1/2, x2 = 2, and x3 = -1/2


(iii) Given system of linear equation is
x1  x2  x3  x4  6
2x1  x3  x4  4
3x3  6x4  3
x1  x4  5
1 1 1 1
2 0 1 1
Here, D . Expanding by C 2 , we have
0 0 3 6
1 0 0 1
2 1 1 2 1 1
D    0 3 6 . Taking 3 common from R2, we get, D   3 0 1 2 R13
1 0 1 1 0 1
1 0 1
D  3  0 1 2 R   2 R
3 1
2 1 1
1 0 1
 30 1 2 expanding by C1
0 1 1
1 2
3  D  31  2  9 
1 1
6 1 1 1 1 6 1 1 1 1 6 1 1 1 1 6
4 0 1 1 2 4 1 1 2 0 4 1 2 0 1 4
D1  = 30, D2  = 0, D3  = 39 D4  =
3 0 3 6 0 3 3 6 0 0 3 6 0 0 3 3
5 0 0 1 1 5 0 1 1 0 5 1 1 0 0 5
-15

Muhammad Azam Joyo Page 3


Now, we have
D1 30 10 D 0 D 39 13 D4 15 5
x1    , x 2  2   0, x3  3   and x 4    
D 9 3 D 9 D 9 3 D 9 3
Hence, the required solution of the above system of equations is:

x1=10/3, x2=0, x3=13/3, x4= - 5/3.

EXAMPLE 02: The Sum of three numbers is 6. If we multiply the third number by
2 and add the first number to the result, we get 7. By adding second and third
numbers to three times the first number we get 12. Use determinants to find the
numbers?

Solution: Let the three numbers be x, y and z. Then,, from the given conditions, we have

x  y  z  6
x  2z  7 
3x  y  z  12
Here,
1 1 1
0 2 1 2 1 0
D  1 0 2 1 1 1  0  2  1  6  1  0  4 
1 1 3 1 3 1
3 1 1
6 1 1
0 2 7 2 7 0
D1  7 0 2  6 1 1  60  2  7  24   7  0  12 
1 1 12 1 12 1
12 1 1
1 6 1
7 2 1 2 1 7
D2  1 7 2  1 6 1  17  24   61  6  112  21  4 
12 1 3 1 3 12
3 12 1
1 1 6
0 7 1 7 1 0
D3  1 0 7  1 1 6  10  7   112  21  61  0  8 
1 12 3 12 3 1
3 1 12
Therefore,
D1 12 D 4 D 8
x   3, y  2   1, z  3   2 
D 4 D 4 D 4

Hence the required three numbers are: 3, 1 and 2.

Muhammad Azam Joyo Page 4

You might also like