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

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

a_{11}x_{1} + a_{12}x_{2} + ... + a_{1n}x_{n} = b_{1}

a_{21}x_{1} + a_{22}x_{2} + ... + a_{2n}x_{n} = b_{2}

. . . . . . . . . . . . . . . . . . . . . . . . . .

a_{n1}x_{1} + a_{n2}x_{2} + ... + a_{nn}x_{n} = b_{n}

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

This may be further encoded as the equation A**x** = **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 x_{i}. Cramer's Rule is as follows: Assuming A is invertible, then for every index i from 1 to n, we have

**(8.4.1)**x_{i}= det(A_{i}) / det(A)

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

where the b_{i}'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 x_{i} for some fixed index i. Consider the following determinant:

This is the determinant of the matrix obtained by multiplying the ith row of A by x_{i}. 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 D_{i} = D x_{i} , where D = det(A).

Now consider the following determinant:

Note that this is the determinant of the matrix obtained by adding x_{i} 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 D_{i}' = D_{i} = D x_{i}, whence x_{i} = D_{i}' / 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:

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

Thus we have x = D_{1}/D = 51/20; y = D_{2}/D = -1/4; z = D_{3}/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.