**4.6 Solve Systems of Equations Using Determinants**

Topics covered in this section are:

- Evaluate the determinant of a $2 \times 2$ matrix
- Evaluate the determinant of a $3 \times 3$ matrix
- Use Cramer’s Rule to solve systems of equations
- Solve applications using determinants

In this section we will learn of another method to solve systems of linear equations called Cramer’s rule. Before we can begin to use the rule, we need to learn some new definitions and notation.

**4.6.1 Evaluate the Determinant of a $2 \times 2$ Matrix**

If a matrix has the same number of rows and columns, we call it a **square matrix**. Each square matrix has a real number associated with it called its **determinant**. To find the determinant of the square matrix $\begin{bmatrix} a&b\\c&d \end{bmatrix}$ , we first write it as $\begin{vmatrix} a & b \\ c& d \end{vmatrix}$. To get the real number value of the determinate we subtract the products of the diagonals, as shown.

**DETERMINANT**

The determinant of any square matrix $\begin{bmatrix} a&b\\c&d \end{bmatrix}$, where $a$, $b$, $c$, and $d$ are real numbers, is

$\begin{vmatrix} a&b \\ c&d \end{vmatrix} = ad-bc$

**Example 1**

Evaluate the determinant of:

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

**Solution**

**Part 1**

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

Write the determinant. | |

Subtract the products of the diagonals. | $4(-1)-3(-2)$ |

Simplify. | $-4+6$ |

Simplify. | $2$ |

**Part 2**

$\begin{bmatrix} -3&-4 \\ -2&0 \end{bmatrix}$ | |

Write the determinant. | |

Subtract the products of the diagonals. | $-3(0)-(-2)(-4)$ |

Simplify. | $0-8$ |

Simplify. | $-8$ |

**4.6.2 Evaluate the Determinant of a $3 \times 3$ Matrix**

To evaluate the determinant of a $3 \times 3$ matrix, we have to be able to evaluate the **minor of an entry** in the determinant. The minor of an entry is the $2 \times 2$ determinant found by eliminating the row and column in the $3 \times 3$ determinant that contains the entry.

**MINOR OF AN ENTRY IN $3 \times 3$ A DETERMINANT**

The **minor of an entry** in a $3 \times 3$ determinant is the $2 \times 2$ determinant found by eliminating the row and column in the $3 \times 3$ determinant that contains the entry.

To find the minor of entry $a_1$ we eliminate the row and column which contain it. So we eliminate the first row and first column. Then we write the $2 \times 2$ determinant that remains.

To find the minor of entry $b_2$, we eliminate the row and column that contain it. So we eliminate the $2^{\text{nd}}$ row and $2^{\text{nd}}$ column. Then we write the $2 \times 2$ determinant that remains.

**Example 2**

For the determinant $\begin{vmatrix} 4&-2&3 \\ 1&0&-3 \\ -2&-4&2 \end{vmatrix}$, find and then evaluate the minor of:

- $a_1$
- $b_3$
- $c_2$

**Solution**

**Part 1**

$\begin{vmatrix} 4&-2&3 \\ 1&0&-3 \\ -2&-4&2 \end{vmatrix}$ | |

Eliminate the row and column that contains $a_1$. | |

Write the $2 \times 2$ determinant that remains. | minor of $a_1$, $\begin{vmatrix}0&-3 \\ -4&2 \end{vmatrix}$ |

Evaluate. | $0(2)-(-3)(-4)$ |

Simplify. | $-12$ |

**Part 2**

$\begin{vmatrix} 4&-2&3 \\ 1&0&-3 \\ -2&-4&2 \end{vmatrix}$ | |

Eliminate the row and column that contains $b_3$. | |

Write the $2 \times 2$ determinant that remains. | minor of $b_3$, $\begin{vmatrix}4&3 \\ 1&-3 \end{vmatrix}$ |

Evaluate. | $4(-3)-(1)(3)$ |

Simplify. | $-15$ |

**Part 3**

$\begin{vmatrix} 4&-2&3 \\ 1&0&-3 \\ -2&-4&2 \end{vmatrix}$ | |

Eliminate the row and column that contains $c_2$. | |

