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.

For more information on the source of this book, or why it is available for free, please see the project's home page. You can browse or download additional books there. You may also download a PDF copy of this book (41 MB) or just this chapter (4 MB), suitable for printing or most e-readers, or a .zip file containing this book's HTML files (for use in a web browser offline).

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: |3522|.

Solution:

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

|3522|=3(2)2(5)=6+10=4

Answer: 4

Example 2

Calculate: |6403|.

Solution:

Notice that the matrix is given in upper triangular form.

|6403|=6(3)4(0)=180=18

Answer: −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=c1a2x+b2y=c2×(a2)×a1{a1a2xa2b1y=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|=a1c2a2c1a1b2a2b1

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

x=DxD=|c1b1c2b2||a1b1a2b2|=c1b2c2b1a1b2a2b1

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 D0, is called Cramer’s ruleThe solution to an independent system of linear equations expressed in terms of determinants..

CramersRule(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=73x2y=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=73x2y=7  [21|732|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=|2132|Dx=|7172|Dy=|2737|

Step 2: Calculate the determinants.

Dx=|7172|=7(2)(7)(1)=14+7=7Dy=|2737|=2(7)3(7)=1421=35D=|2132|=2(2)3(1)=43=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

3x2y=73(1)2(5)=7310=77=7

Answer: (1, 5)

Example 4

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

Solution:

The corresponding augmented coefficient matrix follows.

{3xy=26x+4y=2  [31|264|2]

And we have,

Dx=|2124|=8(2)=8+2=6Dy=|3262|=6(12)=6+12=18D=|3164|=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: {5x3y=77x+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.

WhenD=0,Dx=0andDy=0  DependentSystemDx0orDy0  InconsistentSystem

Example 5

Solve using Cramer’s rule: {x+15y=35x+y=15.

Solution:

The corresponding augmented matrix follows.

{x+15y=35x+y=15  [115|351|15]

And we have the following.

Dx=|315151|=33=0Dy=|13515|=1515=0D=|11551|=11=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=35x+y=15  {y=5x+15y=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: {3x2y=106x4y=12.

Answer: Ø

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(b2c3b3c2)b1(a2c3a3c2)+c1(a2b3a3b2)

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: |132213051|.

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:

|132213051|=1|1351|3|2301|+2|2105|=1(115)3(20)+2(100)=1(14)3(2)+2(10)=14+6+20=12

Answer: 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,

|132213051|=(2)|3251|+(1)|1201|(3)|1305|=2(310)1(10)3(50)=2(13)1(1)3(5)=26+115=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|=02(412)+0=2(8)=16

Answer: 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 D0, the solution to the system in terms of the determinants described above can be calculated using Cramer’s rule:

CramersRule(x,y,z)=(DxD,DyD,DzD)

Use this to efficiently solve systems with three variables.

Example 8

Solve using Cramer’s rule: {3x+7y4z=02x+5y3z=15x+2y+4z=8.

Solution:

Begin by determining the corresponding augmented matrix.

{3x+7y4z=02x+5y3z=15x+2y+4z=8  [374|0253|1524|8]

Next, calculate the determinant of the coefficient matrix.

D=|374253524|=3|5324|7|2354|+(4)|2552|=3(20(6))7(815)4(4(25))=3(26)7(7)4(29)=78+49116=11

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

Dx=|074153824|=44Dy=|304213584|=0Dz=|370251528|=33

Using Cramer’s rule we have,

x=DxD=4411=4y=DyD=011=0z=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.

WhenD=0,Dx=0andDy=0andDz=0  DependentSystemDx0orDy0orDz0  InconsistentSystem

Example 9

Solve using Cramer’s rule: {4xy+3z=521x4y+18z=79x+y9z=8.

Solution:

Begin by determining the corresponding augmented matrix.

{4xy+3z=521x4y+18z=79x+y9z=8[413|521418|7919|8]

Next, determine the determinant of the coefficient matrix.

D=|41321418919|=4|41819|(1)|211899|+3|21491|=4(3618)+1(189(162))+3(2136)=4(18)+1(27)+3(15)=722745=0

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

Dx=|5137418819|=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=43x4y+5z=125x+10y3z=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.

Topic Exercises

    Part A: Linear Systems with Two Variables

      Calculate the determinant.

    1. |1234|
    2. |5324|
    3. |1332|
    4. |7432|
    5. |4130|
    6. |9510|
    7. |1050|
    8. |0350|
    9. |0413|
    10. |102102|
    11. |a1b10b2|
    12. |0b1a2b2|

      Solve using Cramer’s rule.

    1. {3x5y=82x7y=9
    2. {2x+3y=13x+4y=2
    3. {2xy=34x+3y=4
    4. {x+3y=15x6y=9
    5. {x+y=16x+3y=2
    6. {xy=15x+10y=4
    7. {5x7y=144x3y=6
    8. {9x+5y=97x+2y=7
    9. {6x9y=32x+3y=1
    10. {3x9y=32x6y=2
    11. {4x5y=203y=9
    12. {xy=02x3y=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. |311312251|
    4. |115451123|
    5. |312231521|
    6. |403310052|
    7. |034306023|
    8. |613252841|
    9. |257035004|
    10. |21090313004|
    11. |a1b1c10b2c200c3|
    12. |a100a2b20a3b3c3|

      Solve using Cramer’s rule.

    1. {xy+2z=33x+2yz=134x3y+z=18
    2. {3x+4yz=104x+6y+7z=92x+3y+5z=3
    3. {5x+yz=02x2y+z=96x5y+3z=13
    4. {4x+5y+2z=123xyz=25x+3y2z=5
    5. {xy+z=12x+4y3z=43x3y2z=2
    6. {2x+y4z=72x3y+2z=44x5y+2z=5
    7. {4x+3y2z=22x+5y+8z=1xy5z=3
    8. {xy+z=7x+2y+z=1x2y2z=9
    9. {3x6y+2z=125x2y+3z=47x+3y4z=6
    10. {2xy5z=23x+2y4z=35x+y9z=4
    11. {4x+3y4z=132x+6y5z=22x3y+3z=5
    12. {x2y+z=14y3z=03y2z=1
    13. {2x+3yz=5x+2y=03x+10y=4
    14. {2x3y2y=93x+4y+4z=13xy2z=4
    15. {2x+y2z=1xy+3z=23x+yz=1
    16. {3x8y+9z=2x+5y10z=3x3y+4z=1
    17. {5x6y+3z=23x4y+2z=02x2y+z=0
    18. {5x+10y4z=122x+5y+4z=0x+5y8z=6
    19. {5x+6y+7z=22y+3z=34z=4
    20. {x+2z=15y+3z=104x3y=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.

Answers

  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. (ab,2ba)

  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. (12z4,23z+1,z)
  13. (−2, 1, 4)

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

  16. (−1, 0, 1)

  17. (ab,bc,c)

  1. Answer may vary