Linear Equation Solver
Enter 2 to 8 equations and solve for every unknown at once, with fraction input and a clear no-solution / infinite-solutions check.
Worked examples
Splitting a mixed-crate delivery by weight
A warehouse receives pallets mixing two crate types, A and B, and needs to back out each crate's individual weight (in hundreds of pounds) from two pallet totals.
- Eq 1
- 2A + 1B = 5
- Eq 2
- 1A − 1B = 1
A = 2 (200 lb), B = 1 (100 lb)
Reconciling a three-line inventory recount
A distributor recounts three product lines (A, B, C, in hundreds of units) three separate times, once with a batch of B returns subtracted and once with a damaged C batch subtracted.
- Eq 1
- A + B + C = 6
- Eq 2
- 2A − B + C = 3
- Eq 3
- A + 2B − C = 2
A = 1, B = 2, C = 3 (hundreds of units)
How the solver works
A system of N linear equations in N unknowns can be written as a single matrix equation, A·x = b, where A holds every coefficient, x is the column of unknowns, and b is the column of right-hand sides. Sticking A and b together side by side gives the augmented matrix [A | b]. Gauss-Jordan elimination repeatedly picks the largest available entry in each column as a pivot, scales its row to 1, and clears that column out of every other row — the same operations you'd do by hand, just carried through every row instead of one at a time. Once every column has been pivoted, the left block has become the identity matrix and the last column has become x itself: the system is solved. If a column never gets a usable pivot, the matrix is singular — the last rows then reveal whether that's a contradiction (no solution) or redundant information (infinite solutions).
Frequently asked questions
What does "no unique solution" mean, and how is that different from "no solution"?
Both come from the same underlying condition — the system's coefficient matrix has no inverse — but they split into two distinct outcomes once you also look at the right-hand side. If the equations flatly contradict each other (like x + y = 1 and x + y = 5, which can't both be true), there is no solution at all. If instead one equation is just a multiple of another and adds no new information (like x + y = 1 and 2x + 2y = 2), there are infinitely many solutions that satisfy the system. The calculator checks both cases separately and tells you which one you hit, instead of just showing an error.
Can I type fractions like 3/4 instead of converting to a decimal first?
Yes — every coefficient and right-hand-side box accepts a plain number ("0.75", "-6") or a simple fraction written as "numerator/denominator" ("3/4", "-3/4"). The calculator parses the fraction internally and solves with the full decimal value, so you don't lose precision by rounding a fraction before typing it in.
Why does the calculator top out at 8 variables?
The underlying method (Gauss-Jordan elimination with partial pivoting) has no real upper limit — it stays fast and numerically stable well past 8 unknowns. The cap here is about the input grid staying usable on a phone screen: past 8x9 coefficient boxes, a manual-entry UI becomes harder to scan and more error-prone than the math itself.
What method is running behind the scenes, and is it accurate for larger systems?
Gauss-Jordan elimination with partial pivoting: at each step it picks the largest available coefficient in the working column as the pivot before eliminating, which keeps rounding error from compounding the way it can with naive elimination or with cofactor-expansion methods like Cramer's rule. It's the same family of method used in general-purpose numerical libraries, and it stays reliable across the full 2-8 variable range this page supports.
I left a coefficient box empty — does that count as zero?
No. An empty box is treated as "not entered yet," not as zero, so the calculator withholds the result (shown as a dash) until every box in the grid has a value. If you actually want a variable absent from one equation, type 0 into its box explicitly — that's different from leaving it blank, and it keeps the grid an honest record of exactly what you entered.
Do I need a minus-sign toggle for negative coefficients?
No — every box is a plain signed-number field, so a negative coefficient is just typed with a leading minus sign ("-2" or "-3/4"). There's no separate "subtract" mode to switch on; the grid always represents each equation in the form (coefficient)·x1 + (coefficient)·x2 + ... = (right-hand side), with negative coefficients written directly.