You are on page 1of 10

Cramers Rule

Cramers rule is a method of solving a system of linear equations through the use of
determinants.
Matrices and Determinants
To use Cramers Rule, some elementary knowledge of matrix algebra is required. An
array of numbers, such as
6

a11 a12

A=
3 4

a21 a22

is called a matrix. This is a 2 by 2 matrix. However, a matrix can be of any size, defined by
m rows and n columns (thus an m by n matrix). A square matrix, has the same number of
rows as columns. To use Cramers rule, the matrix must be square.
A determinant is number, calculated in the following way for a 2 by 2 matrix:
a11

a12

A =

= a11 a22 - a21 a12


a21 a22

For example, letting a11 = 6, a12 = 5, a21 = 3, a22 = 4:


6

A =

= 6 (4) - 3 (5) = 9
3

For m by n matrices of orders larger than 2 by 2, there is a general procedure that can be
used to find the determinant. This procedure is best explained as an example. Consider the
determinant for a 3 by 3 matrix
A =

a11 a12 a13


a21 a22 a23
a31 a32 a33

The determinant A is calculated as follows:

a22 a23

a31 a23
a21 a22
- a12
+ a13
a31 a33
a31 a32
note the sign change

A = a11
a32 a33

A = a11 (a22 a33 - a23 a32) - a12 (a21 a33 - a23 a31) + a13 (a21 a32 - a22 a31)

Sign change (like a 2 by 2 matrix)


Note: Sign changes alternate, following the order: positive, negative, positive, negative, etc.
The determinant of the 3 by 3 matrix is the sum of three products. The first step is to
understand the placement of the elements from the matrix into the determinant equation. This
is done by:
1. The three products to be summed correspond to the three elements along the top
row of the matrix (this would be a11, a12, a13).
2. Now, imagine a line that goes though the top row of elements (see the model
below).
3. Beginning at a11, imagine, too, a line through the first column (Figure 1).
4. The 4 remaining elements are used to construct a new 2 by 2 matrix, and the
element a11 is used to form the first of the three parts of the calculation:
a22 a23
a11
a32 a33
5. The same process (follow steps 1-4 above) is then repeated for a12 and a13 as seen
in figures 2 and 3 respectively, i.e., the top row contains the element used to
multiply the new 2 by 2 matrix, and the column which contains the element
from the top row is omitted.
a11 a12 a13
a21 a22 a23
a31 a32 a33

a11 a12 a13


a21 a22 a23
a31 a32 a33

a11 a21 a31


a21 a22 a23
a31 a32 a33

Figure 2

Figure 3

Figure 1
For an example, consider:
A=

5 6 7
2 1 4

9 6 3
Find the determinant A .
Determinant A is calculated as follows:
1 4
A = 5

2 4
- 6

6 3

2 1
+ 7

9 3

9 6

A = 5 [1 (3) - 6 (4)] - 6 [2 (3) - 9 (4) ] + 7 [2 (6) - 9 (1)]


A = 96
A Description of Cramers Rule
Cramers rule is a method of solving a system of linear equations through the use of
determinants. Cramers rule is given by the equation
xi =

Ai
A

where xi is the i th endogenous variable in a system of equations, A is the determinant of the


original A matrix as discussed in the previous section, and Ai is the determinant a special
matrix formed as part of Cramers rule.
To use Cramers rule, two (or more) linear equations are arranged in the matrix form
A x = d. For a two equation model:
A
a11 a12
a21 a22

x = d
x1
d1
x2 = d2

A is the matrix corresponding to the number of equations in a system (here, two equations),
and the number of endogenous variables in the system (here 2 variables). Remember that the
matrix must be square, so the number of equations must equal the same number of endogenous
variables. Position x has one column and corresponds to the number of endogenous variables
in the system. Finally, position d contains the exogenous terms of each linear equation.
Note: The determinant for a matrix must not equal 0 ( A 0). If A = 0 then there is no
solution, or there are infinite solutions (from dividing by zero). Therefore, A 0. When A
0, then a unique solution exists.
3

Applying Cramers Rule in a 2x2 example


Using Cramers rule to solve for the unknowns in the following linear equations:
2x1 + 6x2 = 22
-x1 + 5x2 = 53
Then,
A

2 6

x1

d
22

=
-1 5

x2

53
2 6

The primary determinant A =

= 2 (5) - (-1) 6 = 16
-1 5

We need to construct

xi = Ai , for i=1 and for i=2.


A

The first special determinant A1 is found by replacing the first column of the primary
matrix with the constant d column. The new special matrix A1 now appears as:
22 6
A1 =
53 5
and solved as a regular matrix determinant,
A1 = 22 (5) - 53 (6) = -208
Likewise, the same procedure is done to find the second special determinant A2,

