Learn on PengiOpenStax Algebra and TrigonometryChapter 11: Systems of Equations and Inequalities

Lesson 11.8: Solving Systems with Cramer's Rule

In this Grade 7 math lesson from OpenStax Algebra and Trigonometry, students learn how to evaluate 2×2 and 3×3 determinants and apply Cramer's Rule to solve systems of two and three linear equations. The lesson covers the formula det(A) = ad - bc for a 2×2 matrix and demonstrates how determinants are used to find unique solutions, identify inconsistent systems, and understand matrix invertibility. Part of Chapter 11: Systems of Equations and Inequalities, this lesson builds on prior methods such as substitution and Gaussian elimination by introducing a determinant-based approach.

Section 1

📘 Solving Systems with Cramer's Rule

New Concept

Cramer's Rule offers a formula to solve systems of equations using determinants. You'll find each variable by computing a ratio of determinants, like x=DxDx = \frac{D_x}{D}, providing a direct path to the system's unique solution.

What’s next

Next, you’ll master calculating determinants through guided practice. Then, you'll apply this skill in interactive examples to solve systems with Cramer's Rule.

Section 2

Determinant of a 2x2 matrix

Property

The determinant of a 2×22 \times 2 matrix, given

A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

is defined as

det(A)=abcd=adcb\operatorname{det}(A) = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - cb

There are several ways to indicate the determinant, including det(A)\operatorname{det}(A) and replacing the brackets in a matrix with straight lines, A|A|.

Examples

  • For the matrix A=[4125]A = \begin{bmatrix} 4 & 1 \\ -2 & 5 \end{bmatrix}, the determinant is det(A)=(4)(5)(1)(2)=20+2=22\operatorname{det}(A) = (4)(5) - (1)(-2) = 20 + 2 = 22.
  • For the matrix B=[0731]B = \begin{bmatrix} 0 & 7 \\ 3 & -1 \end{bmatrix}, the determinant is det(B)=(0)(1)(7)(3)=021=21\operatorname{det}(B) = (0)(-1) - (7)(3) = 0 - 21 = -21.
  • For the matrix C=[5312]C = \begin{bmatrix} -5 & -3 \\ -1 & -2 \end{bmatrix}, the determinant is det(C)=(5)(2)(3)(1)=103=7\operatorname{det}(C) = (-5)(-2) - (-3)(-1) = 10 - 3 = 7.

Explanation

A determinant is a single number calculated from a square matrix. For a 2×22 \times 2 matrix, it's found by multiplying the main diagonal entries and subtracting the product of the other diagonal entries. This value is key to solving systems.

Section 3

Cramer's Rule for 2x2 Systems

Property

Cramer's Rule is a method that uses determinants to solve systems of equations that have the same number of equations as variables. Consider a system of two linear equations in two variables.

a1x+b1y=c1a2x+b2y=c2\begin{align*} a_1 x + b_1 y &= c_1 \\ a_2 x + b_2 y &= c_2 \end{align*}

The solution using Cramer's Rule is given as

