This is “Determinants and Cramer’s Rule”, section 3.6 from the book Advanced Algebra (v. 1.0). For details on it (including licensing), click here.

Has this book helped you? Consider passing it on:
Creative Commons supports free culture from music to education. Their licenses helped make this book available to you.
DonorsChoose.org helps people like you help teachers fund their classroom projects, from art supplies to books to calculators.

## 3.6 Determinants and Cramer’s Rule

### Learning Objectives

1. Calculate the determinant of a 2×2 matrix.
2. Use Cramer’s rule to solve systems of linear equations with two variables.
3. Calculate the determinant of a 3×3 matrix.
4. Use Cramer’s rule to solve systems of linear equations with three variables.

## Linear Systems of Two Variables and Cramer’s Rule

Recall that a matrix is a rectangular array of numbers consisting of rows and columns. We classify matrices by the number of rows n and the number of columns m. For example, a 3×4 matrix, read “3 by 4 matrix,” is one that consists of 3 rows and 4 columns. A square matrixA matrix with the same number of rows and columns. is a matrix where the number of rows is the same as the number of columns. In this section we outline another method for solving linear systems using special properties of square matrices. We begin by considering the following 2×2 coefficient matrix A,

$A=[a1b1a2b2]$

The determinantA real number associated with a square matrix. of a 2×2 matrix, denoted with vertical lines $|A|$, or more compactly as det(A), is defined as follows:

The determinant is a real number that is obtained by subtracting the products of the values on the diagonal.

### Example 1

Calculate: $|3−52−2|$.

Solution:

The vertical line on either side of the matrix indicates that we need to calculate the determinant.

$|3−52−2|=3(−2)−2(−5)=−6+10=4$

### Example 2

Calculate: $|−6403|$.

Solution:

Notice that the matrix is given in upper triangular form.

$|−6403|=−6(3)−4(0)=−18−0=−18$

We can solve linear systems with two variables using determinants. We begin with a general 2×2 linear system and solve for y. To eliminate the variable x, multiply the first equation by $−a2$ and the second equation by $a1$.

