Overview

Two equations in two unknowns have one common solution, where the lines cross. Cramer’s rule finds it with determinants.

Enter the coefficients of a₁x + b₁y = c₁ and a₂x + b₂y = c₂.

Worked examples

InputsResult
a₁2b₁3c₁13a₂1b₂-1c₂4x = 5, y = 1Determinant: -5Check: 2(5) + 3(1) = 13 and 1(5) + -1(1) = 4
Show 3 more examples
a₁1b₁1c₁10a₂1b₂-1c₂2x = 6, y = 4Determinant: -2Check: 1(6) + 1(4) = 10 and 1(6) + -1(4) = 2
a₁3b₁2c₁12a₂1b₂4c₂14x = 2, y = 3Determinant: 10Check: 3(2) + 2(3) = 12 and 1(2) + 4(3) = 14
a₁5b₁-2c₁4a₂2b₂3c₂13x = 2, y = 3Determinant: 19Check: 5(2) + -2(3) = 4 and 2(2) + 3(3) = 13

How it works

The determinant D = a₁b₂ − a₂b₁. If D ≠ 0 the solution is x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. If D = 0 the lines are parallel (no solution) or identical (infinitely many).

The formula

x = (c₁b₂ − c₂b₁) ÷ D · y = (a₁c₂ − a₂c₁) ÷ D · D = a₁b₂ − a₂b₁
DDeterminant of the coefficient matrix

Practical tips

  • Always check by substituting x and y into both equations.
  • Word problems such as two ticket prices often reduce to two equations.

Frequently asked questions

Solve 2x + 3y = 13 and x − y = 4.

x = 5, y = 1.

What does a zero determinant mean?

The lines are parallel or the same line.