← College algebra

Cramer’s rule

Solve a system with determinants.

Start this lesson

For the system ax + by = e, cx + dy = f, let D = ad − bc. Replace the x-column with (e, f) to get Dₓ = ed − bf, and the y-column to get Dᵧ = af − ec. Then x = Dₓ/D and y = Dᵧ/D, as long as D ≠ 0.

Example: 2x + y = 5, x − y = 1

  1. D = 2(−1) − 1(1) = −3
  2. Dₓ = 5(−1) − 1(1) = −6
  3. x = −6/−3 = 2
  4. Dᵧ = 2(1) − 5(1) = −3, y = 1

Why it works: Each unknown equals a ratio of determinants, because swapping in the answer column measures how much of the solution comes from that variable.

Tip: If D = 0, the system has no unique solution: the lines are parallel or the same.