Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

Cramer's Rule

Gabriel Cramer was a Swiss mathematician (1704-


1752)

Reference from: http://www.mathcentre.ac.uk


: Fundamentals Methods of Mathematical
Economics
4th Edition (Page 103-107)
Introduction
 Cramer’s Rule is a method for solving linear
simultaneous equations. It makes use of
determinants and so a knowledge of these is
necessary before proceeding.

 Cramer’s Rule relies on determinants


Coefficient Matrices
 You can use determinants to solve a system of
linear equations.
 You use the coefficient matrix of the linear
system.
 Linear System Coeff Matrix
ax+by=e a b 
cx+dy=f c d 
 
Cramer’s Rule for 2x2 System
 Let A be the coefficient matrix
 Linear System Coeff Matrix
ax+by=e a b
= ad – bc
cx+dy=f c d
 If detA  0, then the system has exactly one
solution:
e b a e
f d and c f
x y
det A det A
Key Points
 The denominator consists of the coefficients
of variables (x in the first column, and y in
the second column).

 The numerator is the same as the


denominator, with the constants replacing the
coefficients of the variable for which you are
solving.
Example - Applying Cramer’s Rule
on a System of Two Equations
Solve the system:
 8x+5y= 2

 2x-4y= -10

The coefficient matrix is: 8 5  and


8 5
 2  4  (32)  (10)  42
  2 4

So: 2 5 8 2
and
 10  4 2  10
x y
 42  42
2 5
 10  4  8  (50) 42
x    1
 42  42  42
8 2
2  10  80  4  84
y   2
 42  42  42

Solution: (-1,2)
Applying Cramer’s Rule
on a System of Two Equations
 ax  by  e 2 x  3 y  16
 
cx  dy  f  3 x  5 y  14
a b 2 3
D  D  (2)(5)  (3)(3)  10  9  19
c d 3 5

e b  16  3
Dx  Dx   (16)(5)  (3)(14)  80  42  38
f d 14 5
2  16
a e Dy   (2)(14)  (3)(16)  28  48  76
Dy  3 14
c f Dx  38 D y 76
x   2 y   4
Dx Dy D 19 D 19
x y
D D
Evaluating a 3x3 Determinant
(expanding along the top row)
 Expanding by Minors (little 2x2
determinants)
a1 b1 c1
b2 c2 a2 c2 a2 b2
a2 b2 c2  a1  b1  c1
b3 c3 a3 c3 a3 b3
a3 b3 c3
1 3 2
0 3 2 3 2 0
2 0 3  (1)  (3)  (2)
2 3 1 3 1 2
1 2 3
 (1)(6)  (3)(3)  (  2)(4)
 6  9  8   23
Using Cramer’s Rule
to Solve a System of Three Equations
Consider the following set of linear equations

a11 x1  a12 x2  a13 x3  b1


a21 x1  a22 x2  a23 x3  b2
a31 x1  a32 x2  a33 x3  b3
Using Cramer’s Rule
to Solve a System of Three Equations
The system of equations above can be written in
a matrix form as:

 a11 a12 a13   x1   b1 


a a22    
a23   x2   b2  
 21
 a31 a32 a33   x3   b3 
Using Cramer’s Rule
to Solve a System of Three Equations
Define  a11 a12 a13 
a 
   21 22 23 
A  a a
 a31 a32 a33 
 x1   b1 
 x    x2 and  B   b2 
 x3   b3 
If D  0,thenthesystemhasauniquesolution
asshownbelow(Cramer'sRule).
D1 D2 D3
x1  , x2  , x3 
D D D
Using Cramer’s Rule
to Solve a System of Three Equations
where
a11 a12 a13 b1 a12 a13
D  a12 a22 a23 D1  b2 a22 a23
a13 a32 a33 b3 a32 a33

a11 b1 a13 a11 a12 b1


D2  a12 b2 a23 D3  a12 a22 b2
a13 b3 a33 a13 a32 b3
Example 1
Consider the following equations:
2 x1  4 x2  5 x3  36
3 x1  5 x2  7 x3  7
5 x1  3 x2  8 x3  31
 A x    B 
where
 2 4 5 
 A   3 5 7 
 5 3 8
Example 1
 x1   36 
 x    x2 and  B    7 
 x3   31

2 4 5
D  3 5 7  336
5 3 8

36 4 5
D1  7 5 7  672
31 3 8
Example 1
2 36 5
D2  3 7 7  1008
5 31 8
2 4 36
D3  3 5 7  1344
5 3 31
D1 672
x1   2
D 336
D 1008
x2  2   3
D 336
D3 1344
x3   4
D 336
Cramer’s Rule - 3 x 3
 Consider the 3 equation system below with variables
x, y and z:

a1 x  b1 y  c1z  C1
a2 x  b2 y  c2 z  C2
a3 x  b3 y  c3 z  C3
Cramer’s Rule - 3 x 3
 The formulae for the values of x, y and z are
shown below. Notice that all three have the
same denominator.

a1 C1 c1 a1 b1 C1
C1 b1 c1
a2 C2 c2 a2 b2 C2
C2 b2 c2
a 3 C 3 c3 a3 b3 C3
C3 b3 c3 y z
x a1 b1 c1 a1 b1 c1
a1 b1 c1
a2 b2 c2 a2 b2 c2
a2 b2 c2
a3 b3 c3 a3 b3 c3
a3 b3 c3
Example 1
 Solve the system : 3x - 2y + z = 9
 x + 2y - 2z = -5
x + y - 4z = -2
9 2 1 3 9 1
5 2 2 1 5 2
2 1 4 23 1 2 4 69
x  1 y   3
3 2 1 23 3 2 1 23
1 2 2 1 2 2
1 1 4 1 1 4
Example 1

3 2 9
1 2 5
1 1 2 0
z  0
3 2 1 23 The solution is
1 2 2
1 1 4 (1, -3, 0)
Cramer’s Rule
 Not all systems have a definite solution. If the
determinant of the coefficient matrix is zero, a
solution cannot be found using Cramer’s Rule
because of division by zero.
 When the solution cannot be determined, one of
two conditions exists:
 The planes graphed by each equation are parallel
and there are no solutions.
 The three planes share one line (like three pages of
a book share the same spine) or represent the same
plane, in which case there are infinite solutions.

You might also like