Systems of Equations: Substitution, Elimination and Graphing

System of equations y = x + 1 and y = -x + 5 graphed: the lines cross at the solution (2, 3)

A system of equations is two or more equations with the same unknowns, and its solution is the values that make every equation true at once. You can solve a system by graphing, substitution or elimination. For x + y = 10 and x − y = 2, adding the equations gives 2x = 12, so x = 6 and y = 4.

In short: Graphing: find where the lines cross. Substitution: solve one equation for a letter and put it into the other. Elimination: add or subtract the equations to cancel a letter. Always check the answer in both equations.

In this guide
  1. What a system is
  2. Graphing method
  3. Substitution method
  4. Elimination method
  5. Which method to use
  6. No solution or infinitely many
  7. Word problems
  8. Common mistakes
  9. Practice problems
  10. FAQ

What Is a System of Equations?

A system of two linear equations describes two straight lines. The solution is the point where they meet, written as an ordered pair (x, y). A system can have one solution, no solution or infinitely many.

System of equations y = x + 1 and y = -x + 5 graphed: the lines cross at the solution (2, 3)
The lines y = x + 1 and y = −x + 5 cross at (2, 3), the solution of the system.

Method 1: Graphing

  1. Write each equation as y = mx + b.
  2. Graph both lines.
  3. Read the point where they cross, then check it.

Example: y = x + 1 and y = −x + 5 cross at (2, 3). Check: 3 = 2 + 1 ✓ and 3 = −2 + 5 ✓.

Graphing shows the idea clearly but is hard to read when the answer is a fraction. See the slope-intercept form guide for graphing lines.

Method 2: Substitution

  1. Solve one equation for x or y (pick the easiest).
  2. Substitute that expression into the other equation.
  3. Solve for the remaining letter.
  4. Put the value back to find the other letter.

Example: y = 2x − 3 and 3x + y = 12. Substitute: 3x + (2x − 3) = 12, so 5x = 15 and x = 3. Then y = 2(3) − 3 = 3. Solution: (3, 3).

Method 3: Elimination (Addition)

  1. Line up x, y and the numbers.
  2. If needed, multiply one or both equations so a letter has opposite (or equal) coefficients.
  3. Add or subtract the equations to cancel that letter.
  4. Solve, then substitute back.

Example: 2x + 3y = 12 and 4x − 3y = 6. Add them: 6x = 18, so x = 3. Then 2(3) + 3y = 12, so y = 2. Solution: (3, 2).

Example: 3x + 2y = 16 and x + 4y = 22. Multiply the first by 2: 6x + 4y = 32. Subtract the second: 5x = 10, so x = 2. Then 2 + 4y = 22, so y = 5. Solution: (2, 5).

Which Method Should You Use?

If the system looks like…Use
One equation already says y = … or x = …Substitution
A letter has opposite or equal coefficientsElimination
You need a picture, or the answer is whole numbersGraphing
Coefficients are all differentElimination after multiplying

No Solution or Infinitely Many Solutions

  • No solution: the lines are parallel. y = 2x + 1 and y = 2x − 3 have the same slope, and solving gives a false statement such as 0 = 4.
  • Infinitely many solutions: both equations are the same line. 2x + 4y = 8 is x + 2y = 4 multiplied by 2, and solving gives 0 = 0.

Word Problems

Example: Tickets. 20 tickets were sold for $130. Adult tickets cost $8 and child tickets $5. Let a and c be the numbers sold: a + c = 20 and 8a + 5c = 130. Substitute c = 20 − a: 8a + 100 − 5a = 130, so 3a = 30 and a = 10. That is 10 adult and 10 child tickets.

Example: Two numbers. Two numbers add to 25 and differ by 7. x + y = 25 and x − y = 7. Adding gives 2x = 32, so the numbers are 16 and 9.

Try it

Check each step of a system by solving one equation for y with the solve for x calculator, such as 2x + 3y = 12.

Open the solve for x calculator

Common Mistakes

  • Stopping after one letter. The answer needs both x and y.
  • Multiplying only one side. Multiply every term of the equation, including the number on the right.
  • Sign errors when subtracting equations. Subtract every term, or multiply by −1 and add instead.
  • Not checking. Put the answer into both original equations.

Practice Problems (With Answers)

1. x + y = 7 and x − y = 3

Add: 2x = 10, so x = 5 and y = 2. (5, 2).

2. y = 3x + 1 and 2x + y = 11

2x + 3x + 1 = 11, so x = 2 and y = 7. (2, 7).

3. 2x + y = 7 and 3x − y = 13

Add: 5x = 20, so x = 4 and y = −1. (4, −1).

4. 2x + 3y = 18 and 5x − 2y = 7

Multiply by 2 and 3: 4x + 6y = 36 and 15x − 6y = 21. Add: 19x = 57, so x = 3 and y = 4. (3, 4).

5. 30 coins of $2 and $5 make $114. How many of each?

x + y = 30 and 2x + 5y = 114. Then 2(30 − y) + 5y = 114, so 3y = 54: 18 five-dollar coins and 12 two-dollar coins.

When the equals sign becomes <, >, ≤ or ≥, the answer is a range. See linear inequalities for the steps and graphs.

FAQ

What is a system of equations?

Two or more equations with the same unknowns. The solution is the set of values that makes all of them true, such as x = 6 and y = 4 for x + y = 10 and x − y = 2.

What is the difference between substitution and elimination?

Substitution replaces one letter with an expression from the other equation. Elimination adds or subtracts the equations to cancel a letter.

How do you know if a system has no solution?

Solving gives a false statement such as 0 = 4, or the lines have the same slope but different y-intercepts.

Can a system have infinitely many solutions?

Yes, when both equations describe the same line. Solving gives a true statement such as 0 = 0.

How do you check the solution of a system?

Substitute the x and y values into both original equations. Both must be true.

Sources and Further Reading

Related: slope-intercept form, how to solve for x, algebra basics, the math glossary and all free math calculators.

Check your working in seconds

Type any problem from this guide into the free CalcSolver calculator and see the answer, with fractions, instantly.