x=DxD=c1b1c2b2a1b1a2b2,D0;y=DyD=a1c1a2c2a1b1a2b2,D0.x = \frac{D_x}{D} = \frac{\begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \quad D \neq 0; \qquad y = \frac{D_y}{D} = \frac{\begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \quad D \neq 0.

If we are solving for xx, the xx column is replaced with the constant column. If we are solving for yy, the yy column is replaced with the constant column.

Examples

  • Solve the system x+y=3x + y = 3 and 2xy=02x - y = 0. The determinants are D=3D = -3, Dx=3D_x = -3, and Dy=6D_y = -6. The solution is x=33=1x = \frac{-3}{-3} = 1 and y=63=2y = \frac{-6}{-3} = 2, or (1,2)(1, 2).
  • Solve the system 3x+2y=73x + 2y = 7 and x+y=3x + y = 3. The determinants are D=1D = 1, Dx=1D_x = 1, and Dy=2D_y = 2. The solution is x=11=1x = \frac{1}{1} = 1 and y=21=2y = \frac{2}{1} = 2, or (1,2)(1, 2).
  • For the system 2xy=52x - y = 5 and 4x2y=104x - 2y = 10, the determinant of the coefficient matrix is D=(2)(2)(1)(4)=0D = (2)(-2) - (-1)(4) = 0. Since D=0D=0, Cramer's Rule cannot be used to find a unique solution.

Explanation

Cramer's Rule offers a quick way to solve for variables using ratios of determinants. To find xx, divide the determinant of the matrix with its x-column replaced by the constants, by the determinant of the original coefficient matrix.

Section 4

Determinant of a 3x3 matrix

Property

To find the determinant of a 3×33 \times 3 matrix, augment the matrix with the first two columns. Then calculate the sum of the products of entries down each of the three diagonals (upper left to lower right), and subtract the products of entries up each of the three diagonals (lower left to upper right).
For A=[a1b1c1a2b2c2a3b3c3]A = \begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{bmatrix}, the determinant is:

A=a1b2c3+b1c2a3+c1a2b3a3b2c1b3c2a1c3a2b1|A| = a_1 b_2 c_3 + b_1 c_2 a_3 + c_1 a_2 b_3 - a_3 b_2 c_1 - b_3 c_2 a_1 - c_3 a_2 b_1

Examples

  • For A=[123014560]A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix}, det(A)=(1(1)(0)+2(4)(5)+3(0)(6))(5(1)(3)+6(4)(1)+0(0)(2))=4039=1\operatorname{det}(A) = (1(1)(0) + 2(4)(5) + 3(0)(6)) - (5(1)(3) + 6(4)(1) + 0(0)(2)) = 40 - 39 = 1.
  • For B=[102340056]B = \begin{bmatrix} 1 & 0 & 2 \\ 3 & 4 & 0 \\ 0 & 5 & 6 \end{bmatrix}, det(B)=(1(4)(6)+0(0)(0)+2(3)(5))(0(4)(2)+5(0)(1)+6(3)(0))=540=54\operatorname{det}(B) = (1(4)(6) + 0(0)(0) + 2(3)(5)) - (0(4)(2) + 5(0)(1) + 6(3)(0)) = 54 - 0 = 54.
  • For C=[210121302]C = \begin{bmatrix} 2 & -1 & 0 \\ 1 & 2 & -1 \\ 3 & 0 & -2 \end{bmatrix}, det(C)=(2(2)(2)+(1)(1)(3)+0(1)(0))(3(2)(0)+0(1)(2)+(2)(1)(1))=52=7\operatorname{det}(C) = (2(2)(-2) + (-1)(-1)(3) + 0(1)(0)) - (3(2)(0) + 0(-1)(2) + (-2)(1)(-1)) = -5 - 2 = -7.

Explanation

To find a 3×33 \times 3 determinant, use the diagonal method. Copy the first two columns to the right side. Add the products of the three downward diagonals and subtract the products of the three upward diagonals for your answer.

Section 5

Cramer's Rule for 3x3 Systems

Property

For a 3×33 \times 3 system of equations where

a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\begin{align*} a_1 x + b_1 y + c_1 z &= d_1 \\ a_2 x + b_2 y + c_2 z &= d_2 \\ a_3 x + b_3 y + c_3 z &= d_3 \end{align*}

the solutions are given by x=DxDx = \frac{D_x}{D}, y=DyDy = \frac{D_y}{D}, and z=DzDz = \frac{D_z}{D}, provided D0D \neq 0. The determinants are:

D=a1b1c1a2b2c2a3b3c3,Dx=d1b1c1d2b2c2d3b3c3,Dy=a1d1c1a2d2c2a3d3c3,Dz=a1b1d1a2b2d2a3b3d3D = \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix}, D_x = \begin{vmatrix} d_1 & b_1 & c_1 \\ d_2 & b_2 & c_2 \\ d_3 & b_3 & c_3 \end{vmatrix}, D_y = \begin{vmatrix} a_1 & d_1 & c_1 \\ a_2 & d_2 & c_2 \\ a_3 & d_3 & c_3 \end{vmatrix}, D_z = \begin{vmatrix} a_1 & b_1 & d_1 \\ a_2 & b_2 & d_2 \\ a_3 & b_3 & d_3 \end{vmatrix}

Examples

  • For the system x+y+z=6x+y+z=6, 2y+5z=42y+5z=-4, 2x+5yz=272x+5y-z=27, the coefficient determinant is D=21D = -21. The determinant for xx is Dx=105D_x = -105, so x=10521=5x = \frac{-105}{-21} = 5.
  • For the system x+y+z=2x+y+z=2, 2xyz=12x-y-z=1, x+2yz=4x+2y-z=4, the coefficient determinant is D=9D=9. The determinant for yy is Dy=9D_y = -9, so y=99=1y = \frac{-9}{9} = -1.
  • For the system xy=1x-y=1, y+z=4y+z=4, x+z=3x+z=3, the coefficient determinant is D=2D=-2. The determinant for zz is Dz=6D_z = -6, so z=62=3z = \frac{-6}{-2} = 3.

Explanation

