Skip to content

Determinants and Cramer's Rule

If determinants and Cramer’s Rule seem abstract, that’s normal. This is just an overview, and you’ll see all of this again in Linear Algebra where it really clicks. For now, focus on the mechanics.

In this lesson you’ll learn how to compute determinants of 2x2 and 3x3 matrices, understand what the determinant tells you geometrically, and use Cramer’s Rule to solve systems of linear equations.

The determinant of a 2x2 matrix is a single number computed from its entries:

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

Multiply the main diagonal, subtract the product of the other diagonal. If the determinant is zero, the matrix is singular (no inverse, and the system it represents either has no solution or infinitely many).

For a 3x3 matrix, expand along the first row:

det[abcdefghi]=a(eifh)b(difg)+c(dheg)\det\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = a(ei - fh) - b(di - fg) + c(dh - eg)

Each term uses a 2x2 determinant (called a minor) with the row and column of that entry removed. The signs alternate in a checkerboard pattern:

[+++++]\begin{bmatrix} \color{#7ee787}{+} & \color{#f47067}{-} & \color{#7ee787}{+} \\ \color{#f47067}{-} & \color{#7ee787}{+} & \color{#f47067}{-} \\ \color{#7ee787}{+} & \color{#f47067}{-} & \color{#7ee787}{+} \end{bmatrix}
[+++++]\begin{bmatrix} \color{#116329}{+} & \color{#cf222e}{-} & \color{#116329}{+} \\ \color{#cf222e}{-} & \color{#116329}{+} & \color{#cf222e}{-} \\ \color{#116329}{+} & \color{#cf222e}{-} & \color{#116329}{+} \end{bmatrix}

So when expanding along the first row, the first entry gets a +, the second gets a -, and the third gets a +. Here’s what that looks like with actual entries:

+adet[efhi]    bdet[dfgi]    +cdet[degh]\color{#7ee787}{+a} \cdot \det\begin{bmatrix} e & f \\ h & i \end{bmatrix} \;\; \color{#f47067}{-b} \cdot \det\begin{bmatrix} d & f \\ g & i \end{bmatrix} \;\; \color{#7ee787}{+c} \cdot \det\begin{bmatrix} d & e \\ g & h \end{bmatrix}
+adet[efhi]    bdet[dfgi]    +cdet[degh]\color{#116329}{+a} \cdot \det\begin{bmatrix} e & f \\ h & i \end{bmatrix} \;\; \color{#cf222e}{-b} \cdot \det\begin{bmatrix} d & f \\ g & i \end{bmatrix} \;\; \color{#116329}{+c} \cdot \det\begin{bmatrix} d & e \\ g & h \end{bmatrix}

For each term, you cross out the row and column of that entry and take the determinant of the 2x2 that’s left.

Cramer’s Rule uses determinants to solve a system of equations. For a 2x2 system:

ax+by=eax + by = e cx+dy=fcx + dy = f

Think of it this way: you have two equations and two unknowns. Each equation is a line, and the solution is where the lines cross. Cramer’s Rule gives you a formula to find that crossing point using determinants instead of substitution or elimination.

Here’s the recipe. Start with the coefficient matrix, which holds just the numbers in front of x and y:

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

If D is not zero, the system has exactly one solution. To find x, take the coefficient matrix and swap out the x-column (the first column) with the constants from the right side of the equations:

Dx=det[ebfd]D_x = \det\begin{bmatrix} \color{#58a6ff}{e} & b \\ \color{#58a6ff}{f} & d \end{bmatrix}
Dx=det[ebfd]D_x = \det\begin{bmatrix} \color{#0550ae}{e} & b \\ \color{#0550ae}{f} & d \end{bmatrix}

To find y, swap out the y-column (the second column) instead:

Dy=det[aecf]D_y = \det\begin{bmatrix} a & \color{#7ee787}{e} \\ c & \color{#7ee787}{f} \end{bmatrix}
Dy=det[aecf]D_y = \det\begin{bmatrix} a & \color{#116329}{e} \\ c & \color{#116329}{f} \end{bmatrix}

Then divide each by the original determinant:

x=DxD,y=DyDx = \frac{D_x}{D}, \quad y = \frac{D_y}{D}

That’s the whole trick: swap the column, take the determinant, divide. The pattern extends to 3x3 systems too, you just swap one column at a time.

Cramer’s Rule works for any size system, but it’s most practical for 2x2 and 3x3. For larger systems, row reduction is more efficient.

Example 1: 2x2 determinant

det[3527]=(3)(7)(5)(2)=2110=11\det\begin{bmatrix} 3 & 5 \\ 2 & 7 \end{bmatrix} = (3)(7) - (5)(2) = 21 - 10 = 11

Example 2: Cramer’s Rule (2x2)

Solve the system:

2x+3y=82x + 3y = 8 x4y=5x - 4y = -5

Each equation is a line. Cramer’s Rule finds the intersection point.

Coefficient determinant:

D=det[2314]=(2)(4)(3)(1)=83=11D = \det\begin{bmatrix} 2 & 3 \\ 1 & -4 \end{bmatrix} = (2)(-4) - (3)(1) = -8 - 3 = -11

Replace x-column with constants:

Dx=det[8354]=(8)(4)(3)(5)=32+15=17D_x = \det\begin{bmatrix} 8 & 3 \\ -5 & -4 \end{bmatrix} = (8)(-4) - (3)(-5) = -32 + 15 = -17

Replace y-column with constants:

Dy=det[2815]=(2)(5)(8)(1)=108=18D_y = \det\begin{bmatrix} 2 & 8 \\ 1 & -5 \end{bmatrix} = (2)(-5) - (8)(1) = -10 - 8 = -18 x=1711=1711,y=1811=1811x = \frac{-17}{-11} = \frac{17}{11}, \quad y = \frac{-18}{-11} = \frac{18}{11}

Example 3: 3x3 determinant

det[123456780]\det\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 0 \end{bmatrix}

Expand along row 1:

=1(5068)2(4067)+3(4857)= 1(5 \cdot 0 - 6 \cdot 8) - 2(4 \cdot 0 - 6 \cdot 7) + 3(4 \cdot 8 - 5 \cdot 7) =1(048)2(042)+3(3235)= 1(0 - 48) - 2(0 - 42) + 3(32 - 35) =48+849=27= -48 + 84 - 9 = 27

Determinants and Cramer’s Rule are used in:

  • Engineering (solving circuit equations, structural analysis)
  • Economics (equilibrium models with multiple markets)
  • Computer graphics (checking if transformations preserve orientation)
  • Physics (cross products use determinant notation)
  • Cryptography (matrix-based encryption requires invertible matrices)

Example: in computer graphics, the determinant of a transformation matrix tells you whether the transformation preserves orientation (positive determinant) or flips it (negative determinant). A zero determinant means the transformation collapses the shape to a lower dimension.

Use this matrix for Question 1:

[3142]\begin{bmatrix} 3 & 1 \\ 4 & 2 \end{bmatrix}
Find the determinant of the matrix shown above:
If the determinant of the coefficient matrix is zero, the system:
In Cramer's Rule, to find x you replace:
When expanding a 3x3 determinant along the first row, the signs are:
A matrix with a zero determinant is called: