Cramer's Rule Calculator
This Cramer’s rule calculator solves a square system with determinants — and draws every one of them, expanded, so the arithmetic can be copied straight off the screen.
Take 2x + y = 5 with x + 3y = 10. The coefficients give D = (2)(3) − (1)(1) = 5. Replace the x column with the numbers on the right and that determinant is Dx = (5)(3) − (1)(10) = 5. Do the same to the y column and Dy = (2)(10) − (5)(1) = 15. Then x = Dx/D = 1 and y = Dy/D = 3. Three determinants, two divisions, and no rearranging at any point.
How Cramer’s Rule Works
Write the coefficients as a square grid and take its determinant. Call that D. Then, one letter at a time, swap that letter’s column for the column of numbers on the right-hand side and take the determinant of what you get. Divide, and you have the letter.
What makes it unlike every other route through a system is that each unknown comes out on its own. You can find y without ever touching x. That is the whole appeal, and it is why the rule survives in courses even though it is slower than the alternatives once a system gets big.
The name comes from Gabriel Cramer, who published it for any number of unknowns in 1750. Colin Maclaurin had printed the two and three unknown cases two years earlier and may have been teaching them from 1729 — but Maclaurin’s version said nothing about what happens when the denominator turns out to be zero, which is exactly the case the next section is about.
Cramer’s Rule for Three Variables
Nothing changes except the size of the grids: one 3×3 for D and one for each letter. A 3×3 determinant is expanded along the top row — each entry multiplied by the 2×2 left when its own row and column are crossed out, with the middle term subtracted.
For x + y + z = 6, 2y + 5z = −4 and 2x + 5y − z = 27, the four determinants come out as D = −21, Dx = −105, Dy = −63 and Dz = 42. Dividing gives x = 5, y = 3 and z = −2. Note the missing x in the second equation: it is not a gap, it is a zero, and it goes into the grid as one.
What Happens When the Determinant Is Zero
This is the case worth being careful about, and it is where a good deal of what is written online is wrong. A zero determinant does not mean the system has more than one solution. It means it does not have exactly one — and the two possibilities have to be told apart.
Take x + y = 2 with x + y = 5. Here D = 0, but Dx = −3. A fraction with zero underneath and something else on top can never be satisfied, so the system has no solution at all. Now take x + y = 2 with 2x + 2y = 4: D = 0 again, but Dx and Dy are also zero, and this system has infinitely many solutions.
It is tempting to turn that into a rule — all numerators zero means infinitely many — and it is not true. The pair 0x + 0y = 0 and 0x + 0y = 5 has D, Dx and Dy all zero and still has no solution. Determinants alone cannot separate the two cases in general, which is why most tools stop at “D = 0, rule not applicable” and hand you back to another method. This one counts how many of your equations are genuinely independent and tells you which case you are in, then gives the family of answers when there is one.
Where the Rule Does Not Reach
A determinant exists only for a square grid, so the rule needs exactly as many equations as unknowns. Two equations in three unknowns has no D to compute, however solvable it may be; the calculator says so plainly rather than pretending, and still gives you the answer.
Size is the other limit, and it is practical rather than mathematical. The rule is perfectly true for a 4×4, but that determinant is twenty-four signed products, and each unknown needs another one. Beyond three unknowns nobody works it by hand, which is why this calculator covers 2×2 and 3×3 and says so.
How to Use This Cramer’s Rule Calculator
Each equation has two boxes with the equals sign printed between them. Nothing has to be arranged into a matrix first — 3x − 5 = 2y + 1 goes in exactly as printed, and fractions, decimals and brackets are all accepted. The keypad carries a, b and c as well as x, y and z.
Press = and open Show the determinants. Every grid is drawn between its bars with the swapped column picked out in blue, the expansion written underneath in full, and the quotient shown as one determinant over the other. Everything is kept in exact fractions: a quotient like 4/3 is never handed to you as 1.33. Before any answer appears the values are put back into the equations you typed and both sides are compared exactly, because one sign wrong inside a determinant changes the answer completely. If you would rather just have the answer and see where the lines cross, the system of equations calculator does that instead.
Cramer’s Rule FAQ
What is Cramer's rule?
What does it mean if the determinant is zero?
How do you find Dx and Dy?
Can Cramer's rule be used on any system of equations?
Is Cramer's rule good for large systems?
Why does this calculator show fractions instead of decimals?
Take D, swap a column, take it again, divide. Four determinants and three divisions settle a system in three unknowns — and when D comes out zero, that is a result too, not a dead end.