Write the $2 \times 2$ determinant that remains. | minor of $c_2$, $\begin{vmatrix}4&-2 \\ -2&-4 \end{vmatrix}$ |

Evaluate. | $4(-4)-(-2)(-2)$ |

Simplify. | $-20$ |

We are now ready to evaluate a $3 \times 3$ determinant. To do this we expand by minors, which allows us to evaluate the $3 \times 3$ determinant using $2 \times 2$ determinants—which we already know how to evaluate!

To evaluate a $3 \times 3$ determinant by expanding by minors along the first row, we use the following pattern:

Remember, to find the minor of an entry we eliminate the row and column that contains the entry.

**EXPANDING BY MINORS ALONG THE FIRST ROW TO EVALUATE A $3 \times 3$ DETERMINANT**

To evaluate a $3 \times 3$ determinant by **expanding by minors along the first row**, the following pattern:

**Example 3**

Evaluate the determinant $\begin{vmatrix} 2&-3&-1 \\ 3&2&0 \\ -1&-1&-2 \end{vmatrix}$ by expanding by minors along the first row.

**Solution**

$\begin{vmatrix} \textcolor{red}{2}&\textcolor{red}{-3}&\textcolor{red}{-1} \\ 3&2&0 \\ -1&-1&-2 \end{vmatrix}$ | |

Expand by minors along the first row. | |

Evaluate each determinant. | $\textcolor{red}{2}(-4-0)+\textcolor{red}{3}(-6-0)-\textcolor{red}{1}(-3-(-2))$ |

Simplify. | $2(-4)+3(-6)-1(-1)$ |

Simplify. | $-8-18+1$ |

Simplify. | $-25$ |

To evaluate a $3 \times 3$ determinant we can expand by minors using any row or column. Choosing a row or column other than the first row sometimes makes the work easier.

When we expand by any row or column, we must be careful about the sign of the terms in the expansion. To determine the sign of the terms, we use the following sign pattern chart.

$\begin{vmatrix} +&-&+ \\ -&+&- \\ +&-&+ \end{vmatrix}$

**SIGN PATTERN**

When expanding by minors using a row or column, the sign of the terms in the expansion follow the following pattern.

$\begin{vmatrix} +&-&+ \\ -&+&- \\ +&-&= \end{vmatrix}$

Notice that the sign pattern in the first row matches the signs between the terms in the expansion by the first row.

Since we can expand by any row or column, how do we decide which row or column to use? Usually we try to pick a row or column that will make our calculation easier. If the determinant contains a $0$, using the row or column that contains the $0$ will make the calculations easier.

**Example 4**

Evaluate the determinant $\begin{vmatrix} 4&-1&-3 \\ 3&0&2 \\ 5&-4&-3 \end{vmatrix}$ by expanding minors.

**Solution**

To expand by minors, we look for a row or column that will make our calculations easier. Since 0 is in the second row and second column, expanding by either of those is a good choice. Since the second row has fewer negatives than the second column, we will expand by the second row.

$\begin{vmatrix} 4&-1&-3 \\ 3&0&2 \\ \textcolor{red}{5}&\textcolor{red}{-4}&\textcolor{red}{-3} \end{vmatrix}$ | |

Expand using the second row. | |

Be careful of the signs. | |

Evaluate each determinant. | $-3(3-12)+0(-12-(-15))-2(-16-(-5))$ |

Simplify. | $-3(-9)+0-2(-11)$ |

Simplify. | $27+0+22$ |

Add. | $49$ |

**4.6.3 Use Cramer’s Rule to Solve Systems of Equations**

Cramer’s Rule is a method of solving systems of equations using determinants. It can be derived by solving the general form of the systems of equations by elimination. Here we will demonstrate the rule for both systems of two equations with two variables and for systems of three equations with three variables.

Let’s start with the systems of two equations with two variables.

**CRAMER’S RULE FOR SOLVING A SYSTEM OF TWO EQUATIONS**