This rule extends to 3×33 \times 3 systems. To find any variable, calculate the determinant of the coefficient matrix where that variable's column is replaced by the constant column. Then, divide this by the determinant of the original coefficient matrix.

Section 6

Properties of Determinants

Property

  1. If the matrix is in upper triangular form, the determinant equals the product of entries down the main diagonal.
  2. When two rows are interchanged, the determinant changes sign.
  3. If either two rows or two columns are identical, the determinant equals zero.
  4. If a matrix contains either a row of zeros or a column of zeros, the determinant equals zero.
  5. The determinant of an inverse matrix A1A^{-1} is the reciprocal of the determinant of the matrix AA.
  6. If any row or column is multiplied by a constant, the determinant is multiplied by the same factor.

Examples

  • The matrix A=[591027003]A = \begin{bmatrix} 5 & 9 & 1 \\ 0 & 2 & 7 \\ 0 & 0 & 3 \end{bmatrix} is in upper triangular form. By Property 1, its determinant is the product of the diagonal entries: det(A)=523=30\operatorname{det}(A) = 5 \cdot 2 \cdot 3 = 30.
  • The matrix B=[145145987]B = \begin{bmatrix} 1 & 4 & 5 \\ 1 & 4 & 5 \\ 9 & 8 & 7 \end{bmatrix} has two identical rows. By Property 3, its determinant is det(B)=0\operatorname{det}(B) = 0.
  • The matrix C=[238000159]C = \begin{bmatrix} 2 & 3 & 8 \\ 0 & 0 & 0 \\ 1 & 5 & 9 \end{bmatrix} has a row of zeros. By Property 4, its determinant is det(C)=0\operatorname{det}(C) = 0.

Explanation

Determinants have special properties that act like calculation shortcuts. For example, if two rows are identical or an entire row is zeros, the determinant is automatically zero. Knowing these rules can save you a lot of time and effort.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 11: Systems of Equations and Inequalities

  1. Lesson 1

    Lesson 11.1: Systems of Linear Equations: Two Variables

  2. Lesson 2

    Lesson 11.2: Systems of Linear Equations: Three Variables

  3. Lesson 3

    Lesson 11.3: Systems of Nonlinear Equations and Inequalities: Two Variables

  4. Lesson 4

    Lesson 11.4: Partial Fractions

  5. Lesson 5

    Lesson 11.5: Matrices and Matrix Operations

  6. Lesson 6

    Lesson 11.6: Solving Systems with Gaussian Elimination

  7. Lesson 7

    Lesson 11.7: Solving Systems with Inverses

  8. Lesson 8Current

    Lesson 11.8: Solving Systems with Cramer's Rule

Lesson overview

Expand to review the lesson summary and core properties.

Expand

Section 1

📘 Solving Systems with Cramer's Rule

New Concept

Cramer's Rule offers a formula to solve systems of equations using determinants. You'll find each variable by computing a ratio of determinants, like x=DxDx = \frac{D_x}{D}, providing a direct path to the system's unique solution.

What’s next

Next, you’ll master calculating determinants through guided practice. Then, you'll apply this skill in interactive examples to solve systems with Cramer's Rule.

Section 2

Determinant of a 2x2 matrix

Property

The determinant of a 2×22 \times 2 matrix, given

A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

is defined as

det(A)=abcd=adcb\operatorname{det}(A) = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - cb

There are several ways to indicate the determinant, including det(A)\operatorname{det}(A) and replacing the brackets in a matrix with straight lines, A|A|.

Examples

  • For the matrix A=[4125]A = \begin{bmatrix} 4 & 1 \\ -2 & 5 \end{bmatrix}, the determinant is det(A)=(4)(5)(1)(2)=20+2=22\operatorname{det}(A) = (4)(5) - (1)(-2) = 20 + 2 = 22.
  • For the matrix B=[0731]B = \begin{bmatrix} 0 & 7 \\ 3 & -1 \end{bmatrix}, the determinant is det(B)=(0)(1)(7)(3)=021=21\operatorname{det}(B) = (0)(-1) - (7)(3) = 0 - 21 = -21.
  • For the matrix C=[5312]C = \begin{bmatrix} -5 & -3 \\ -1 & -2 \end{bmatrix}, the determinant is det(C)=(5)(2)(3)(1)=103=7\operatorname{det}(C) = (-5)(-2) - (-3)(-1) = 10 - 3 = 7.

Explanation

A determinant is a single number calculated from a square matrix. For a 2×22 \times 2 matrix, it's found by multiplying the main diagonal entries and subtracting the product of the other diagonal entries. This value is key to solving systems.

Section 3

