System of Equations Calculator
Enter two or three equations and this system of equations calculator solves them by elimination or substitution, shows every step, and checks the answer in each original equation. It also tells you when a system has no solution or infinitely many.
Worked example
Step-by-step solution
;
Step 1 / 6
Write the system
Elimination works well because y has coefficients 2 and −1.
Step 2 / 6
Scale the second equation
Multiply both sides by 2 so the y terms become +2y and −2y.
Step 3 / 6
Add the equations to eliminate y
The y terms cancel, leaving one equation in x.
Step 4 / 6
Solve for x
Divide both sides by 5.
Step 5 / 6
Back-substitute to find y
Put x = 4 into x − y = 2.
Step 6 / 6
Check both equations
Both original equations are true, so the solution is correct.
Answer
x = 4, y = 2 (the lines meet at (4, 2))
How to use the System of Equations Calculator
- Type each equation and separate them with semicolons, for example 3x + 2y = 16; x − y = 2.
- Press Solve it. The calculator picks elimination or substitution, whichever needs fewer steps for your system.
- Follow each step: the equation that was scaled, added or substituted is shown in the math line.
- Read the final check, where the solution is put back into every original equation.
How to solve a system of equations
A system of equations is a set of equations that must all be true at the same time. For two linear equations in x and y, each equation is a line, and the solution is the point where the lines cross. A 3×3 system adds a third variable and a third equation; each equation is then a plane.
Elimination adds or subtracts the equations after scaling them, so one variable cancels. Substitution solves one equation for a variable and replaces that variable in the others. Both methods give the same answer; elimination is usually faster when the coefficients line up, and substitution when one variable already has a coefficient of 1.
A linear system has exactly one solution, no solution or infinitely many. If the variables cancel and a false statement such as 0 = 4 remains, the lines are parallel and there is no solution. If a true statement such as 0 = 0 remains, the equations describe the same line and every point on it is a solution.
System of equations calculator example: a 3×3 system
Eliminate the same variable from two different pairs of equations. Adding the first and third equations cancels z and gives 2x + 3y = 8. Adding the second and third equations also cancels z and gives 3x + y = 5. You now have a 2×2 system in x and y.
From 3x + y = 5, write y = 5 − 3x and substitute it into 2x + 3y = 8: 2x + 15 − 9x = 8, so −7x = −7 and x = 1. Then y = 5 − 3 = 2, and the first equation gives z = 6 − 1 − 2 = 3. Check (1, 2, 3) in all three equations: 6 = 6, 3 = 3 and 2 = 2, so the solution is correct.
When a system has no solution or infinitely many
For 2x + 4y = 6 and x + 2y = 5, multiply the second equation by 2 to get 2x + 4y = 10. Subtracting the equations removes both variables and leaves 0 = 4, which is false. The two lines have the same slope but different intercepts, so they are parallel and never meet: the system has no solution.
Now compare x + 2y = 3 and 2x + 4y = 6. The second equation is the first one multiplied by 2, so subtracting leaves 0 = 0. Both equations describe the same line, and every point on it is a solution. Write the answer in terms of a parameter, for example x = 3 − 2t and y = t for any real number t.
Nonlinear systems: where a line meets a parabola
For y = x² and y = x + 2, both expressions equal y, so set them equal: x² = x + 2. Move every term to one side to get x² − x − 2 = 0, which factors as (x − 2)(x + 1) = 0. The solutions are x = 2 and x = −1.
Find y for each value with the simpler equation y = x + 2: x = 2 gives y = 4 and x = −1 gives y = 1. The line crosses the parabola at (2, 4) and (−1, 1). Check both points in y = x² as well: 2² = 4 and (−1)² = 1. Losing one of the two branches is the most common mistake with nonlinear systems.
Frequently asked questions
Should I use elimination or substitution?
Use substitution when a variable is already isolated or has a coefficient of 1, as in x − y = 2. Use elimination when the same variable has equal or opposite coefficients, or can be made so by multiplying one equation. The calculator names the method in the step titles.
How do I know if a system has no solution?
Eliminate a variable. If every variable cancels and the result is false, such as 6 = 10, the system is inconsistent and has no solution. If the result is always true, such as 0 = 0, the system is dependent and has infinitely many solutions.
Can the calculator solve a 3×3 system?
Yes. Enter three equations in x, y and z. The steps eliminate the same variable from two pairs of equations, solve the resulting 2×2 system and then back-substitute to find the third variable.
Does it solve nonlinear systems?
Yes. For a system such as y = x² and y = x + 2, it substitutes to get a single equation, solves it, and finds the matching value for each solution. A line and a parabola can meet at two points, one point or none.
How can I check the answer myself?
Substitute the values into every original equation, not just one. The solution is correct only if all equations are true; the last step of every worked solution does this check for you.
Related calculators
Have a different kind of math problem? Try the free math solver. Use the subject menu for physics and chemistry.