system of equations solver
To solve a system of linear equations, eliminate one unknown at a time by adding or subtracting multiples of the equations, then substitute back. Type the equations separated by commas or on separate lines.
Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas
x − y = 1
✓ checked: these values make every original equation true.
step-by-step working
Write each equation in standard form (unknowns on the left, numbers on the right):
(1) 2x + y = 5
(2) x − y = 1Add (1) and (2) to eliminate y:
(3) 3x = 6Divide both sides of (3) by 3.
x = 2Substitute x = 2 into (1) and solve for y.
y = 1
Elimination, step by step
- Write each equation with the unknowns on the left and the number on the right, and number them (1), (2), …
- Pick an unknown to eliminate. Multiply the equations so its coefficients match.
- Subtract the equations (or add them if the coefficients have opposite signs). That unknown disappears.
- For three unknowns, do this twice to get two equations in two unknowns, then repeat.
- Solve the last equation, then substitute back to find the others.
- Check the values in every original equation.
Worked examples
2x + y = 5 x − y = 1
✓ checked: these values make every original equation true.
step-by-step working
Write each equation in standard form (unknowns on the left, numbers on the right):
(1) 2x + y = 5
(2) x − y = 1Add (1) and (2) to eliminate y:
(3) 3x = 6Divide both sides of (3) by 3.
x = 2Substitute x = 2 into (1) and solve for y.
y = 1
3x − 2y = 4 2x + 5y = 9
✓ checked: these values make every original equation true.
step-by-step working
Write each equation in standard form (unknowns on the left, numbers on the right):
(1) 3x − 2y = 4
(2) 2x + 5y = 9Multiply (1) by 2 and multiply (2) by 3, then subtract (1) from (2) to eliminate x:
(3) 19y = 19Divide both sides of (3) by 19.
y = 1Substitute y = 1 into (1) and solve for x.
x = 2
x + y + z = 6 x − y + z = 2 2x + y − z = 1
✓ checked: these values make every original equation true.
step-by-step working
Write each equation in standard form (unknowns on the left, numbers on the right):
(1) x + y + z = 6
(2) x − y + z = 2
(3) 2x + y − z = 1Add (1) and (2) to eliminate y:
(4) 2x + 2z = 8Subtract (1) from (3) to eliminate y:
(5) x − 2z = −5Multiply (5) by 2, then subtract (4) from (5) to eliminate x:
(6) −6z = −18Divide both sides of (6) by −6.
z = 3Substitute z = 3 into (4) and solve for x.
x = 1Substitute x = 1 and z = 3 into (1) and solve for y.
y = 2
No solution or infinitely many
If elimination leaves 0 = 0, the equations are dependent: one is a multiple or combination of the others, and there are infinitely many solutions. If it leaves something impossible like 0 = 1, the equations contradict each other and there is no solution. For two unknowns these are two identical lines and two parallel lines.
Common mistakes
- Multiplying only the left side of an equation: the number on the right must be multiplied too.
- Subtracting when the coefficients have opposite signs (you should add), or the other way round.
- Stopping after finding one unknown: substitute back to find the rest.
Frequently asked questions
How do I type a system?
Separate the equations with commas, semicolons or new lines, for example: 2x + y = 5, x − y = 1. Use the same letters in every equation.
How many unknowns can it handle?
Up to four linear equations in four unknowns. You need as many equations as unknowns.
Elimination or substitution?
This solver uses elimination because it works the same way for every linear system and keeps the numbers as exact fractions. Substitution gives the same answer and is handy when one equation already says y = …
Can it solve non-linear systems?
Not yet. Systems with x², xy or other non-linear terms aren't supported; you'll get a message saying so.