HOME

David Terr
Ph.D. Math, UC Berkeley

 

Home >> Pre-Calculus >> 8. Matrices and Determinants

<< 8.3. Row Reduction

>> 8.5. Coordinate Transformation Matrices

 

8.4. Cramer's Rule

Thus far, we have only presented one method for solving a system of linear equations using matrices, namely the method used in Chapter 7 involving the augmented matrix. There is another method, one which employs a formula known as Cramer's Rule.

 

Theorem 8.4.1: Suppose we have the following system of linear equations:

a11x1 + a12x2 + ... + a1nxn = b1
a21x1 + a22x2 + ... + a2nxn = b2
. . . . . . . . . . . . . . . . . . . . . . . . . .
an1x1 + an2x2 + ... + annxn = bn

As we have seen, this system can be encoded as the following matrix equation:

matrix equation

This may be further encoded as the equation Ax = b, where A is the matrix on the left, x is the column vector in the middle, and b is the column vector on the right. We wish to solve for x, which means solving for each variable xi. Cramer's Rule is as follows: Assuming A is invertible, then for every index i from 1 to n, we have

  • (8.4.1) xi = det(Ai) / det(A)

where Ai is the matrix obtained by substituting b for the ith column of A. Written out more fully, Cramer's Rule is as follows:

cramer's rule

where the bi's appear in the ith column.

 

Proof: It is not difficult to prove Cramer's Rule if we use a couple fundamental properties of determinants. Suppose we wish to solve for xi for some fixed index i. Consider the following determinant:

cramer's rule proof, step 1

This is the determinant of the matrix obtained by multiplying the ith row of A by xi. But it is a well-known fact that multiplying a single row or column of a square matrix by a constant causes its determinant to get multiplied by the same constant. Thus, we have Di = D xi , where D = det(A).

Now consider the following determinant:

cramer's rule proof, step 2

Note that this is the determinant of the matrix obtained by adding xi times the jth column of the previous matrix to the ith column for all j≠i. But it is also well-known that adding a multiple of a row or column of a matrix to another row or column does not affect its determinant. Thus we have Di' = Di = D xi, whence xi = Di' / D as claimed.

QED

 

Cramer's Rule takes on a special simple form for systems of two linear equations in two variables. A general such system looks as follows:

a x + b y = e
c x + d y = f

Here we are assuming that det(A) = ad - bc ≠ 0, i.e. A is invertible, where A is the coefficient matrix. Cramer's Rule may then reduces to the following two equations:

2 by 2 case

 

Example 1: Use Cramer's Rule to solve the following system:

4x + 3y = 11
3x + 2y = 8

Solution: We have

det(A) = ad - bc = (4)(2) - (3)(3) = -1.

We also have

ed - bf = (11)(2) - (3)(8) = 22 - 24 = -2

af - ec = (4)(8) - (3)(11) = 32 - 33 = -1

Thus we have

x = (ed - bf) / (ad - bc) = -2 / -1 = 2

y = (af - ec) / (ad - bc) = -1 / -1 = 1

Note that this result agrees with our results from Example 1 in Section P.9 and the first example given in Section 7.1.

 

Applying Cramer's Rule to systems of three or more variables is considerably more difficult because of the rapidly-increasing difficulty of computing determinants of n×n matrices as n increases. However, we will give an example of a system of equations in three variables, skipping the determinant calcualtions, which the reader is encouraged to do.

 

Example 1: Use Cramer's Rule to solve the following system:

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

We have the following determinants:

example 2 determinants

Thus we have x = D1/D = 51/20; y = D2/D = -1/4; z = D3/D = -3/20. Note that this agrees with our solution of Example 2 from Section P.9 as well as Example 1 from Section 7.2.

 

Home >> Pre-Calculus >> 8. Matrices and Determinants

<< 8.3. Row Reduction

>> 8.5. Coordinate Transformation Matrices