<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
You are viewing an older version of this Concept. Go to the latest version.

# Cramer's Rule

## Solving systems of equations using ratios of determinants.

0%
Progress
Practice Cramer's Rule
Progress
0%
Cramer's Rule

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?

### Guidance

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

Cramer’s Rule in Two Variables:

Given the system: $ax+by &= e\\cx+dy &= f,$ we can set up the matrix $A$ and solve for $x$ and $y$ as shown below:

$A = \begin{bmatrix}a & b\\c & d\end{bmatrix}, \ x=\frac{\begin{vmatrix}{\color{red}e} & d\\{\color{red}f} & b\end{vmatrix}}{det \ A}$ and $y = \frac{\begin{vmatrix}a & {\color{red}e}\\c & {\color{red}f}\end{vmatrix}}{det \ A},$ provided $|A| \ne 0$ .

Note: When $|A| = 0$ , 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: $ax+by+cz &= j\\dx+ey+fz &= k\\gx+hy+iz &= l,$ we can set up the matrix $A$ and solve for $x$ and $y$ as shown below:

$A = \begin{bmatrix}a & b & c\\d & e & f\\g & h & i\end{bmatrix}$

$x = \frac{\begin{vmatrix}{\color{red}j} & b & c\\{\color{red}k} & e & f\\{\color{red}l} & h & i\end{vmatrix}}{det \ A}$ , $y = \frac{\begin{vmatrix}a & {\color{red}j} & c\\d & {\color{red}k} & f\\g & {\color{red}l} & i\end{vmatrix}}{det \ A}$ and $z = \frac{\begin{vmatrix}a & b & {\color{red}j}\\d & e & {\color{red}k}\\g & h & {\color{red}l}\end{vmatrix}}{det \ A}$

provided $|A| \ne 0$ . Once again, if the $|A| = 0$ , 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.

#### Example A

Use Cramer’s Rule to solve the system: $3x-7y &=13\\-5x+9y &=-19$

Solution:

Matrix $A$ is the matrix made up of the coefficients of $x$ and $y$ :

$A = \begin{bmatrix}3 & -7\\-5 & 9\end{bmatrix}$

Now we can find the $det \ A = (3\cdot9)-(-7\cdot-5) = 27-35=-8$

So, using the formulas above:

$x = \frac{\begin{vmatrix}{\color{red}13} & -7\\{\color{red}-19} & 9\end{vmatrix}}{-8}=\frac{(13\cdot9)-(-7\cdot-19)}{-8}=\frac{-16}{-8}=2$

$y = \frac{\begin{vmatrix}3 & {\color{red}13}\\-5 & {\color{red}-19}\end{vmatrix}}{-8}=\frac{(3\cdot-19)-(13\cdot-5)}{-8}=\frac{-57-(-65)}{-8}=\frac{8}{-8}=-1$

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

#### Example B

Use Cramer’s Rule to solve the system: $6x+3y &=-12\\2x+y &=20$

Solution:

Matrix $A$ is the matrix made up of the coefficients of $x$ and $y$ :

$A = \begin{bmatrix}6 & 3\\2 & 1\end{bmatrix}$

Now we can find the $det \ A = (6\cdot1)-(3\cdot2) = 6-6=0$

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.

#### Example C

Use Cramer’s Rule to solve the system: $2x+2y-z &=-7\\5x+y-2z &=-3\\x-3y+2z &=21$

Solution:

Matrix $A$ is the matrix made up of the coefficients of $x, y$ and $z$ :

$\begin{bmatrix}2 & 2 & -1\\5 & 1 & -2\\1 & -3 & 2\end{bmatrix}$

Now we can find the determinant of matrix $A$ :

$det \ A &=\begin{vmatrix}2 & 2 & -1\\5 & 1 & -2\\1 & -3 & 2\end{vmatrix}\begin{matrix}2 & 2\\5 & 1\\1 & -3\end{matrix}\\&= [(2)(1)(2)+(2)(-2)(1)+(-1)(5)(-3)]-[(1)(1)(-1)+(-3)(-2)(2)+(2)(5)(2)]\\&= [4-4+15]-[-1+12+20]\\&=15-31\\&=-16$

Now using the formulas above, we can find $x, y$ and $z$ as follows:

$x = \frac{\begin{vmatrix}{\color{red}-7} & 2 & -1\\{\color{red}-3} & 1 & -2\\{\color{red}21} & -3 & 2\end{vmatrix}}{-16}=\frac{-32}{-16}=2 \qquad y = \frac{\begin{vmatrix}2 & {\color{red}-7} & -1\\5 & {\color{red}-3} & -2\\1 & {\color{red}21} & 2\end{vmatrix}}{-16}=\frac{48}{-16}=-3 \qquad z = \frac{\begin{vmatrix}2 & 2 & {\color{red}-7}\\5 & 1 & {\color{red}-3}\\1 & -3 & {\color{red}21}\end{vmatrix}}{-16}=\frac{-80}{-16}=5$

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