Cramer's Rule for 2x2 Systems

Property

Cramer's Rule is a method that uses determinants to solve systems of equations that have the same number of equations as variables. Consider a system of two linear equations in two variables.

a1x+b1y=c1a2x+b2y=c2\begin{align*} a_1 x + b_1 y &= c_1 \\ a_2 x + b_2 y &= c_2 \end{align*}

The solution using Cramer's Rule is given as

x=DxD=c1b1c2b2a1b1a2b2,D0;y=DyD=a1c1a2c2a1b1a2b2,D0.x = \frac{D_x}{D} = \frac{\begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \quad D \neq 0; \qquad y = \frac{D_y}{D} = \frac{\begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \quad D \neq 0.

If we are solving for xx, the xx column is replaced with the constant column. If we are solving for yy, the yy column is replaced with the constant column.

Examples

  • Solve the system x+y=3x + y = 3 and 2xy=02x - y = 0. The determinants are D=3D = -3, Dx=3D_x = -3, and Dy=6D_y = -6. The solution is x=33=1x = \frac{-3}{-3} = 1 and y=63=2y = \frac{-6}{-3} = 2, or (1,2)(1, 2).
  • Solve the system 3x+2y=73x + 2y = 7 and x+y=3x + y = 3. The determinants are D=1D = 1, Dx=1D_x = 1, and Dy=2D_y = 2. The solution is x=11=1x = \frac{1}{1} = 1 and y=21=2y = \frac{2}{1} = 2, or (1,2)(1, 2).
  • For the system 2xy=52x - y = 5 and 4x2y=104x - 2y = 10, the determinant of the coefficient matrix is D=(2)(2)(1)(4)=0D = (2)(-2) - (-1)(4) = 0. Since D=0D=0, Cramer's Rule cannot be used to find a unique solution.

Explanation

Cramer's Rule offers a quick way to solve for variables using ratios of determinants. To find xx, divide the determinant of the matrix with its x-column replaced by the constants, by the determinant of the original coefficient matrix.

Section 4

Determinant of a 3x3 matrix

Property

To find the determinant of a 3×33 \times 3 matrix, augment the matrix with the first two columns. Then calculate the sum of the products of entries down each of the three diagonals (upper left to lower right), and subtract the products of entries up each of the three diagonals (lower left to upper right).
For A=[a1b1c1a2b2c2a3b3c3]A = \begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{bmatrix}, the determinant is:

A=a1b2c3+b1c2a3+c1a2b3a3b2c1b3c2a1c3a2b1|A| = a_1 b_2 c_3 + b_1 c_2 a_3 + c_1 a_2 b_3 - a_3 b_2 c_1 - b_3 c_2 a_1 - c_3 a_2 b_1

Examples

  • For A=[123014560]A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix}, det(A)=(1(1)(0)+2(4)(5)+3(0)(6))(5(1)(3)+6(4)(1)+0(0)(2))=4039=1\operatorname{det}(A) = (1(1)(0) + 2(4)(5) + 3(0)(6)) - (5(1)(3) + 6(4)(1) + 0(0)(2)) = 40 - 39 = 1.
  • For B=[102340056]B = \begin{bmatrix} 1 & 0 & 2 \\ 3 & 4 & 0 \\ 0 & 5 & 6 \end{bmatrix}, det(B)=(1(4)(6)+0(0)(0)+2(3)(5))(0(4)(2)+5(0)(1)+6(3)(0))=540=54\operatorname{det}(B) = (1(4)(6) + 0(0)(0) + 2(3)(5)) - (0(4)(2) + 5(0)(1) + 6(3)(0)) = 54 - 0 = 54.
  • For C=[210121302]C = \begin{bmatrix} 2 & -1 & 0 \\ 1 & 2 & -1 \\ 3 & 0 & -2 \end{bmatrix}, det(C)=(2(2)(2)+(1)(1)(3)+0(1)(0))(3(2)(0)+0(1)(2)+(2)(1)(1))=52=7\operatorname{det}(C) = (2(2)(-2) + (-1)(-1)(3) + 0(1)(0)) - (3(2)(0) + 0(-1)(2) + (-2)(1)(-1)) = -5 - 2 = -7.

Explanation

To find a 3×33 \times 3 determinant, use the diagonal method. Copy the first two columns to the right side. Add the products of the three downward diagonals and subtract the products of the three upward diagonals for your answer.

Section 5

Cramer's Rule for 3x3 Systems

Property

For a 3×33 \times 3 system of equations where

a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\begin{align*} a_1 x + b_1 y + c_1 z &= d_1 \\ a_2 x + b_2 y + c_2 z &= d_2 \\ a_3 x + b_3 y + c_3 z &= d_3 \end{align*}

the solutions are given by x=DxDx = \frac{D_x}{D}, y=DyDy = \frac{D_y}{D}, and z=DzDz = \frac{D_z}{D}, provided D0D \neq 0. The determinants are:

D=a1b1c1a2b2c2a3b3c3,Dx=d1b1c1d2b2c2d3b3c3,Dy=a1d1c1a2d2c2a3d3c3,Dz=a1b1d1a2b2d2a3b3d3D = \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix}, D_x = \begin{vmatrix} d_1 & b_1 & c_1 \\ d_2 & b_2 & c_2 \\ d_3 & b_3 & c_3 \end{vmatrix}, D_y = \begin{vmatrix} a_1 & d_1 & c_1 \\ a_2 & d_2 & c_2 \\ a_3 & d_3 & c_3 \end{vmatrix}, D_z = \begin{vmatrix} a_1 & b_1 & d_1 \\ a_2 & b_2 & d_2 \\ a_3 & b_3 & d_3 \end{vmatrix}

