Two unknowns or six, and the answer when there is no single answer.
Calculator
Solve a system of equations
Up to six unknowns, exact fractions.
Terms may sit on either side — 2x = 12 - 3y is read as 2x + 3y = 12. Any single letters work as the unknowns.
2 equations, 2 unknowns
x = 6, y = 4
One solution: the two lines cross at exactly one point.
Rank of the coefficients
2
of 2 unknowns
Rank of the augmented matrix
2
Equal — the system is consistent
Degrees of freedom
0
Nothing left to choose
Shape
square
2 × 2
Both the coefficient matrix and the augmented matrix have rank 2, which equals the number of unknowns. That is exactly the condition for a single solution.
Row operations, in order
1R2 → R2 − R1Clear x out of row 2.
2R2 → R2 ÷ −2Scale the row so the y coefficient becomes 1.
3R1 → R1 − R2Clear y out of row 1.
Each operation combines whole rows, which is why it never changes the solution set.
The dot is the solution — the one point every line passes through.
Substituted back into all 2 original equations — every one holds exactly.
What this tool covers
The general solver, for the systems the two hand methods were never meant to reach — and for the cases where “solve it” has no single number as an answer.
Any number of equations and up to six unknowns, typed one per line
The reduced row-echelon form, with every row operation named
Rank, degrees of freedom, and the parametric family of solutions
Cramer’s rule with its precondition stated, and the picture for two unknowns
Up to six unknowns Exact fractions — pivots are never nearly zero The family, when there is no single answer Free, no signup
Free, no signup — exact fractions, nothing rounded.
Updated 6 September 2026 · Works in any browser, no installation
A system of linear equations has exactly one solution, none, or infinitely many — never two, never seven. Which of the three it has follows from two numbers you can count off the reduced matrix. x + y = 10 and x − y = 2 gives x = 6, y = 4; change the second equation to 2x + 2y = 11 and there is no solution at all.
At a glance
Formula shown
Row-reduce the augmented matrix. rank(A) = rank(A|b) = n → one solution. rank(A) = rank(A|b) < n → a family with n − rank free parameters. rank(A) < rank(A|b) → none.
Scenario support
Any number of linear equations in up to six unknowns, with terms on either side of the equals sign.
Educational estimate
Planning support from the values you enter — not professional advice.
Three outcomes, and only three
Whatever the size, a linear system lands in one of three states. The two-unknown case is worth holding in mind because the others are the same thing in more dimensions:
One solution. x + y = 10 and x − y = 2 meet at x = 6, y = 4 — two lines crossing once.
No solution. x + y = 5 and 2x + 2y = 11 are parallel. Row-reducing produces a row reading 0 = 1, which nothing can satisfy.
Infinitely many. x + y = 5 and 2x + 2y = 10 are the same line written twice, and every point on it works: x = 5 − t, y = t.
There is no fourth case and no way to get exactly two solutions. Two straight lines cross once, never, or everywhere along their shared length — and that is the whole list. A system with two isolated solutions exists but is not linear: a line meeting a circle gives two points, and the circle makes the system quadratic.
With three unknowns the objects are planes rather than lines and the same three outcomes appear: meeting at a point, meeting in a line or a plane, or having no common point at all. x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2 gives x = 1, y = 2, z = 3. Beyond three unknowns the picture stops being drawable and the algebra does not change in the slightest.
Rank decides all of it
The three outcomes are not three separate rules. They are three readings of one comparison, between the rank of the coefficient matrix and the rank of the augmented matrix — rank being just the number of non-zero rows left after reduction, which is the number of equations that carry genuinely independent information.
One solution
rank(A) = rank(A|b) = n
As many independent equations as unknowns.
Infinitely many
rank(A) = rank(A|b) < n
The shortfall is the number of free parameters.
None
rank(A) < rank(A|b)
The extra pivot sits in the constants column.
That third case deserves unpacking, because it is the one that looks mysterious. If the augmented matrix has a higher rank than the coefficient part, the extra independent row must be one whose coefficients all vanished while its constant did not — a row reading 0 = something non-zero. The coefficient matrix has rank 1 but the augmented matrix has rank 2. When those two differ, the extra pivot sits in the constants column — a row reading 0 = 1 — and no assignment of values can satisfy it.
And the second case is where “infinitely many” gets a number attached to it. w + x + y + z = 10, x − y = 0, −w + z = 2 has 4 unknowns and rank 3, so 4 − 3 = 1 value is free to choose and the rest follow from it. The calculator reports both ranks on every system, because they are the answer to “why” and the solution alone is only the answer to “what”.
“Infinitely many” is not an answer — the family is
Reporting that a system has infinitely many solutions is half the work, and the less useful half. The answer is the set: for x + y = 5, it is x = 5 − t and y = t, where t is anything you like. Every solution is on that list and nothing else is.
Reading it takes one convention. The unknowns that ended up without a pivot are free — you choose them — and each of the rest is written in terms of those choices. w + x + y + z = 10, x − y = 0, −w + z = 2 produces w = −2 + t, x = 6 − t, y = 6 − t, z = t: pick any t and you have a genuine solution, and every solution arises that way.
The count of free parameters is the geometry. One free parameter is a line of solutions, two is a plane, three is a three-dimensional slab inside however many dimensions the unknowns span. A system with four unknowns and three independent equations has exactly one, and its solution set is a line in four-dimensional space — which sounds exotic and is written down exactly like the two-unknown case.
Three row operations, and why none of them can break anything
Row reduction uses exactly three moves, and the reason it is trustworthy is that each one is reversible and therefore cannot lose or invent a solution:
Swap two rows. Writing the equations in a different order plainly cannot change which values satisfy them.
Multiply a row by a non-zero number. 2x + 2y = 10 and x + y = 5 have identical solution sets. The “non-zero” is load-bearing: multiplying by zero turns an equation into 0 = 0 and throws its information away.
Add a multiple of one row to another. Any pair satisfying both equations satisfies the sum, and subtracting the same multiple back recovers the original — so nothing was gained or lost.
The elimination method is these operations applied by hand with the equations still written out; the matrix form is the same operations with the letters dropped because the columns already record which unknown is which. That is the entire difference between them, and it is why the Elimination Method Calculator and this page always agree.
Cramer’s rule, and the condition most sources bury
Cramer’s rule gives each unknown as one determinant divided by another: replace the column belonging to that unknown with the constants, take the determinant, and divide by the determinant of the original coefficient matrix. For x + y = 10 and x − y = 2 the coefficient determinant is −2 and the two unknowns come straight out of it.
It needs two things, and both matter. The system must be square — as many equations as unknowns — and the coefficient determinant must be non-zero. When that determinant is zero the rule does not give a different answer; it gives no answer at all, because every unknown would be something divided by zero. Crucially it also does not tell you which of the other two outcomes you have. x + y = 5 and 2x + 2y = 10 and x + y = 5 and 2x + 2y = 11 both have determinant zero, and one has infinitely many solutions while the other has none. Only row reduction separates them, which is why this page leads with reduction and offers Cramer beside it.
Practically, Cramer is a good tool for a 2×2 or 3×3 where you want one unknown and not the others, and a poor one beyond that: the work grows factorially while row reduction grows cubically. It remains valuable as a statement about structure rather than as a computational method.
More equations than unknowns, and fewer
Counting equations against unknowns gives an expectation and not a verdict, and the exceptions are worth knowing:
Fewer equations than unknowns can never have a single solution. There are not enough constraints, so it is a family or nothing. 3 equations for 4 unknowns. Too few constraints to pin down a single answer, so the solution is either a family or nothing at all — never a single point.
More equations than unknowns usually has none — but not always. x + y = 3, x − y = 1, 2x + y = 5 has three equations for two unknowns and still solves to x = 2, y = 1, because the third repeats information the first two already carried. Move one constant and it breaks: 2x + y = 99 instead gives no solution.
Equal numbers is the case people expect to be well-behaved, and usually is, but a square system can still be dependent or inconsistent — x + y = 5 and 2x + 2y = 10 is square and has infinitely many solutions.
In every one of those cases the rank comparison gives the right answer and the equation count does not. That is the argument for learning rank rather than a set of rules about shapes.
Why this page will not use decimals
The classification depends entirely on whether a pivot is exactly zero. In floating-point arithmetic a pivot that should be zero routinely comes out as 10⁻¹⁷ instead — not zero, so the row looks usable, so a dependent system is reported as having a single solution whose values are enormous and meaningless. The failure is silent and it produces something that looks like an answer.
Every coefficient here is a fraction of two arbitrary-precision integers, and every pivot test is an exact comparison. x + y = 5 and 2x + 2y = 10 is reported as having infinitely many solutions because the second row genuinely reduces to nothing, not because it reduced to something small enough to ignore. There is no tolerance setting on this page, because there is nothing for one to do.
This is also why entering 0.5, 1/2 and 0.50 gives identical results. Each parses to the same exact rational rather than to three floating-point values that agree to within a tolerance.
Related calculators
The same system, by hand:
Elimination MethodSolve simultaneous equations by elimination with the working shown, including which unknown to remove first and the whole-number multipliers that keep it tidy.
Substitution MethodSolve simultaneous equations by substitution, with the unknown to isolate chosen and explained, the bracketed substitution as its own line, and the expansion after it.
Quadratic FormulaSolve any quadratic with exact roots — surds stay surds and a negative discriminant gives the complex pair — plus the vertex, the factored form and every step of the working.
DiscriminantEvaluate b² − 4ac, the cubic and quartic discriminants, or D = f_xx·f_yy − (f_xy)² for the second-derivative test, in exact arithmetic so the sign is never a rounding artefact.
ScientificTrigonometry, logarithms, powers, roots, and factorials with correct order of operations, memory registers, history, and keyboard entry.
PercentageSolve X% of Y, what percent X is of Y, reverse percentage, increase/decrease, discounts, and tax, tip, or commission.
The rank criterion and Cramer’s rule are theorems, argued above rather than asserted on authority. What is cited is the standard reference statement of each, for anyone who wants the canonical wording beside this one.
Method. Every figure on this page comes from one engine, src/lib/system-of-equations.ts, over the exact-rational linear core in src/lib/algebra/linear.ts — the same core the elimination and substitution pages use, so all three always agree on the answer while showing different work. Coefficients are BigInt fractions and every pivot test is an exact comparison against zero. That engine is verified on every change against 62 hand-written assertions, including that the three methods return identical solutions across a swept range of systems, and that each reported solution is substituted back into every original equation. The count and the per-case breakdown are published on the formula verification page.
Read the guide
This page solves the system; it does not tell you which route to take when you are doing it by hand. Elimination, Substitution, or Matrices — Choosing a Route Through a System gives the five-second rule for that: look for a coefficient of ±1 and substitute, look for equal or opposite coefficients and eliminate, and reach for matrices at three unknowns. It works one system through all three routes side by side, and covers the part they share — telling “no solution” apart from “infinitely many” when the unknowns all vanish at once.
Educational use disclaimer
This calculator solves systems of linear equations — every unknown to the first power, no products of unknowns. Coefficients are held as exact fractions and the classification into one solution, none, or infinitely many is decided by counting pivots that are exactly zero, so it cannot be flipped by rounding. Where the coefficients come from measurements rather than a textbook, an exactly-solvable system can still be practically meaningless: a small change in a coefficient may move the answer a long way, and that sensitivity is a separate subject this page does not address.
Elimination, Substitution, or Matrices — Choosing a Route Through a System
Three ways to solve simultaneous equations, and what actually decides between them: the shape of the coefficients, not preference. With the same system solved all three ways.
Published the general linear-system solver: up to six unknowns, terms on either side of the equals sign, and exact-fraction row reduction.
Organised around rank rather than around a single answer — the reduced matrix, both ranks, the degrees of freedom and the parametric family are all reported, because two of the three possible outcomes have no single number to print.
Carries Cramer’s rule with its precondition stated: a square system and a non-zero determinant, and an explicit note that a zero determinant does not distinguish "no solution" from "infinitely many".
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.