Cramer`s Rule

advertisement
Cramer's Rule
Gabriel Cramer was a Swiss mathematician (17041752)
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 
c d 
cx+dy=f


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
f d
x
det A
and
a e
c f
y
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:
So:
8 5 
 2  4


2
5
 10  4
x
 42
and
and
8
5
2 4
 (32)  (10)  42
8 2
2  10
y
 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

cx  dy  f
D 
a b
c d
e
Dx 
f
b
d
a
e
c
f
Dy 
Dy
Dx
x
y
D
D
2 x  3 y  16

 3x  5 y  14
2 3
D
 (2)(5)  (3)(3)  10  9  19
3 5
 16  3
Dx 
 (16)(5)  (3)(14)  80  42  38
14
5
2  16
Dy 
 (2)(14)  (3)(16)  28  48  76
3 14
Dy 76
Dx  38
x

 2 y 

4
D
19
D 19
Evaluating a 3x3 Determinant
(expanding along the top row)

Expanding by Minors (little 2x2 determinants)
a1
b1
c1
a2
b2
c2  a1
a3
b3
c3
b2
c2
b3
c3
 b1
a2
c2
a3
c3
 c1
a2
b2
a3
b3
1 3 2
2 0
1 2
0 3
2 3
2 0
3  (1)
 (3)
 (2)
2 3
1 3
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
a
 21
 a31
a12
a22
a32
a13   x1   b1 





a23   x2   b2 
a33   x3   b3 
Using Cramer’s Rule
to Solve a System of Three Equations
Define
 a11 a12 a13 
a

A

a
a
   21 22 23 
 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).
D3
D1
D2
x1  , x2 
, x3 
D
D
D
Using Cramer’s Rule
to Solve a System of Three Equations
where
a11 a12 a13
b1 a12
D  a12 a22 a23 D1  b2 a22
a13 a32
a11 b1
D2  a12 b2
a13 b3
a33
b3
a32
a13
a23
a33
a13
a11 a12 b1
a23 D3  a12 a22 b2
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  3x2  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
5
3
7  336
8
36
4
5
D1  7
5
7  672
3
8
31
Example 1
2
36
5
D2  3 7
7  1008
5 31 8
2
4
36
D3  3
5
5
3
7  1344
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  c3z  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.
C1 b1 c1
C2 b2 c2
C3 b3 c3
x
a1 b1 c1
a2 b2 c2
a3 b3 c3
a1 C1 c1
a2 C2 c2
a 3 C 3 c3
y
a1 b1 c1
a2 b2 c2
a3 b3 c3
a1 b1 C1
a2 b2 C2
a3 b3 C3
z
a1 b1 c1
a2 b2 c2
a3 b3 c3
Example 1

Solve the system :

9
5
2
x
3
1
1
2
2
1
2
2
1
1
2
4 23

1
1
23
2
4
3x - 2y + z = 9
x + 2y - 2z = -5
x + y - 4z = -2
3 9
1
1 5 2
1 2 4
69
y

 3
3 2 1
23
1 2 2
1 1 4
Example 1
3 2 9
1 2 5
1 1 2
0
z

0
3 2 1
23
1 2 2
1 1 4
The solution is
(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.
Download