Вы находитесь на странице: 1из 21

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

Cramers Rule is a method for solving linear


simultaneous equations. It makes use of
determinants and so a knowledge of these is
necessary before proceeding.

Cramers 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

Cramers Rule for 2x2 System

Let A be the coefficient matrix


Linear System
Coeff Matrix
a b
ax+by=e
= 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

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 Cramers 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

8 5
(32) (10) 42
2 4

8
and

2 10
y
42

2
5
10 4 8 (50)
42
x

1
42
42
42

2 10 80 4 84
y

2
42
42
42

Solution: (-1,2)

Applying Cramers Rule


on a System of Two Equations
ax by e

cx dy f
a b
D
c d
e
Dx
f

b
d

a
Dy
c

e
f

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
Dx

16 3

(16)(5) (3)(14) 80 42 38

14
5
2 16
Dy
(2)(14) (3)(16) 28 48 76
3 14

D y 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
a3

b2
b3

b2
c2 a1
b3
c3

c2
a2
b1
c3
a3

c2
a2
c1
c3
a3

b2
b3

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 Cramers 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 Cramers 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

a23
a33

x1
x
2
x3

b1
b
2
b3

Using Cramers Rule


to Solve a System of Three Equations
Define

a11
a
A

21
a31
x1
x x2
x3

a13
a22 a23
a32 a33

and B

a12

b1
b
2
b3

If D 0,thenthesystemhasauniquesolution
asshownbelow(Cramer'sRule).
D3
D1
D2
x1 , x2
, x3
D
D
D

Using Cramers Rule


to Solve a System of Three Equations
where
a11 a12
D a12 a22
a13 a32

a13
b1
a23 D1 b2
a33
b3

a12
a22
a32

a13
a23
a33

a11 b1
D2 a12 b2
a13 b3

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 3 x2 8 x3 31

A x B
where

2 4 5
A 3 5 7
5 3 8

Example 1
x1
x x2 and B
x3

36

31

D 3

7 336

36

5
3

7 672
8

D1 7
31

Example 1
2 36 5
D2 3 7
7 1008
5 31 8

2 4
D3 3 5
5

36
7 1344
31

D1 672
x1

2
D 336
D 1008
x2 2
3
D 336
D3 1344
x3

4
D
336

Cramers 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

Cramers 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 :

3x - 2y + z = 9
x + 2y - 2z = -5
x + y - 4z = -2

1 5 2

2 1
x
3 2
1

4 23

1
1
23
2

1 2 4
69
y

3
3 2 1
23
1 2 2
1

Example 1

3 2

1 1 2
0
z

0
3 2 1
23
1 2 2
1

The solution is
(1, -3, 0)

Cramers Rule

Not all systems have a definite solution. If the


determinant of the coefficient matrix is zero, a
solution cannot be found using Cramers 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.

Вам также может понравиться