2 22
A2 =
-1 53
A2 = 2 (53) - (-1) (22) = 128
We have now determined:
4

A = 16
A1 = -208
A2 = 128
Using:
xi =

Ai
A

we get,
x1 =

A1
A =

x2 =

A2
A

-208
16
128
= 16

= -13

= 8

(Solution)

(Solution)

Applying Cramers Rule in a 3x3 example


Using Cramers Rule to solve for the unknowns in three linear equations:
5x1 - 2x2 + 3x3 = 16
2x1 + 3x2 - 5x3 = 2
4x1 - 5x2 + 6x3 = 7
Then,
5 -2 3
2 3 -5
4 -5 6

x1
x2
x3

16
2
7

The primary determinant A =

5 -2 3
2 3 -5 = 5(18 - 25) + 2(12 + 20) + 3(-10 - 12) = - 37
4 -5 6

The three special determinants are:


A1 =

16 -2 3
2 3 -5 = 16(18 - 25) + 2(12 + 35) + 3(-10 - 21) = -111
7 -5 6

A2 =

5
2
4

16 3
2 -5 = 5(12 + 35) - 16(12 + 20) + 3(14 - 8) = -259
7 6

A3 =

5
2
4

-2 16
3 2 = 5(21 + 10) + 2(14 - 8) + 16(-10 - 12) = -185
-5 7

Applying Cramers Rule:


A1
x1 = A

-111
= -37 = 3

x2 =

A2
A

-259
= -37 = 7

x3 =

A3
A

-185
= -37 = 5

Applying Cramers Rule to Obtain Comparative Static Multipliers for an IS-LM System
A system of equations can always be presented in the following form,
F 1 ( y1 ,..., yn ; x1 ,..., xm ) 0
F 2 ( y1 ,..., yn ; x1 ,..., xm ) 0

n
F ( y1 ,..., yn ; x1 ,..., xm ) 0

where the n equations implicitly define a set of n functions which determine each of the n
endogenous variables (y1,...,yn) in terms of the m exogenous variables (x1,...,xm).
For example, consider the IS equation Y C (Y T ) I (r , ) G NX and LM
equation PL( r , Y ) M . Assume the output level Y and real interest rate level r are
endogenous. Assume government policy variables are exogenous (because they are
controlled by government), including the level of government purchases G , the level of
taxes T , and the money supply level M . Assume the level of net exports NX is
exogenous, along with the expectations parameter and the price level P . We can
rewrite these IS and LM equations as the system
F 1 (Y , r ; G, T , M , , NX , P ) Y C (Y T ) I ( r , ) G NX 0
F 2 (Y , r ; G, T , M , , NX , P ) PL(Y , r ) M 0

If some technical details are satisfied1, the implicit function theorem tells us that
the endogenous variables Y and r are determined implicitly as functions of the
exogenous variables T , G, M, P, , and, NX , if the Jacobian determinant is not
equal to zero. For the general system, the Jacobian determinant is given by

F 1
y1
F 2
J y
1

F n
y1

F 1
y2
F 2
y2

F n
y2

F 1

yn
F 2

yn

F n

yn

For our IS-LM example, the Jacobian determinant is

F 1
A Y2
F
Y

F 1
r 1 C ' I r PL [1 C ' ] PI L 0 .
r
r Y
F 2
PLY PLr
r

Under the assumptions LY 0 (money demand increases when output increases), Lr 0


(money demand decreases when the real interest rate increases) , 0 C ' 1 (the marginal
propensity to consume is positive, but people also save), this determinant is negative. The
non-zero determinant indicates that our system has a solution, and we will be able to use
this determinant when we apply Cramers rule below to find comparative static multipliers.
Because the consumption function, investment function, and money demand
function are all general functional forms, we have no hope of actually solving our IS-LM
system. However, we can nonetheless learn how the exogenous variables impact the
endogenous variables. When an exogenous variable changes, the equilibrium described by
the IS and LM equations is perturbed. However, the assumption that the IS and LM
equations always hold implies that the endogenous variables Y and r must adjust to new
equilibrium levels. Comparative static analysis involves comparing equilibrium states
before and after the change of an exogenous variable. The analysis is static because time
plays no essential role. That is, we do not consider the disequilibrium path the economy
might follow as it moves from one equilibrium to another. This is unfortunate since many
interesting things happen can happen out of equilibrium. However, ignoring
disequilibrium greatly simplifies the analysis while still providing a forecast of change
consistent with the assumption that the new equilibrium will be reached.
To obtain comparative statics multipliers for our system, the next step is to totally
differentiate the system. Doing so, one obtains
1

