Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 37 ยท Systems of Equations

Solving Systems by Substitution

Learn the substitution method for solving systems of linear equations: isolate a variable, substitute, solve, back-substitute and check the answer.

Graphing can only estimate a solution. Substitution gives exact answers. The idea: if one equation tells you what y is equal to, replace y in the other equation by that expression. That leaves one equation with one variable, which you already know how to solve.

The steps

  1. Isolate one variable in one equation (pick the one that is easiest, ideally with coefficient 1).
  2. Substitute that expression into the other equation.
  3. Solve the resulting one-variable equation.
  4. Substitute the value back to find the other variable.
  5. Check in both original equations.

When a variable is already isolated

Example 1. Solve:

Text
y = 2x + 1
3x + y = 11
  • Replace y in the second equation by 2x + 1: 3x + (2x + 1) = 11
  • Combine: 5x + 1 = 11, so 5x = 10 and x = 2
  • Back-substitute: y = 2(2) + 1 = 5
  • Solution: (2, 5)
  • Check the second equation: 3(2) + 5 = 11. True.

When you must isolate first

Example 2. Solve:

Text
x + 2y = 8
3x - y = 3

In the first equation, x has coefficient 1: x = 8 - 2y. In the second equation, y has coefficient -1, so y = 3x - 3 is also easy. Use the first one.

  • Substitute: 3(8 - 2y) - y = 3
  • Expand: 24 - 6y - y = 3, so 24 - 7y = 3
  • Solve: -7y = -21, so y = 3
  • Back-substitute: x = 8 - 2(3) = 2
  • Solution: (2, 3)
  • Check: 2 + 2(3) = 8 and 3(2) - 3 = 3. Both true.

Use brackets when you substitute an expression: 3(8 - 2y), not 3 ยท 8 - 2y. Forgetting them is the most common error.

Special cases

No solution. y = 2x + 3 and 4x - 2y = 10. Substitute: 4x - 2(2x + 3) = 10 gives 4x - 4x - 6 = 10, so -6 = 10. A false statement: no solution (parallel lines).

Infinitely many solutions. y = 2x + 3 and 6x - 3y = -9. Substitute: 6x - 3(2x + 3) = -9 gives 6x - 6x - 9 = -9, so -9 = -9. Always true: infinitely many solutions (same line).

This echoes what happened with single equations when the variable vanished (see variables on both sides).

Python Substitution step by step

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The code does exactly the algebra of the steps: it replaces y by mx + b, collects the x terms, and solves.

A word problem

A school sells tickets: adult tickets cost 8 dollars and student tickets cost 5 dollars. A total of 120 tickets bring in 750 dollars. How many of each? Let a be adult tickets and s student tickets.

Text
a + s = 120
8a + 5s = 750

From the first, a = 120 - s. Substitute: 8(120 - s) + 5s = 750. Expand: 960 - 8s + 5s = 750, so -3s = -210 and s = 70. Then a = 50. Check: 50 + 70 = 120; 8(50) + 5(70) = 400 + 350 = 750.

Python Check the ticket answer by brute force

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  1. Substituting into the same equation you took the expression from. That always gives a true statement like 5 = 5 and no information.
  2. Dropping brackets around the substituted expression.
  3. Stopping after finding one variable. Find both and report an ordered pair.
  4. Not checking in both original equations.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Solve y = x + 3 and 2x + y = 12. What is x?

    2x + (x + 3) = 12 gives 3x = 9, so x = 3 (and y = 6).
  2. 2. In x + y = 10 and 2x - y = 5, which first step is easiest for substitution?

    Both x and y have coefficient 1 in the first equation, so isolating one is easy.
  3. 3. Substituting into a system gives 0 = 7. What does this mean?

    A false statement means the lines are parallel.
  4. 4. Substituting into a system gives 5 = 5. What does this mean?

    A true statement for all x means the equations describe the same line.

Summary

  • Isolate a variable in one equation and substitute it into the other.
  • Solve for one variable, back-substitute for the other, and check both equations.
  • Use brackets when substituting an expression.
  • A false result means no solution; a true result means infinitely many.

Next: Systems by Elimination