Algebra
How to Solve Systems of Equations: Graphing, Substitution and Elimination
By MathSolver Pro Editorial Team · Published
A system of equations asks for values that satisfy every equation at once. Substitution and elimination both work for any linear system; the art is choosing the one that needs less arithmetic.
What a solution to a system means
A system of linear equations is a set of two or more linear equations that share the same unknowns. A solution is an assignment of values, such as and , that makes every equation true simultaneously. Checking a single equation is not enough.
With two unknowns, each equation is a straight line in the plane, and a solution is a point that lies on both lines. That picture explains the three possible outcomes:
- The lines cross once: exactly one solution.
- The lines are parallel: no solution. The system is called inconsistent.
- The lines are the same line: infinitely many solutions. The equations are dependent.
Method 1: graphing
Rewrite each equation in slope-intercept form , draw both lines, and read off the intersection. Graphing is the best way to see what a system means, and it immediately shows parallel or identical lines. It is not precise, though: an intersection at is hard to read from a sketch. Use it to estimate, then confirm algebraically. You can draw both lines at once in the graphing calculator.
Method 2: substitution
Solve one equation for one variable, substitute that expression into the other equation, and solve the resulting one-variable equation. Substitution is the natural choice when a variable already has a coefficient of 1 or .
Example: and
- The first equation already gives . Substitute it into the second: .
- Simplify: , so and .
- Back-substitute into : .
- Check both equations: and . The solution is .
Always put brackets around the expression you substitute. Writing happens to work here, but substituting into requires , and the bracket changes the sign of the .
Method 3: elimination
Add or subtract multiples of the equations so that one variable cancels. Elimination is usually fastest when both equations are in standard form .
Example: and
- The coefficients are already opposites, so add the equations: , giving .
- Substitute into the first equation: , so .
- Check the second equation: . The solution is .
When no coefficients match, multiply one or both equations first so that they do.
Example: and
- To eliminate , multiply the first equation by 5 and the second by 2: and .
- Add: , so .
- Substitute: , so and .
- Check: . The solution is .
Spotting no solution or infinitely many
If both variables cancel during elimination, look at what remains.
- and . Doubling the first gives ; subtracting leaves , which is false. The lines are parallel: no solution.
- and . Tripling the first gives exactly the second; subtracting leaves . Every point on the line is a solution.
Before you start, you can predict this from the coefficients: if , the lines have equal slopes and the system has either no solution or infinitely many.
Cramer's rule with determinants
For a two-by-two system, determinants give each unknown directly:
For and : , and . So and , matching elimination. If the rule does not apply, which is exactly the parallel or identical case. The guide to determinants explains how to compute them for larger systems.
Three equations in three unknowns
The strategy is the same: eliminate one variable from two different pairs of equations to get a two-by-two system, solve it, then back-substitute.
Example: , ,
- Subtract the second equation from the first: , so .
- Substitute into the first and third: and .
- Add these two: , so , and then .
- Check all three: , , . The solution is .
Larger systems are usually solved with matrices and row reduction; the matrix calculator shows the same process.
A word problem
A theatre sold 40 tickets for 375 dollars. Adult tickets cost 12 dollars and child tickets 7 dollars. How many of each were sold?
- Let be adult tickets and child tickets. Count: . Money: .
- Substitute : , so .
- Solve: , , and .
- Check: and .
Two unknowns need two independent facts. If a problem gives you only one, it cannot have a unique answer.
Choosing a method and avoiding errors
- Use substitution when a variable is already isolated or has coefficient 1.
- Use elimination when the equations are in standard form, especially if coefficients already match or are opposites.
- Use Cramer's rule for a quick two-by-two answer, or when you need a formula for each unknown.
- Always check the final pair in both original equations, since an arithmetic slip can produce a point that fits only one of them.
Compare your working with the systems of equations calculator, which shows each elimination or substitution step. If you need a refresher on the single-equation steps used inside every method, see how to solve linear equations.
Which method should you use?
All the methods give the same solution, so choose the one that keeps the arithmetic simplest. Substitution is best when one equation already has a variable on its own, such as , or when a variable has a coefficient of 1 or . Elimination is usually faster when both equations are in standard form and no variable is isolated, because it avoids fractions until the very end.
Graphing is useful for seeing the situation: two lines that cross, two parallel lines, or the same line drawn twice. It is less reliable for exact answers unless the intersection has integer coordinates. Cramer's rule and matrix methods suit systems with three or more variables, and they are what calculators and computer software use internally.
For nonlinear systems, such as a line and a parabola, substitution is almost always the right choice. Solving and gives , so and . The intersection points are and , and both satisfy each equation.
Checking a solution
A solution of a system must satisfy every equation, not just the one you used last. Substitute your values into each original equation. For the second elimination example, gives and , so both equations hold. A value that satisfies one equation but not the other points to an arithmetic slip during elimination.
Write the check on your paper. It costs less than a minute and examiners frequently award credit for a verified answer.
The systems of equations calculator solves two and three variable systems with each step shown, which is a convenient way to compare your working.
Frequently asked questions
Do substitution and elimination always give the same answer?
Yes. They are different routes to the same solution set. If they disagree, there is an arithmetic error in one of them, and checking in the original equations will find it.
How many solutions can a linear system have?
Exactly one, none, or infinitely many. A linear system can never have exactly two solutions, because two distinct lines meet at most once.
What does 0 = 0 mean in elimination?
It means one equation is a multiple of the other, so they describe the same line and there are infinitely many solutions. Write the answer as the set of points satisfying either equation.
Can I use elimination with three variables?
Yes. Eliminate the same variable from two different pairs of equations to reduce the problem to two equations in two unknowns, then continue as usual.
How do I know if a system has infinitely many solutions?
If elimination or substitution reduces the system to a statement that is always true, such as , the equations describe the same line and every point on it is a solution. If you reach a false statement, such as , the lines are parallel and there is no solution.
Can a system have exactly two solutions?
A system of two linear equations cannot: it has zero, one or infinitely many solutions. Nonlinear systems can, as the line and parabola example in this guide shows with its two intersection points.