How this instrument works
Cramer's rule turns solving two equations for two unknowns into arithmetic with no substitution step. For the system a₁x + b₁y = c₁ and a₂x + b₂y = c₂, each unknown comes out as a ratio of two determinants: the denominator is identical for both and is built from the coefficients a₁, b₁, a₂, b₂ alone, while the numerator repeats that same grid but with one column replaced by the constants c₁, c₂ — the x-column swapped out for x, the y-column swapped out for y.
The shortcut comes straight out of matrix inversion. Writing the system as a matrix equation, the solution x = A⁻¹b expands, through the adjugate formula for an inverse, into exactly this column-swap-and-divide pattern. Gabriel Cramer published the general statement in 1750 in an appendix on algebraic curves, though Colin Maclaurin had worked out the same idea for smaller systems a few years earlier in a book printed after his death.
The one condition that matters: the shared denominator, a₁b₂ − a₂b₁, is the system's determinant, and it cannot be zero. A zero determinant means the two lines are parallel — either they never cross, or the equations describe the same line and every point on it satisfies both at once. There is also a quieter surprise here: the closed-form elegance does not scale well. Expanding determinants by cofactors grows factorially more expensive as a system gets larger, which is why large systems get solved by elimination and Cramer's rule stays a small, exact, by-hand tool like this one.
- Enter the first equation's coefficients in a₁, b₁, and c₁ — the numbers in a₁x + b₁y = c₁.
- Enter the second equation's coefficients in a₂, b₂, and c₂ — the numbers in a₂x + b₂y = c₂.
- Watch for the warning that appears if a₁b₂ − a₂b₁ comes out to zero, meaning no unique solution exists.
- Read x and y straight off the results — each one is its own column-swapped determinant divided by the same shared denominator.
Worked example — 2x + 3y = 8 meets x − y = 1
Take the system 2x + 3y = 8 and x − y = 1, so a₁ = 2, b₁ = 3, c₁ = 8, a₂ = 1, b₂ = −1, c₂ = 1. The shared determinant is D = a₁b₂ − a₂b₁ = (2)(−1) − (1)(3) = −2 − 3 = −5, a nonzero value that confirms a single unique solution exists before any further work happens.
Swapping the x-column for the constants gives a numerator of c₁b₂ − c₂b₁ = (8)(−1) − (1)(3) = −8 − 3 = −11, so x = −11 ⁄ −5 = 2.2. Swapping the y-column instead gives a₁c₂ − a₂c₁ = (2)(1) − (1)(8) = 2 − 8 = −6, so y = −6 ⁄ −5 = 1.2. Checking against the first equation, 2(2.2) + 3(1.2) = 4.4 + 3.6 = 8, exactly as required.
Questions
What does Cramer's rule actually compute?
It computes each unknown as a ratio of two determinants sharing one denominator — the coefficient matrix's own determinant — with the numerator being that same matrix after its unknown's column is swapped for the constants. For a 2×2 system that reduces to four subtractions and two divisions, with no elimination step at all.
Why does the denominator have to be nonzero?
Because a₁b₂ − a₂b₁ is the system's determinant, and a zero determinant means the two lines described by the equations run parallel. If they are distinct parallel lines there is no intersection at all; if they are really the same line written two different ways, every point on it satisfies both equations, so there is no single unique answer to report.
How is Cramer's rule different from Gaussian elimination?
Both solve the same linear system, but elimination combines rows step by step until each unknown is isolated, while Cramer's rule reaches directly for a closed-form ratio of determinants. Elimination scales efficiently to large systems; determinant expansion grows factorially with size, which is why Cramer's rule stays a small-system and textbook tool rather than a numerical workhorse.
Can Cramer's rule handle more than two unknowns?
Yes — the same column-swap pattern extends to any n×n system: each unknown's numerator is the coefficient determinant with its column replaced by the constants, divided by the full determinant. This sheet solves only the 2×2 case; larger systems need larger determinants, each one costing more to expand by hand as n grows.
Who invented Cramer's rule?
Gabriel Cramer, a Swiss mathematician, published the general method for systems of any size in 1750, in an appendix to a book on algebraic curves. A version limited to smaller systems had appeared a few years earlier in Colin Maclaurin's work, printed posthumously — but Cramer's broader statement is the one that carried his name forward.
What happens if a₁, b₁, a₂, and b₂ are all zero?
The shared denominator a₁b₂ − a₂b₁ is zero regardless of the constants, so the sheet reports that no unique solution exists — correctly, since with every coefficient gone neither equation constrains x or y at all, and the two numerator determinants collapse to zero right along with it.