By Tim King · Updated
System of Equations Calculator
Gaussian Elimination for Two to Six Unknowns, Each Row Operation Shown
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the System of Equations Calculator works
This system of equations calculator solves simultaneous linear equations in two to six unknowns. Type one equation per line in any arrangement, brackets and fractions included. It reports the unique solution, or tells you when there is none or infinitely many, and lists every elimination step.
A system of equations is a set of conditions that must all hold at once. With two unknowns each equation is a straight line and the solution is where the lines cross. With three it is the point where three planes meet. Elimination is the standard method that works for any size.
How the system of equations calculator works
Each equation is rearranged so the letters are on the left and the number is on the right, then written as a row. The calculator uses Gauss-Jordan elimination: scale a row so its leading coefficient is 1, then subtract multiples of it from every other row to clear that column. Repeat column by column until each row names one variable. No single formula is needed, just those row operations.
First example. x + y + z = 6, 2x − y + z = 3 and x + 2y − z = 2. Subtracting 2 × R1 from R2 and R1 from R3 removes x; further steps leave x = 1, y = 2, z = 3.
Second example. x + 2y = 4 and 2x + 4y = 8 are the same line, so every point on it is a solution.
How many solutions can a system have? Exactly one, none, or infinitely many. If elimination produces a row reading 0 = 5 the equations contradict each other. If a whole row vanishes and fewer pivots remain than unknowns, some variables are free.
Example pairs of simultaneous equations and their solutions
| Equations | Solution |
|---|---|
| x + y = 10 and x - y = 2 | x = 6, y = 4 |
| 2x + y = 7 and x - y = 2 | x = 3, y = 1 |
| 3x + 2y = 16 and x + 4y = 12 | x = 4, y = 2 |
| x + 2y = 4 and 2x + 4y = 8 | Infinitely many (same line) |
| x + y = 3 and x + y = 5 | No solution (parallel lines) |
| 5x - 2y = 4 and 3x + y = 9 | x = 2, y = 3 |
| y = 2x + 1 and y = -x + 7 | x = 2, y = 5 |
| 4x + 3y = 24 and 2x - 3y = 6 | x = 5, y = 4/3 |
| x = 3y and x + y = 12 | x = 9, y = 3 |
| 0.5x + y = 4 and x - y = 2 | x = 4, y = 2 |
| a + b = 20 and a - b = 4 | a = 12, b = 8 |
| 2x + 3y = 13 and 3x + 2y = 12 | x = 2, y = 3 |
| x - 3y = -7 and 2x + y = 7 | x = 2, y = 3 |
| 6x - y = 11 and 2x + 3y = 7 | x = 2, y = 1 |
| y = 3x - 4 and y = x + 2 | x = 3, y = 5 |
| x/2 + y/3 = 5 and x - y = 0 | x = 6, y = 6 |
| 7x + 2y = 3 and 3x + y = 1 | x = 1, y = -2 |
| 2x - 5y = 1 and 4x - 10y = 3 | No solution (parallel lines) |
| 3x + y = 0 and x - 2y = 7 | x = 1, y = -3 |
| x + y = 1.5 and 2x + y = 2.5 | x = 1, y = 1/2 |
| 10x + 5y = 85 and x + y = 11 | x = 6, y = 5 |
| 8x + 3y = 1 and 5x + 2y = 0 | x = 2, y = -5 |
Tips
- Separate equations by line or semicolon. Both are accepted.
- Missing letters count as zero. x + z = 4 is fine in a three-variable system.
- Any letters work. Use a and b, or p, q and r, if that matches your problem.
FAQ
What is the difference between substitution and elimination?
Substitution rearranges one equation for a variable and plugs it into the others. Elimination adds or subtracts multiples of equations to cancel a variable. Both reach the same answer, but elimination scales cleanly to three or more unknowns, which is why the calculator uses it.
Why do I need as many equations as unknowns?
Each independent equation removes one degree of freedom. Two unknowns with one equation leave a whole line of answers. You need two independent equations to fix a point, three for three unknowns, and so on. Extra equations are fine if they agree.
What does a free variable mean?
When the equations are not all independent, at least one variable can take any value and the others follow from it. The calculator names the free variables and writes the rest in terms of them, so x = 6 − y − z means pick any y and z and x is set.
Can I use a matrix to solve this instead?
Yes. Write the coefficients as a matrix A and the right-hand numbers as a column b; the solution is A⁻¹b when A has an inverse. The inverse matrix calculator finds A⁻¹, but elimination here is the same work arranged as equations.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
Linear Equation Calculator
Solve one-variable linear equations with full working.
Matrix Calculator
Matrix multiplication, addition and transpose with working.
Determinant And Inverse Matrix Calculator
Determinant and inverse of a square matrix, as exact fractions.
Slope-Intercept Form Calculator
Slope, intercepts and every form of a line from two points.
Inequality Calculator
Solve a linear or double inequality, with interval notation and the number line.