See Fundamental Methods of Mathematical Economics by Alpha Chiang for a


careful, understandable presentation of the implicit function theorem.

dY C ' dY C ' dT I r dr I d dG dNX 0


PLY dY PLr dr LdP dM 0

Notice that differentiating a system in the levels yields a new system in the
differentials. Our new system contains two equations and two endogenous differentials
---dY and dr. This system is linear because the differentials dY and dr only appear as
coefficients. (There is no ln dY , for example, and no dr 2 as another nonlinear
example.) There are multiple ways in to solve this linear system. One method is by using
substitution. Using substitution is easier for systems with fewer equations and fewer
variables. However, it can become a tedious art for more complicated systems. Cramers
Rule is a general, systematic method for solving a linear system.
To use Cramers rule, we must rearrange the linear system so it is the matrix form
Ax=d. The matrix A has n rows and n columns, corresponding to the systems n equations
and n endogenous variables. The vector x has n rows and consists of the systems n
endogenous variables. The vector d has n rows and consists of all terms which do not
contain an endogenous variable. Our system written in this matrix form is

a11 a12 x1 d1
a a x d
21 22 2 2
1 C ' I r dY C' dT I d dG dNX
PL
dr

PL
LdP dM
Y
r

The next step in using Cramers rule is to calculate the determinant A . Notice this
determinant is the Jacobian that we calculated above. From above, we know that
A [1 C ' ]PLr I r PLY 0 .
The next step involves calculating the determinants A1 and A2 , where the
matrix Ai is created by replacing column i in the matrix A by the vector d. For our system
the determinants A1 and A2 are given by
A1

d1

a12

d2

a22

C ' dT I d dG d [ NX ]

Ir

LdP dM

PLr

PLr C ' dT PLr I d PLr dG PLr d[ NX ] I r LdP I r dM

and
A2

a11

d1

a12

d2

1 C'

C ' dT I d dG d [ NX ]

PLY

LdP dM

[1 C ']dM [1 C '] LdP PLY C ' dT PLY I d PLY dG PLY d[ NX ]

The final step in using Cramers rule is to construct the solutions for the endogenous
variables. In general, and for our example system, this is done as follows:
x1 dY

A1
A

PLr I
PLr C '
PLY
PLr
I L
dT
d
dG
d [ NX ] r dP
A
A
A
A
A

Ir
dM
A

PLY C '
PLY I
PLY
PLY
dT
d
dG
d [ NX ]
A
A
A
A

and
x 2 dr

A2
A

[1 C ' ] L
[1 C ' ]
dP
dM
A
A

The comparative static multipliers are the coefficients on the exogenous


differentials. Because A 0 , the sign of the particular multiplier is the opposite sign of
the coefficients numerator. There are a total of 12 multipliers for our system, showing
how each of the six exogenous variables impacts each of the two endogenous variables at
the margin. To illustrate what we can learn, assume that the only exogenous variable that
changes is the government purchases variable G . This implies dT , dM , dP , d , and
d [ NX ] are all equal to zero. The solution equations above then become
dY

PLr
PLr
dG
dG
A
[1 C ' ]PLr I r PLY

and
dr

PLY
PLY
dG
dG .
A
[1 C ' ]PLr I r PLY

This implies
dY

dG

1
L
[1 C ' ] I r Y
Lr

and

dr

dG

LY
Lr

LY .
[1 C ' ] I r
Lr

These results are actually partial derivative results because dT , dM , dP , d , and d [ NX ]


are all equal to zero. So, they are more appropriately written as such:

1
[1 C ' ] I r

LY
Lr

and

LY
Lr

L
[1 C ' ] I r Y
Lr

The restrictions LY 0 , Lr 0 , and 0 C ' 1 imply the two multipliers are positive as
shown. These results are telling us that an increase in government purchases will tend to
increase the level of output and increase the real interest rate level. The effect on output is the
standard Keynesian multiplier effect, while the effect on the real interest rate is the standard
crowding out effect. The extent to which there is a multiplier effect versus a crowding out
effect depends upon the magnitudes of LY , Lr , and C ' . A liquidity trap occurs as Lr
becomes large in magnitude (i.e., very negative), and the multiplier Y / G approaches the
simple Keynesian spending multiplier 1 /[1 C ' ] 1 . This is because the multiplier r / G
approaches zero, so no increase in the interest rate level occurs to crowd out investment
spending. Alternatively, as Lr approaches zero, so money demand is not affected by the
interest rate level, which was the Classical assumption prior to Keynes, the multiplier Y / G
approaches zero. This is because the multiplier r / G approaches infinity, so that the
slightest increase in government purchases increases the interest rate level so much that the
increase in government purchases is exactly offset by a decrease in investment.

10

You might also like