System of equations calculator: solve up to 12 linear equations in exact fractions, with every Gauss–Jordan step and the number of solutions.
Three equations in three unknowns is where solving by hand starts to go wrong: one sign slip in the second elimination and every answer after it is off. Type the equations one per line and this system of equations calculator reduces them with exact fractions. It reports the answer, then shows every row operation that produced it.
Equations do not need tidying first. You can write 2(a + b) = 18, a - b/2 = 3 or put variables on both sides; the parser expands brackets and moves every term to the left. Any single letter works as a variable, with an optional number (x1, x_2). Decimals take a dot: a decimal comma such as 1,5 is caught with “Use a dot for decimals (1.5, not 1,5)” rather than misread.
The page opens on this system:
2x + 3y - z = 4x - y + 2z = 73x + y + z = 10The result is One solution: x = 2, y = 1, z = 3, with rank 3. Open Show Gauss–Jordan steps and there are nine row operations, starting with R1 → (1/2)R1. The green check list substitutes the answer back into each original line, so the first reads 4 = 4. Load Sample moves on to a bracketed pair, a dependent system, a contradictory one, a 4×4 and a pair with decimal coefficients.
For each variable in turn, the solver finds the first row at or below the current one with a non-zero entry, swaps it up if needed and scales it so the pivot is 1. It then clears that column in every other row. The finished matrix is in reduced row echelon form. Every value is a fraction of two arbitrary-precision integers, so 1/3 stays 1/3 through a 12×12 system instead of drifting to 0.333333.
The Decimals switch changes only how numbers are printed. Results are rounded to 6 decimal places and marked with ≈ when the exact value does not terminate. Copy Steps writes the whole working as plain text, matrix by matrix, in whichever format is showing.
When a row reduces to all zeros, one equation was a multiple or mixture of the others. With x + 2y - z = 4 and its double, z becomes a free variable and the answer is written as x = 2 - (1/3)z, y = 1 + (2/3)z. When a row reduces to 0 = a non-zero number, the equations contradict each other and the tool says which row.
Only linear systems are accepted. Typing xy = 3 stops with “Line 1 multiplies two variables together (x·y), which makes the system nonlinear.” A ^ or a variable in a denominator is refused the same way. Minus signs and × pasted from a PDF are read as ordinary operators, and a line starting with # is skipped, which is handy for labelling equations.
Solving a system means finding values that make every equation true at once. For systems of linear equations there are only three possible numbers of solutions: one, none, or infinitely many. With two variables, each equation is a line and the solution is their point of intersection. Parallel lines give no points of intersection, and the same line written twice gives infinitely many. With three variables the lines become planes.
Cramer's rule is the other method taught for solving systems of equations. It writes each unknown as a ratio of two determinants, with the constant terms swapped into one column. It is handy when you need a formula for a single variable, but it only works when the system is square and its determinant is not zero. It also slows down quickly as the system grows. Row reduction, the method used here, has neither limit and also explains a dependent or contradictory system. If your equations involve squares, products or roots, they are not linear, and you need a nonlinear solver or a graph instead.
Use any letters as variables (x, y, z, a, x1, x_2). Fractions like 1/3, decimals, parentheses and terms on both sides are fine. Lines starting with # are ignored.
x
2
y
1
z
3