Professional Documents
Culture Documents
Beyond Syllabus Lecture Notes (M101)
Beyond Syllabus Lecture Notes (M101)
Cramer‟s rule is a method of solving a system of linear equations through the use of
determinants.
6 5 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 Cramer‟s rule, the matrix must be square.
a11 a12
A = = a11 a22 - a21 a12
a21 a22
6 5
A= = 6 (4) - 3 (5) = 9
3 4
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 (a22 a33 - a23 a32) - a12 (a21 a33 - a23 a31) + a13 (a21 a32 - a22 a31)
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.
2
For an example, consider:
5 6 7
A= 2 1 4
9 6 3
1 4 2 4 2 1
A = 5 - 6 + 7
6 3 9 3 9 6
A = 96
Cramer‟s rule is a method of solving a system of linear equations through the use of
determinants. Cramer‟s 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 Cramer‟s rule.
To use Cramer‟s rule, two (or more) linear equations are arranged in the matrix form
A x = d. For a two equation model:
A x = d
a11 a12 x1 d1
a21 a22 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
3
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.
Using Cramer‟s rule to solve for the unknowns in the following linear equations:
2x1 + 6x2 = 22
-x1 + 5x2 = 53
Then,
A x = d
2 6 x1 22
=
-1 5 x2 53
2 6
The primary determinant A = = 2 (5) - (-1) 6 = 16
-1 5
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
Likewise, the same procedure is done to find the second special determinant A2,
4
2 22
A2 =
-1 53
A = 16
A1 = -208
A2 = 128
Using:
xi = Ai
A
we get,
A1 -208
x1 = A = 16 = -13 (Solution)
A2 128
x2 = A = 16 = 8 (Solution)
Using Cramer‟s Rule to solve for the unknowns in three linear equations:
5 -2 3 x1 16
2 3 -5 x2 = 2
4 -5 6 x3 7
5
5 -2 3
The primary determinant A= 2 3 -5 = 5(18 - 25) + 2(12 + 20) + 3(-10 - 12) = - 37
4 -5 6
16 -2 3
A1= 2 3 -5 = 16(18 - 25) + 2(12 + 35) + 3(-10 - 21) = -111
7 -5 6
5 16 3
A2= 2 2 -5 = 5(12 + 35) - 16(12 + 20) + 3(14 - 8) = -259
4 7 6
5 -2 16
A3= 2 3 2 = 5(21 + 10) + 2(14 - 8) + 16(-10 - 12) = -185
4 -5 7
A1 -111
x1 = A = -37 = 3
A2 -259
x2 = A = -37 = 7
A3 -185
x3 = A = -37 = 5