System of Equations Calculator

Solve two or three simultaneous linear equations by Cramer's rule, with the determinant, the full working, and a clear answer when no unique solution exists.

How to use this calculator

  1. 1Choose two or three equations.
  2. 2Enter each equation's coefficients and its right-hand constant.
  3. 3Read the solution, the determinant, and the substitution check.

How the calculation works

x = Dx ÷ D, y = Dy ÷ D, z = Dz ÷ D where D is the coefficient determinant and Dx replaces the x column with the constants
D
Determinant of the coefficient matrix. Zero means no unique solution
Dx
The same determinant with the x column replaced by the right-hand constants
a, b, c
Coefficients of x, y and z in each equation
d
The constant on the right-hand side of each equation

Cramer's rule expresses each unknown as a ratio of two determinants. It is the clearest method to follow by hand for small systems, though elimination is faster for large ones.

A zero determinant is not a failure of the method — it means the system genuinely has no unique solution. Either the equations contradict each other (no solution) or they repeat information (infinitely many).

For a 2×2 system the determinant is ad − bc. Geometrically it is the signed area of the parallelogram the two coefficient vectors span, and zero area means the vectors are parallel — which is exactly when the lines fail to meet at one point.

Worked example

2x + 3y = 12 and 4x − y = 5

  1. 1.Determinant D: (2)(−1) − (3)(4) = −2 − 12 = −14.
  2. 2.Dx replaces the x column with the constants: (12)(−1) − (3)(5) = −12 − 15 = −27.
  3. 3.x = −27 ÷ −14 = 1.928571.
  4. 4.Dy replaces the y column: (2)(5) − (12)(4) = 10 − 48 = −38.
  5. 5.y = −38 ÷ −14 = 2.714286.
  6. 6.Check: 2(1.928571) + 3(2.714286) = 3.857 + 8.143 = 12 ✓.

Result: x = 1.928571, y = 2.714286

A 3×3 system

  1. 1.This is the standard textbook system with solution (2, 3, −1).
  2. 2.The determinant of the coefficient matrix is −1.
  3. 3.Dx = −2, so x = −2 ÷ −1 = 2.
  4. 4.Dy = −3, so y = −3 ÷ −1 = 3.
  5. 5.Dz = 1, so z = 1 ÷ −1 = −1.
  6. 6.Check in equation 1: 2(2) + 1(3) − 1(−1) = 4 + 3 + 1 = 8 ✓.

Result: x = 2, y = 3, z = −1

What a zero determinant actually means

The determinant answers one question: do these equations pin down a single point? A non-zero determinant means yes. Zero means no, and the two ways that can happen are worth telling apart.

If the equations contradict each other — 2x + 3y = 12 alongside 4x + 6y = 30, which is the first doubled but with the wrong constant — the lines are parallel and never meet. There is no solution at all.

If one equation is simply a multiple of another — 2x + 3y = 12 alongside 4x + 6y = 24 — the second adds no information. The lines coincide, and every point on the line is a solution. There are infinitely many.

This calculator distinguishes the two by checking whether the Cramer numerators are also zero, and says which case you are in rather than reporting a generic failure.

Cramer's rule against elimination

Cramer's rule is the clearest method for small systems because each variable comes out independently — you can find y without first finding x, which elimination cannot do. For hand work on 2×2 and 3×3 systems it is hard to beat.

It scales badly. Solving an n×n system by Cramer's rule needs n+1 determinants, and computing determinants by expansion costs roughly n! operations. At n = 20 that is astronomically more work than Gaussian elimination, which finishes in about n³ operations.

Numerically it is also less stable than elimination with partial pivoting, because near-cancelling determinants lose precision. For the 2×2 and 3×3 systems this page handles, neither concern matters — the substitution check confirms the answer to floating-point precision.

What this assumes, and where it stops

Assumptions

  • Equations are linear, with all variables to the first power and no products of variables.
  • The number of equations equals the number of unknowns.
  • Coefficients are real numbers.

Limitations

  • Two or three equations only. Larger systems need Gaussian elimination, which is far more efficient.
  • Linear equations only — anything with x², xy or trigonometric terms needs a different method.
  • Cannot describe the solution set of a degenerate system. It says whether there are none or infinitely many, but does not parameterise the line or plane of solutions.
  • Nearly singular systems, where the determinant is very small but not zero, are sensitive to rounding. Treat the residual check as the honest indicator.

Common questions

How do I solve two equations with two unknowns?

Cramer's rule is the most direct: compute D = ad − bc from the coefficients, then replace the x column with the constants for Dx and the y column for Dy. The solution is x = Dx ÷ D and y = Dy ÷ D. Elimination and substitution give the same answer with different bookkeeping.

What does it mean if the determinant is zero?

The system has no unique solution. Either the equations contradict each other, describing parallel lines that never meet, or one repeats another, describing the same line so every point on it is a solution. A zero determinant is why Cramer's rule cannot proceed — it would divide by zero.

Is Cramer's rule better than elimination?

For 2×2 and 3×3 systems it is clearer, because each variable is computed independently. For larger systems it is dramatically slower — the work grows factorially rather than cubically — and less numerically stable, so Gaussian elimination is the practical choice beyond three equations.

Can a system have more equations than unknowns?

Yes, and it is usually overdetermined with no exact solution. Such systems are normally solved in the least-squares sense, finding the point that comes closest to satisfying all of them, which is what linear regression does. This calculator handles only square systems with a unique answer.

Sources

Formula and content last reviewed on .

Results are estimates for information only, not professional advice.

Report an error

Tools people commonly use alongside the system of equations calculator.

See all math calculators →