Intro Problem Revisit The system of linear equation represented by this situation is:

$3x + 2y = 54\\2x + 4y = 76$

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

$A = \begin{bmatrix}3 & 2\\2 & 4\end{bmatrix}$

Now we can find the $det \ A = (3\cdot4)-(2\cdot2) = 12-4=8$

So, using the formulas above:

$x = \frac{\begin{vmatrix}{\color{red}54} & 2\\{\color{red}76} & 4\end{vmatrix}}{8}=\frac{(54\cdot4)-(76\cdot2)}{8}=\frac{216-152}{8}=8$

$y = \frac{\begin{vmatrix}3 & {\color{red}54}\\2 & {\color{red}76}\end{vmatrix}}{8}=\frac{(3\cdot76)-(2\cdot54)}{8}=\frac{(228-108)}{8}=15$

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

### Guided Practice

Use Cramer’s Rule to solve the systems below.

1. $2x+5y &=7\\x+3y &=2$

2. $4x-y &=6\\-8x+2y &=10$

3. $x+2y+3z &=8\\2x-y+4z &=3\\-x-4y+3z &=14$

1. Find the $det \ A = \begin{vmatrix}2 & 5\\1 & 3\end{vmatrix} = 1.$ Now find $x$ and $y$ as follows:

$x= \frac{\begin{vmatrix}7 & 5\\2 & 3 \end{vmatrix}}{1} = \frac{11}{1}=11 \qquad y= \frac{\begin{vmatrix}2 & 7\\1 & 2 \end{vmatrix}}{1} = \frac{-3}{1}=-3, \quad \text{solution:} \ (11,-3)$

2. Find the

$det \ A= \begin{vmatrix}4 & -1 \\-8 & 2 \end{vmatrix} = 8-8 = 0.$

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:

$& \quad 8x-2y=12 \\& \ \underline{-8x+2y=10 \; \;} \ \Rightarrow \quad \text{Therefore, there is no solution}.\\& \qquad \quad \ \ 0=22$

3. Find the

$det \ A=\begin{vmatrix} 1 & 2 & 3\\2 & -1 & 4\\-1 & -4 & 3 \end{vmatrix}=-34.$

Now find $x, y$ and $z$ as follows:

$x= \frac{\begin{vmatrix}8 & 2 & 3\\3 & -1 & 4\\14 & -4 & 3\end{vmatrix}}{-34} = \frac{204}{-34}=-6 \qquad y= \frac{\begin{vmatrix}1 & 8 & 3\\2 & 3 & 4 \\-1 & 14 & 3\end{vmatrix}}{-34} = \frac{-34}{-34}=1 \qquad z= \frac{\begin{vmatrix}1 & 2 & 8\\2 & -1 & 3\\-1 & -4 & 14\end{vmatrix}}{-34}=\frac{-136}{-34}=4$

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

### Practice

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.

1. $5x-y &= 22\\-x+6y &= -16$
2. $2x+5y &= -1\\-3x-8y &= 1$
3. $4x-3y &= 0\\-6x+9y &= 3$
4. $4x-9y &= -20\\-5x+15y &= 25$
5. $2x-3y &= -4\\8x+12y &= -24$
6. $3x-7y &= 12\\-6x+14y &= -24$
7. $x+5y &= 8\\-2x-10y &= 16$
8. $2x-y &= -5\\-3x+2y &= 13$
9. $x+y &= -1\\-3x-2y &= 6$

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

1. $3x-y+2z &= 11\\-2x+4y+13z &= -3\\x+2y+9z &=5$
2. $3x+2y-7z &= 1\\-4x-3y+11z &= -2\\x+4y-z &=7$
3. $6x-9y+z &= -6\\4x+3y-2z &= 10\\-2x+6y+z &=0$
4. $x-2y+3z &= 5\\4x-y+4z &= 14\\5x+2y-4z &=-3$
5. $-3x+y+z &= 10\\2x+y-2z &= 15\\-4x-2y+4z &=-20$
6. 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.

### Vocabulary Language: English

Cramer's rule

Cramer's rule

Cramer's rule is a formula involving ratios of determinants for the solution of a system of linear equations.
determinant

determinant

The determinant is a single number descriptor of a square matrix. The determinant is computed from the entries of the matrix, and has many properties and interpretations explored in linear algebra.
matrix equation

matrix equation

A matrix equation represents a system of equations by multiplying a coefficient matrix and a variable matrix to get a solution matrix.
Sarrus’ rule

Sarrus’ rule

Sarrus’ rule is a memorization technique that enables you to compute the determinant of matrices efficiently.