Cramer’s rule
Introduction
Cramer’s Rule is a technique that can be used to solve simultaneous linear equations. It is most often utilized when one is required to solve the system by hand rather than by computer. This is due to the fact that there are quicker, more efficient procedures such as Gauss elimination that can be implemented on the computer. The approach is based upon the use of determinants.
Mathematical preliminaries
Before we describe the procedure known as Cramer’s Rule, we begin with some mathematical preliminaries. Let us consider a pair of two simultaneous linear equations in two unknowns (
x
1 and
x
2 ). We can write these equations as
and
Here the coefficients
a
11 ,
a
12 ,
a
21 , and
a
22 are known constants.
Now, let us solve this system of equations via Gauss elimination. We should recall that the basic idea behind Gauss elimination is to reduce the original set of equations into an equivalent form which is triangular and to use back-substitution once the first unknown is discovered.
We begin by multiplying each side of equation (1) by the value (-
a
21 /
a
11 ). This yields an equivalent equation of the form
Next, we add equation (3) to equation (2). In doing so, we note that the term involving
x
1 is removed. The result of the addition of the two equations is
The value for the unknown
x
2 can be easily found using equation (4). The solution is
This result can be substituted back into equation (1) to produce an equation that can be solved for the unknown
x
1 .
The solution for the unknown,
x
1 , proceeds as follows. The equation ( ) tells us
which can be expressed as
This can be reduced to the following equation
Dividing through by the constant
a
11 yields an expression for
x
1 .
Equations (5) and (10) provide us the solution for the variables in terms of the set of constants associated with the original equations. Examination of equations (5) and (10) reveals that the solution for each variable includes the common term
Suppose we write our original equations in matrix-vector form as follows
where we define the coefficient matrix as
Clearly, we see that the term Δ is equal to the determinant of the coefficient matrix
Next let us consider the numerator for the solution of the unknown
x
1 as expressed in equation (10). We recognize that it, too, can be expressed by means of a determinant as is shown below
We note that the matrix in the equation can be obtained by merely replacing the first column of the original coefficient matrix with the vector
So the solution for the unknown
x
1 can be written as a ratio of determinants
Before we solve for the variable x2, we replace the second column of the original coefficient matrix with the vector
B . With this replacement accomplished, we may write the solution for the unknown
x
2 as a ratio of determinants