For the system of equations $\Bigg\{ \begin{align*} a_1x+b_1y&=k_1 \\ a_2x+b_2y&=k_2 \end{align*}$, the solution $(x, y)$ can be determined by

Notice that to form the determinant $D$, we use take the coefficients of the variables.

Notice that to form the determinant $D_x$ and $D_y$ we substitute the constants for the coefficients of the variable we are finding.

**Example 5**

Solve using Cramer’s Rule: $\Bigg\{ \begin{align*} 2x+y&=-4 \\ 3x-2y&=-6 \end{align*}$

**Solution**

Step 1. Evaluate the determinant $D$, using the coefficients of the variables. | $\Bigg\{ \begin{align*} 2x+y&=-4 \\ 3x-2y&=-6 \end{align*}$ $D=\begin{vmatrix}2&1 \\ 3&-2 \end{vmatrix}$ $D=-4-3$ $D=-7$ | |

Step 2. Evaluate the determinant $D_x$. Use the constants in place of the $x$ coefficients. | We replace the coefficients of $x$, $2$ and $3$ with the constants, $-4$ and $-6$. | $D_x=\begin{vmatrix}-4&1 \\ -6&-2 \end{vmatrix}$ $D_x=8-(-6)$ $D_x=14$ |

Step 3. Evaluate the determinant $D_y$. Use the constants in place of the $y$ coefficients. | We replace the coefficients of $y$, $1$ and $2$ with the constants, $-4$ and $-6$. | $D_y=\begin{vmatrix}2&-4 \\ 3&-6 \end{vmatrix}$ $D_y=-12-(-12)$ $D_y=0$ |

Step 4. Find $x$ and $y$. | Substitute in the values of $D$, $D_x$, and $D_y$. | $x=\frac{D_x}{D} \text{ and } y=\frac{D_y}{D}$ $x=\frac{14}{-7} \text{ and } y=\frac{0}{-7}$ $x=-2 \text{ and } y=0$ |

Step 5. Write the solution as an ordered pair. | The ordered pair is $(x, y)$. | $(-2, 0)$ |

Step 6. Check that the ordered pair is a solution to both original equations. | Substitute $x=-2$ and $y=0$ into both equations and make sure they are both true. | $(2, 0)$ is the solution to the system. |

**HOW TO: Solve a system of two equations using Cramer’s rule.**

- Evaluate the determinant $D$, using the coefficients of the variables.
- Evaluate the determinant $D_x$. Use the constants in place of the $x$ coefficients.
- Evaluate the determinant $D_y$. Use the constants in place of the $y$ coefficients.
- Find $x$ and $y$. $x=\frac{D_x}{D}$, $y=\frac{D_y}{D}$
- Write the solution as an ordered pair.
- Check that the ordered pair is a solution to both original equations.

To solve a system of three equations with three variables with Cramer’s Rule, we basically do what we did for a system of two equations. However, we now have to solve for three variables to get the solution. The determinants are also going to be $3 \times 3$ which will make our work more interesting!

**CRAMER’S RULE FOR SOLVING A SYSTEM OF THREE EQUATIONS**

For the system of equations $\Bigg\{ \begin{align*} a_1x+b_1y+c_1z&=k_1 \\ a_2x+b_2y+c_2z&=k_2 \\ a_3x+b_3y+c_3z&=k_3 \end{align*}$, the solution $(x, y, z)$ can be determined by

**Example 6**

Solve the system of equations using Cramer’s Rule: $\Bigg\{ \begin{align*} 3x-5y+&4z=5 \\ 5x+2y+&z=0 \\ 2x+3y-&2z=3 \end{align*}$

**Solution**

Evaluate the determinant $D$. | $D=\begin{vmatrix} \textcolor{red}{3}&-5&4 \\ \textcolor{red}{5}&2&1 \\ \textcolor{red}{2}&3&-2 \end{vmatrix}$ |

Expand by minors using column 1. | |

Be careful of the signs. $\begin{vmatrix} \textcolor{red}{+}&-&+ \\ \textcolor{red}{-}&+&- \\ \textcolor{red}{+}&-&+ \end{vmatrix}$ | $D=\textcolor{red}{3}\begin{vmatrix} 2&1 \\ 3&-2 \end{vmatrix} – \textcolor{red}{5}\begin{vmatrix} -5&4 \\ 3&-2 \end{vmatrix} +\textcolor{red}{2}\begin{vmatrix} -5&4 \\ 2&1 \end{vmatrix}$ |

Evaluate the determinants. | $D=\textcolor{red}{3}(-4-3)-\textcolor{red}{5}(10-12)+\textcolor{red}{2}(-5-8)$ |

Simplify. | $D=3(-7)-5(-2)+2(-13)$ $D=-21+10-26$ $D=-37$ |

Evaluate the determinant $D_x$. Use the constants to replace the coefficients of $x$. | $D_x=\begin{vmatrix} \textcolor{red}{5}&-5&4 \\ \textcolor{red}{0}&2&1 \\ \textcolor{red}{3}&3&-2 \end{vmatrix}$ |

Expand by minors using column 1. | $D_x=\textcolor{red}{5}\begin{vmatrix} 2&1 \\ 3&-2 \end{vmatrix} – \textcolor{red}{0}\begin{vmatrix} -5&4 \\ 3&-2 \end{vmatrix} +\textcolor{red}{3}\begin{vmatrix} -5&4 \\ 2&1 \end{vmatrix}$ |

Evaluate the determinants. | $D_x=\textcolor{red}{5}(-4-3)-\textcolor{red}{0}(10-12)+\textcolor{red}{3}(-5-8)$ |

Simplify. | $D_x=5(-7)-0+3(-13)$ $D_x=-35+0-39$ $D_x=-74$ |

Evaluate the determinant $D_y$. Use the constants to replace the coefficients of $y$. | $D_y=\begin{vmatrix} 3&\textcolor{red}{5}&4 \\ 5&\textcolor{red}{0}&1 \\ 2&\textcolor{red}{3}&-2 \end{vmatrix}$ |

Expand by minors using column 2. Be careful of the signs. $\begin{vmatrix} +&\textcolor{red}{-}&+ \\ -&\textcolor{red}{+}&- \\ +&\textcolor{red}{-}&+ \end{vmatrix}$ | $D_y=\textcolor{red}{-5}\begin{vmatrix} 5&1 \\ 2&-2 \end{vmatrix} + \textcolor{red}{0}\begin{vmatrix} 5&4 \\ 3&-2 \end{vmatrix} -\textcolor{red}{3}\begin{vmatrix} 3&4 \\ 5&1 \end{vmatrix}$ |

Evaluate the determinants. | $D_y=-\textcolor{red}{5}(-10-2)+\textcolor{red}{0}(-10-12)-\textcolor{red}{3}(3-20)$ |

Simplify. | $D_y=-5(-12)+0-3(-17)$ $D_y=60+0+51$ $D_y=111$ |

Evaluate the determinant $D_z$. Use the constants to replace the coefficients of $z$. | $D_z=\begin{vmatrix} 3&-5&\textcolor{red}{5} \\ 5&2&\textcolor{red}{0} \\ 2&3&\textcolor{red}{3} \end{vmatrix}$ |

Expand by minors using column 3. Be careful of the signs. $\begin{vmatrix} +&-&\textcolor{red}{+} \\ -&+&\textcolor{red}{-} \\ +&-&\textcolor{red}{+} \end{vmatrix}$ | $D_z=\textcolor{red}{5}\begin{vmatrix} 5&2 \\ 2&3 \end{vmatrix} – \textcolor{red}{0}\begin{vmatrix} 3&-5 \\ 2&3 \end{vmatrix} +\textcolor{red}{3}\begin{vmatrix} 3&-5 \\ 5&2 \end{vmatrix}$ |

Evaluate the determinants. | $D_z=\textcolor{red}{5}(15-4)-\textcolor{red}{0}(9-(-10))+\textcolor{red}{3}(6-(-25))$ |

Simplify. | $D_z=5(11)-0+3(31)$ $D_z=55-0+93$ $D_z=148$ |

Find $x$, $y$, and $z$. | $x=\frac{D_x}{D}, y=\frac{D_y}{D}, \text{ and } z=\frac{D_z}{D}$ |

Substitute in the values. | $x=\frac{-74}{-37}, y=\frac{111}{-37}, \text{ and } z=\frac{148}{-37}$ |

Simplify. | $x=2, y=-3, \text{ and } z=-4$ |

Write the solution as an ordered triple. | $(2, -3, -4)$ |

Check that the ordered triple is a solution to all three original equations. | We leave the check to you. |

The solution is $(2, -3, -4)$. |

Cramer’s rule does not work when the value of the $D$ determinant is $0$, as this would mean we would be dividing by $0$. But when $D=0$, the system is either inconsistent or dependent.

When the value of $D=0$ and $D_x$, $D_y$ and $D_z$ are all zero, the system is consistent and dependent and there are infinitely many solutions.

When the value of $D=0$ and $D_x$, $D_y$ and $D_z$ are not all zero, the system is inconsistent and there is no solution.

**DEPENDENT AND INCONSISTENT SYSTEMS OF EQUATIONS**

For any system of equations, where the **value of the determinant** $D=0$,

Value of determinants | Type of system |

$D=0$ and $D_x$, $D_y$, and $D_z$ are all zero | consistent and dependent |

$D=0$ and $D_x$, $D_y$, and $D_z$ are all not zero | inconsistent |

In the next example, we will use the values of the determinants to find the solution of the system.

**Example 7**

Solve the system of equations using Cramer’s rule: $\Bigg\{ \begin{align*} x+3y&=4 \\ -2x-6y&=3 \end{align*}$.

**Solution**

$\Bigg\{ \begin{align*} x+3y&=4 \\ -2x-6y&=3 \end{align*}$. | |

Evaluate the determinant $D$, using the coefficients of the variables. | $D=\begin{vmatrix} 1&3 \\ -2&-6 \end{vmatrix}$ $D=-6-(-6)$ $D=0$ |

We cannot use Cramer’s Rule to solve this system. But by looking at the value of the determinants $D_x$ and $D_y$, we can determine whether the system is dependent or inconsistent.

Evaluate the determinant $D_x$. | $D_x=\begin{vmatrix} 4&3 \\ 3&-6 \end{vmatrix}$ $D_x=-24-9$ $D_x=-33$ |

Since all the determinants are not zero, the system is inconsistent. There is no solution.

**4.6.4 Solve Applications using Determinants**

An interesting application of determinants allows us to test if points are collinear. Three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ are collinear if and only if the determinant below is zero.

$\begin{vmatrix} x_1&y_1&1 \\ x_2&y_2&1 \\ x_3&y_3&1 \end{vmatrix} = 0$

**TEST FOR COLLINEAR POINTS**

Three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ are collinear if and only if

$\begin{vmatrix} x_1&y_1&1 \\ x_2&y_2&1 \\ x_3&y_3&1 \end{vmatrix} = 0$

We will use this property in the next example.

**Example 8**

Determine whether the points $(5, −5)$, $(4, −3)$, and $(3, −1)$ are collinear.

**Solution**

$\begin{vmatrix} x_1&y_1&1 \\ x_2&y_2&1 \\ x_3&y_3&1 \end{vmatrix}$ | |

Substitute the values into the determinant. $(5, -5)$, $(4, -3)$, and $(3, -1)$. | $\begin{vmatrix} 5&-5&1 \\ 4&-3&1 \\ 3&-1&1 \end{vmatrix}$ |

Calculate the determinant by expanding by minors using column 3. | $D=\textcolor{red}{1} \begin{vmatrix} 4&-3 \\ 3&-1 \end{vmatrix} – \textcolor{red}{1} \begin{vmatrix} 5&-5 \\ 3&-1 \end{vmatrix}+\textcolor{red}{1} \begin{vmatrix} 5&-5 \\ 4&-3 \end{vmatrix}$ |

Evaluate the determinants. | $D=1(-4-(-9))-1(-5-(-15))+1(-15-(-20))$ |

Simplify. | $D=1(5)-1(10)+1(5)$ $D=5-10+5$ $D=0$ |

The value of the determinant is $0$, so the points are collinear. |

*Licenses** **& Attributions*

*& Attributions*

*CC Licensed Content, Original*

*Revision and Adaption. Provided by: Minute Math. License: CC BY 4.0*

*CC Licensed Content, Shared Previously*

*Marecek, L., & Mathis, A. H. (2020). Solve Systems of Equations Using Determinants. In Intermediate Algebra 2e. OpenStax. https://openstax.org/books/intermediate-algebra-2e/pages/4-6-solve-systems-of-equations-using-determinants*.*License: CC BY 4.0. Access for free at https://openstax.org/books/intermediate-algebra-2e/pages/1-introduction*