Precalculus · Grades 11, 12

Determinants and Cramer's Rule

Quick answer

The determinant of a square matrix is a single number computed from its entries: ad − bc for a 2 × 2 matrix, and an expansion into three 2 × 2 determinants for a 3 × 3. Cramer's rule uses determinants to solve a system with as many equations as unknowns: each variable equals the determinant of the coefficient matrix with that variable's column replaced by the constants, divided by the determinant of the coefficient matrix. A zero determinant means there is no unique solution.

What you'll learn

  • Compute 2 × 2 and 3 × 3 determinants
  • Solve a 2 × 2 system with Cramer's rule
  • Solve a 3 × 3 system with Cramer's rule
  • Interpret a zero determinant

Determinants

The determinant of a square matrix is one number built from its entries. For a 2×22 \times 2 matrix:

det⁡[abcd]=ad−bc\det\begin{bmatrix} a & b\\ c & d \end{bmatrix} = ad - bc

For a 3×33 \times 3 matrix, expand along the first row, alternating signs:

det⁡[a1a2a3b1b2b3c1c2c3]=a1∣b2b3c2c3∣−a2∣b1b3c1c3∣+a3∣b1b2c1c2∣\det\begin{bmatrix} a_1 & a_2 & a_3\\ b_1 & b_2 & b_3\\ c_1 & c_2 & c_3 \end{bmatrix} = a_1\begin{vmatrix} b_2 & b_3\\ c_2 & c_3 \end{vmatrix} - a_2\begin{vmatrix} b_1 & b_3\\ c_1 & c_3 \end{vmatrix} + a_3\begin{vmatrix} b_1 & b_2\\ c_1 & c_2 \end{vmatrix}

Cramer’s rule

For a system with as many equations as unknowns and coefficient matrix AA, let AxA_x be AA with the xx-column replaced by the constants, and similarly AyA_y, AzA_z. If det⁡A≠0\det A \ne 0:

x=det⁡Axdet⁡Ay=det⁡Aydet⁡Az=det⁡Azdet⁡Ax = \frac{\det A_x}{\det A} \qquad y = \frac{\det A_y}{\det A} \qquad z = \frac{\det A_z}{\det A}

Why the determinant is the denominator

Solve ax+by=eax + by = e, cx+dy=fcx + dy = f by elimination: multiply the first equation by dd, the second by bb, and subtract. The yy terms cancel, leaving (ad−bc)x=ed−bf(ad - bc)x = ed - bf. So

x=ed−bfad−bcx = \frac{ed - bf}{ad - bc}

The denominator is det⁡A\det A and the numerator is the determinant with the xx-column replaced by (e,f)(e, f). Cramer’s rule is elimination done once, in general, and written with determinants. It also explains the zero case: when ad−bc=0ad - bc = 0, elimination wipes out xx as well, and the system has either no solution or infinitely many. Geometrically, the two lines are parallel or the same line. The linear algebra lesson on determinants gives the full picture: det⁡A=0\det A = 0 exactly when AA has no inverse.

Worked examples

Common mistakes

Practice problems

  1. Find det⁡[4725]\det\begin{bmatrix} 4 & 7\\ 2 & 5 \end{bmatrix}.

    Answer

    66

    Full solution

    4⋅5−7⋅2=20−144 \cdot 5 - 7 \cdot 2 = 20 - 14.

  2. Solve 3x+2y=73x + 2y = 7, x−y=−1x - y = -1 with Cramer’s rule.

    Answer

    x=1x = 1, y=2y = 2

    Full solution

    det⁡A=−3−2=−5\det A = -3 - 2 = -5, det⁡Ax=−7+2=−5\det A_x = -7 + 2 = -5, det⁡Ay=−3−7=−10\det A_y = -3 - 7 = -10.

  3. Solve 5x−2y=45x - 2y = 4, 3x+4y=183x + 4y = 18.

    Answer

    x=2x = 2, y=3y = 3

    Full solution

    det⁡A=20+6=26\det A = 20 + 6 = 26, det⁡Ax=16+36=52\det A_x = 16 + 36 = 52, det⁡Ay=90−12=78\det A_y = 90 - 12 = 78.

  4. Solve 4x−3y=−24x - 3y = -2, 2x+5y=122x + 5y = 12.

    Answer

    x=1x = 1, y=2y = 2

    Full solution

    det⁡A=20+6=26\det A = 20 + 6 = 26, det⁡Ax=−10+36=26\det A_x = -10 + 36 = 26, det⁡Ay=48+4=52\det A_y = 48 + 4 = 52.

  5. Find det⁡[102310021]\det\begin{bmatrix} 1 & 0 & 2\\ 3 & 1 & 0\\ 0 & 2 & 1 \end{bmatrix}.

    Answer

    1313

    Full solution

    1(1−0)−0+2(6−0)=1+121(1 - 0) - 0 + 2(6 - 0) = 1 + 12.

  6. For which kk does kx+2y=1kx + 2y = 1, 3x+6y=43x + 6y = 4 have no unique solution?

    Answer

    k=1k = 1

    Full solution

    det⁡A=6k−6=0\det A = 6k - 6 = 0. At k=1k = 1 the lines are parallel and distinct, so there is no solution at all.

  7. In Example 2, use Cramer’s rule to find only zz.

    Answer

    z=3z = 3

    Full solution

    det⁡Az=∣1162−13122∣=1(−2−6)−1(4−3)+6(4+1)=21\det A_z = \begin{vmatrix} 1 & 1 & 6\\ 2 & -1 & 3\\ 1 & 2 & 2 \end{vmatrix} = 1(-2 - 6) - 1(4 - 3) + 6(4 + 1) = 21, and 217=3\tfrac{21}{7} = 3. Cramer’s rule finds one variable without the others.

  8. A student computes det⁡[231−1]\det\begin{bmatrix} 2 & 3\\ 1 & -1 \end{bmatrix} as −2+3=1-2 + 3 = 1. What went wrong?

    Answer

    The product bc=3bc = 3 must be subtracted: −2−3=−5-2 - 3 = -5.

    Full solution

    ad−bc=(2)(−1)−(3)(1)ad - bc = (2)(-1) - (3)(1).

Frequently asked questions

What is Cramer's rule?

For a system Ax = b with det A ≠ 0, each unknown xᵢ = det Aᵢ / det A, where Aᵢ is A with its i-th column replaced by b.

How do you compute a 2 × 2 determinant?

For the matrix with rows (a, b) and (c, d), the determinant is ad − bc.

How do you compute a 3 × 3 determinant?

Expand along the first row: each entry times the 2 × 2 determinant left after deleting its row and column, with signs +, −, +.

What does a zero determinant mean?

The system has no unique solution: either no solution or infinitely many. Cramer's rule does not apply.

When is Cramer's rule practical?

For 2 × 2 and 3 × 3 systems, especially when only one variable is needed. For larger systems, row reduction is much faster.

What to learn next

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSA.REI.C.9Reasoning with Equations and Inequalities(+) Find the inverse of a matrix if it exists and use it to solve systems of linear equations (using technology for matrices of dimension 3 × 3 or greater).