${a1x+b1y=c1 a2x+b2y=c2 ⇒×(−a2)⇒× a1 {−a1a2x−a2b1y=−a2c1a1a2x+a1b2y=a1c2$

This results in an equivalent linear system where the variable x is lined up to eliminate. Now adding the equations we have

Both the numerator and denominator look very much like a determinant of a 2×2 matrix. In fact, this is the case. The denominator is the determinant of the coefficient matrix. And the numerator is the determinant of the matrix formed by replacing the column that represents the coefficients of y with the corresponding column of constants. This special matrix is denoted $Dy$.

$y=DyD= |a1c1a2c2| |a1b1a2b2|=a1c2−a2c1a1b2−a2b1$

The value for x can be derived in a similar manner.

$x=DxD= |c1b1c2b2| |a1b1a2b2|=c1b2−c2b1a1b2−a2b1$

In general, we can form the augmented matrix as follows:

${a1x+b1y=c1a2x+b2y=c2 ⇔ [a1b1|c1a2b2|c2]$

and then determine $D$, $Dx$ and $Dy$ by calculating the following determinants.

$D=|a1b1a2b2| Dx=|c1b1c2b2| Dy=|a1c1a2c2|$

The solution to a system in terms of determinants described above, when $D≠0$, is called Cramer’s ruleThe solution to an independent system of linear equations expressed in terms of determinants..

$Cramer’s Rule(x,y)=(DxD,DyD)$

This theorem is named in honor of Gabriel Cramer (1704 - 1752).

Figure 3.2

Gabriel Cramer

The steps for solving a linear system with two variables using determinants (Cramer’s rule) are outlined in the following example.

### Example 3

Solve using Cramer’s rule: ${2x+y=7 3x−2y=−7$.

Solution:

Ensure the linear system is in standard form before beginning this process.

Step 1: Construct the augmented matrix and form the matrices used in Cramer’s rule.

${2x+y=7 3x−2y=−7 ⇒ [21|73−2|−7]$

In the square matrix used to determine $Dx$, replace the first column of the coefficient matrix with the constants. In the square matrix used to determine $Dy$, replace the second column with the constants.

$D=|213−2| Dx=|71−7−2| Dy=|273−7|$

Step 2: Calculate the determinants.

$Dx=|71−7−2|=7(−2)−(−7)(1)=−14+7=−7Dy=|273−7|=2(−7)−3(7)=−14−21=−35D=|213−2|=2(−2)−3(1)=−4−3=−7$

Step 3: Use Cramer’s rule to calculate x and y.

$x=DxD=-7-7=1 and y=DyD=-35-7=5$

Therefore the simultaneous solution $(x,y)=(1,5)$.

Step 4: The check is optional; however, we do it here for the sake of completeness.

$Check: (1,5)$

Equation 1

Equation 2

$2x+y=72(1)+(5)=72+5=77=7 ✓$

$3x−2y=−73(1)−2(5)=−73−10=−7−7=−7 ✓$

### Example 4

Solve using Cramer’s rule: ${3x−y=−26x+4y=2$.

Solution:

The corresponding augmented coefficient matrix follows.

${3x−y=−26x+4y=2 ⇒ [3−1|−264|2]$

And we have,

$Dx=|−2−124|=−8−(−2)=−8+2=−6Dy=|3−262|=6−(−12)=6+12=18D=|3−164|=12−(−6)=12+6=18$

Use Cramer’s rule to find the solution.

$x=DxD=-618=-13 and y=DyD=1818=1$

Answer: $(−13,1)$

Try this! Solve using Cramer’s rule: ${5x−3y=−7−7x+6y=11$.

Answer: $(−1, 23)$

When the determinant of the coefficient matrix D is zero, the formulas of Cramer’s rule are undefined. In this case, the system is either dependent or inconsistent depending on the values of $Dx$ and $Dy$. When $D=0$ and both $Dx=0$ and $Dy=0$ the system is dependent. When $D=0$ and either $Dx$ or $Dy$ is nonzero then the system is inconsistent.

$When D=0,Dx=0 and Dy=0 ⇒ Dependent SystemDx≠0 or Dy≠0 ⇒ Inconsistent System$

### Example 5

Solve using Cramer’s rule: ${x+15y=3 5x+y=15$.

Solution:

The corresponding augmented matrix follows.

${x+15y=3 5x+y=15 ⇒ [115| 351|15]$

And we have the following.

$Dx=|315151|=3−3=0Dy=|13515|=15−15=0D=|11551|=1−1=0$

If we try to use Cramer’s rule we have,

$x=DxD=00 and y=DyD=00$

both of which are indeterminate quantities. Because $D=0$ and both $Dx=0$ and $Dy=0$ we know this is a dependent system. In fact, we can see that both equations represent the same line if we solve for y.

${x+15y=3 5x+y=15 ⇒ {y=−5x+15 y=−5x+15$

Therefore we can represent all solutions $(x,−5x+15)$ where x is a real number.

Answer: $(x,−5x+15)$

Try this! Solve using Cramer’s rule: ${3x−2y=10 6x−4y=12$.

## Linear Systems of Three Variables and Cramer’s Rule

Consider the following 3×3 coefficient matrix A,

$A=[a1b1c1a2b2c2a3b3c3]$

The determinant of this matrix is defined as follows:

$det(A)=|a1b1c1a2b2c2a3b3c3|=a1|b2c2b3c3|−b1|a2c2a3c3|+c1|a2b2a3b3|=a1(b2c3−b3c2)−b1(a2c3−a3c2)+c1(a2b3−a3b2)$

Here each 2×2 determinant is called the minorThe determinant of the matrix that results after eliminating a row and column of a square matrix. of the preceding factor. Notice that the factors are the elements in the first row of the matrix and that they alternate in sign (+ − +).

### Example 6

Calculate: $| 1322−1305−1 |$.

Solution:

To easily determine the minor of each factor in the first row we line out the first row and the corresponding column. The determinant of the matrix of elements that remain determines the corresponding minor.

Take care to alternate the sign of the factors in the first row. The expansion by minors about the first row follows:

$| 1322−1305−1 |=1|−135−1|−3|230−1|+2|2−105|=1(1−15)−3(−2−0)+2(10−0)=1(−14)−3(−2)+2(10)=−14+6+20=12$

Expansion by minors can be performed about any row or any column. The sign of the coefficients, determined by the chosen row or column, will alternate according the following sign array.

$[+−+−+−+−+]$

Therefore, to expand about the second row we will alternate the signs starting with the opposite of the first element. We can expand the previous example about the second row to show that the same answer for the determinant is obtained.

And we can write,

$| 1322−1305−1 |=−(2)|325−1|+(−1)|120−1|−(3)|1305|=−2(−3−10)−1(−1−0)−3(5−0)=−2(−13)−1(−1)−3(5)=26+1−15=12$

Note that we obtain the same answer 12.

### Example 7

Calculate: $| 4306122410 |$.

Solution:

The calculations are simplified if we expand about the third column because it contains two zeros.

The expansion by minors about the third column follows:

$| 4306122410 |=0|61241|−2|4341|+0|43612|=0−2(4−12)+0=−2(−8)=16$

It should be noted that there are other techniques used for remembering how to calculate the determinant of a 3×3 matrix. In addition, many modern calculators and computer algebra systems can find the determinant of matrices. You are encouraged to research this rich topic.

We can solve linear systems with three variables using determinants. To do this, we begin with the augmented coefficient matrix,

${a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 ⇔ [a1b1c1|d1a2b2c2|d2a3b3c3|d3]$

Let D represent the determinant of the coefficient matrix,

$D= | a1b1c1a2b2c2a3b3c3 |$

Then determine $Dx$, $Dy$, and $Dz$ by calculating the following determinants.

$Dx=|d1b1c1d2b2c2d3b3c3|Dy=|a1d1c1a2d2c2a3d3c3|Dz=|a1b1d1a2b2d2a3b3d3|$

When $D≠0$, the solution to the system in terms of the determinants described above can be calculated using Cramer’s rule:

$Cramer’s Rule(x,y,z)=(DxD,DyD,DzD)$

Use this to efficiently solve systems with three variables.

### Example 8

Solve using Cramer’s rule: ${3x+7y−4z=02x+5y−3z=1−5x+2y+4z=8$.

Solution:

Begin by determining the corresponding augmented matrix.

${3x+7y−4z=02x+5y−3z=1−5x+2y+4z=8 ⇔ [37−4|025−3|1−524|8]$

Next, calculate the determinant of the coefficient matrix.

$D=|37−425−3−524|=3|5−324|−7|2−3−54|+(−4)|25−52|=3(20−(−6))−7(8−15)−4(4−(−25))=3(26)−7(−7)−4(29)=78+49−116=11$

Similarly we can calculate $Dx$, $Dy$, and $Dz$. This is left as an exercise.

$Dx=|07−415−3824|=−44Dy=|30−421−3−584|=0Dz=|370251−528|=−33$

Using Cramer’s rule we have,

$x=DxD=−4411=−4 y=DyD=011=0 z=DzD=−3311=−3$

Answer: $(−4,0,−3)$

If the determinant of the coefficient matrix D = 0, then the system is either dependent or inconsistent. This will depend on $Dx$, $Dy$, and $Dz$. If they are all zero, then the system is dependent. If at least one of these is nonzero, then it is inconsistent.

$When D=0,Dx=0 and Dy=0 and Dz=0 ⇒ Dependent SystemDx≠0 or Dy≠0 or Dz≠0 ⇒ Inconsistent System$

### Example 9

Solve using Cramer’s rule: ${4x−y+3z=521x−4y+18z=7−9x+y−9z=−8$.

Solution:

Begin by determining the corresponding augmented matrix.

${4x−y+3z=521x−4y+18z=7−9x+y−9z=−8 ⇔ [4−13|521−418|7−91−9|−8]$

Next, determine the determinant of the coefficient matrix.

$D=|4−1321−418−91−9|=4|−4181−9|−(−1)|2118−9−9|+3|21−4−91|=4(36−18)+1(−189−(−162))+3(21−36)=4(18)+1(−27)+3(−15)=72−27−45=0$

Since D = 0, the system is either dependent or inconsistent.

$Dx=|5−137−418−81−9|=96$

However, because $Dx$ is nonzero we conclude the system is inconsistent. There is no simultaneous solution.

Answer: $Ø$

Try this! Solve using Cramer’s rule: ${2x+6y+7z=4−3x−4y+5z=125x+10y−3z=−13$.

Answer: $(−3,12,1)$

### Key Takeaways

• The determinant of a matrix is a real number.
• The determinant of a $2×2$ matrix is obtained by subtracting the product of the values on the diagonals.
• The determinant of a $3×3$ matrix is obtained by expanding the matrix using minors about any row or column. When doing this, take care to use the sign array to help determine the sign of the coefficients.
• Use Cramer’s rule to efficiently determine solutions to linear systems.
• When the determinant of the coefficient matrix is 0, Cramer’s rule does not apply; the system will either be dependent or inconsistent.

### Part A: Linear Systems with Two Variables

Calculate the determinant.

1. $|1234|$
2. $|5324|$
3. $|−13−3−2|$
4. $|743−2|$
5. $|−41−30|$
6. $|95−10|$
7. $|1050|$
8. $|0350|$
9. $|04−13|$
10. $|102102|$
11. $|a1b10b2|$
12. $|0b1a2b2|$

Solve using Cramer’s rule.

1. ${3x−5y=82x−7y=9$
2. ${2x+3y=−13x+4y=−2$
3. ${2x−y=−34x+3y=4$
4. ${x+3y=15x−6y=−9$
5. ${x+y=16x+3y=2$
6. ${x−y=−15x+10y=4$
7. ${5x−7y=144x−3y=6$
8. ${9x+5y=−97x+2y=−7$
9. ${6x−9y=3−2x+3y=1$
10. ${3x−9y=32x−6y=2$
11. ${4x−5y=203y=−9$
12. ${x−y=02x−3y=0$
13. ${2x+y=ax+y=b$
14. ${ax+y=0by=1$

### Part B: Linear Systems with Three Variables

Calculate the determinant.

1. $| 123213132 |$
2. $| 251124323 |$
3. $| −31−13−1−2−251 |$
4. $| 1−15−45−1−12−3 |$
5. $| 3−1223−1521 |$
6. $| 40−33−100−52 |$
7. $| 0−34−30602−3 |$
8. $| 6−1−325284−1 |$
9. $| 257035004 |$
10. $| 21090313004 |$
11. $| a1b1c10b2c200c3 |$
12. $| a100a2b20a3b3c3 |$

Solve using Cramer’s rule.

1. ${x−y+2z=−33x+2y−z=13−4x−3y+z=−18$
2. ${3x+4y−z=104x+6y+7z=92x+3y+5z=3$
3. ${5x+y−z=02x−2y+z=−9−6x−5y+3z=−13$
4. ${−4x+5y+2z=123x−y−z=−25x+3y−2z=5$
5. ${x−y+z=−1−2x+4y−3z=43x−3y−2z=2$
6. ${2x+y−4z=72x−3y+2z=−44x−5y+2z=−5$
7. ${4x+3y−2z=22x+5y+8z=−1x−y−5z=3$
8. ${x−y+z=7x+2y+z=1x−2y−2z=9$
9. ${3x−6y+2z=12−5x−2y+3z=47x+3y−4z=−6$
10. ${2x−y−5z=23x+2y−4z=−35x+y−9z=4$
11. ${4x+3y−4z=−132x+6y−5z=−2−2x−3y+3z=5$
12. ${x−2y+z=−14y−3z=03y−2z=1$
13. ${2x+3y−z=−5x+2y=03x+10y=4$
14. ${2x−3y−2y=9−3x+4y+4z=−13x−y−2z=4$
15. ${2x+y−2z=−1x−y+3z=23x+y−z=1$
16. ${3x−8y+9z=−2−x+5y−10z=3x−3y+4z=−1$
17. ${5x−6y+3z=23x−4y+2z=02x−2y+z=0$
18. ${5x+10y−4z=122x+5y+4z=0x+5y−8z=6$
19. ${5x+6y+7z=22y+3z=34z=4$
20. ${x+2z=−1−5y+3z=104x−3y=2$
21. ${x+y+z=ax+2y+2z=a+bx+2y+3z=a+b+c$
22. ${x+y+z=a+b+cx+2y+2z=a+2b+2cx+y+2z=a+b+2c$

### Part C: Discussion Board

1. Research and discuss the history of the determinant. Who is credited for first introducing the notation of a determinant?

2. Research other ways in which we can calculate the determinant of a $3×3$ matrix. Give an example.

1. −2

2. 11

3. 3

4. 0

5. 4

6. $a1b2$

7. (1, −1)

8. $(−12,2)$
9. $(−13,43)$
10. (0, −2)

11. Ø

12. $(54,−3)$
13. $(a−b,2b−a)$

1. 6

2. −39

3. 0

4. 3

5. 24

6. $a1b2c3$

7. (2, 3, −1)

8. (−1, 2, −3)

9. $(12,12,−1)$
10. Ø

11. (0, −2, 0)

12. $(12z−4,23z+1,z)$
13. (−2, 1, 4)

14. $(−12,5,52)$
15. Ø

16. (−1, 0, 1)

17. $(a−b,b−c,c)$