At your school book fair, paperbacks cost one price and hardcovers cost another. You buy 3 paperbacks and 2 hardcovers. Your total comes to $54. Your best friend buys 2 paperbacks and 4 hardcovers. His total comes to $76. How could you use a matrix to find the price of each type of book?

### Cramer's Rule

We have already learned how to solve systems of linear equations using graphing, substitution and linear combinations. In this section, we will explore one way to use matrices and determinants to solve linear systems.

#### Cramer’s Rule in Two Variables

Given the system: we can set up the matrix and solve for and as shown below:

and provided .

Note: When , there is no unique solution. We have to investigate further to determine if there are infinite solutions or no solutions to the system. Notice that there is a pattern here. The coefficients of the variable we are trying to find are replaced with the constants.

#### Cramer’s Rule in Three Variables

Given the system: we can set up the matrix and solve for and as shown below:

, and

provided . Once again, if the , then there is no unique solution to the system. Once again there is a pattern here. The coefficients of the variable for which we are trying to solve are replaced with the constants.

Let's use Cramer's Rule to solve the following systems of equations.

Matrix is the matrix made up of the coefficients of and :

Now we can find the

So, using the formulas above:

Therefore, the solution is (2, -1).

Matrix is the matrix made up of the coefficients of and :

Now we can find the

Because the determinant is zero, there is no unique solution and we cannot solve the system further using Cramer's Rule. Looking at the system, we see that the left-hand side of the first equation is a multiple of the second equation, by 3. The right sides are not multiples of each other, therefore there is no solution.

Matrix is the matrix made up of the coefficients of and :

Now we can find the determinant of matrix :

Now using the formulas above, we can find and as follows:

So the solution is (2, -3, 5).

### Examples

#### Example 1

Earlier, you were asked how you could use a matrix to find the price of each type of book.

The system of linear equation represented by this situation is:

We can now set up a matrix and apply Cramer's rule to find the price of each type of book.

Now we can find the

So, using the formulas above:

Therefore, paperbacks cost $8 and hardcovers cost $15.

#### Example 2

Use Cramer's Rule to solve the system below.

Find the Now find and as follows:

#### Example 3

Use Cramer's Rule to solve the system below.

Find the

Therefore, there is no unique solution. We must use linear combination or the substitution method to determine whether there are an infinite number of solutions or no solutions. Using linear combinations we can multiply the first equation by 2 and get the following:

#### Example 4

Use Cramer's Rule to solve the system below.

Find the

Now find and as follows:

Therefore, the solution is (-6, 1, 4).

### Review

Solve the systems below using Cramer’s Rule. If there is no unique solution, use an alternate method to determine whether the system has infinite solutions or no solution.

Solve the systems below using Cramer’s Rule. You may wish to use your calculator to evaluate the determinants.

- The Smith and Jamison families go to the county fair. The Smiths purchase 6 corndogs and 3 cotton candies for $21.75. The Jamisons purchase 3 corndogs and 4 cotton candies for $15.25. Write a system of linear equations and solve it using Cramer’s Rule to find the price of each food.

### Answers for Review Problems

To see the Review answers, open this PDF file and look for section 4.8.