Examples

  • For the system x+y+z=6x+y+z=6, 2y+5z=42y+5z=-4, 2x+5yz=272x+5y-z=27, the coefficient determinant is D=21D = -21. The determinant for xx is Dx=105D_x = -105, so x=10521=5x = \frac{-105}{-21} = 5.
  • For the system x+y+z=2x+y+z=2, 2xyz=12x-y-z=1, x+2yz=4x+2y-z=4, the coefficient determinant is D=9D=9. The determinant for yy is Dy=9D_y = -9, so y=99=1y = \frac{-9}{9} = -1.
  • For the system xy=1x-y=1, y+z=4y+z=4, x+z=3x+z=3, the coefficient determinant is D=2D=-2. The determinant for zz is Dz=6D_z = -6, so z=62=3z = \frac{-6}{-2} = 3.

Explanation

This rule extends to 3×33 \times 3 systems. To find any variable, calculate the determinant of the coefficient matrix where that variable's column is replaced by the constant column. Then, divide this by the determinant of the original coefficient matrix.

Section 6

Properties of Determinants

Property

  1. If the matrix is in upper triangular form, the determinant equals the product of entries down the main diagonal.
  2. When two rows are interchanged, the determinant changes sign.
  3. If either two rows or two columns are identical, the determinant equals zero.
  4. If a matrix contains either a row of zeros or a column of zeros, the determinant equals zero.
  5. The determinant of an inverse matrix A1A^{-1} is the reciprocal of the determinant of the matrix AA.
  6. If any row or column is multiplied by a constant, the determinant is multiplied by the same factor.

Examples

  • The matrix A=[591027003]A = \begin{bmatrix} 5 & 9 & 1 \\ 0 & 2 & 7 \\ 0 & 0 & 3 \end{bmatrix} is in upper triangular form. By Property 1, its determinant is the product of the diagonal entries: det(A)=523=30\operatorname{det}(A) = 5 \cdot 2 \cdot 3 = 30.
  • The matrix B=[145145987]B = \begin{bmatrix} 1 & 4 & 5 \\ 1 & 4 & 5 \\ 9 & 8 & 7 \end{bmatrix} has two identical rows. By Property 3, its determinant is det(B)=0\operatorname{det}(B) = 0.
  • The matrix C=[238000159]C = \begin{bmatrix} 2 & 3 & 8 \\ 0 & 0 & 0 \\ 1 & 5 & 9 \end{bmatrix} has a row of zeros. By Property 4, its determinant is det(C)=0\operatorname{det}(C) = 0.

Explanation

Determinants have special properties that act like calculation shortcuts. For example, if two rows are identical or an entire row is zeros, the determinant is automatically zero. Knowing these rules can save you a lot of time and effort.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 11: Systems of Equations and Inequalities

  1. Lesson 1

    Lesson 11.1: Systems of Linear Equations: Two Variables

  2. Lesson 2

    Lesson 11.2: Systems of Linear Equations: Three Variables

  3. Lesson 3

    Lesson 11.3: Systems of Nonlinear Equations and Inequalities: Two Variables

  4. Lesson 4

    Lesson 11.4: Partial Fractions

  5. Lesson 5

    Lesson 11.5: Matrices and Matrix Operations

  6. Lesson 6

    Lesson 11.6: Solving Systems with Gaussian Elimination

  7. Lesson 7

    Lesson 11.7: Solving Systems with Inverses

  8. Lesson 8Current

    Lesson 11.8: Solving Systems with Cramer's Rule