Part 16 of 20 · EquationsSee the whole course

How to solve a system by substitution

Short answer

Use one equation to say what a variable equals, substitute that into the other equation, solve for the one variable that is left, then put the answer back to find the other.

When substitution is the right tool

Graphing shows you the crossing, but only exactly when it lands on a grid point. Substitution gives the exact answer every time. It works best when one equation already has y (or x) on its own, like y = 3x.

The method in five steps

  1. Pick the equation with a variable alone, such as y = 3x.
  2. Substitute. In the other equation, replace that variable with its expression. Use brackets if the expression has more than one term.
  3. Solve the new equation. It has only x in it, so it is one you can solve (see how to solve a linear equation).
  4. Put x back into an equation to find y.
  5. Check the pair (x, y) in both equations.

Example 1: y = 3x and x + y = 8

The first equation says y = 3x, so replace y in the second:
x + 3x = 8
4x = 8
x = 2

Put x = 2 back into y = 3x:
y = 3(2) = 6

The solution is (2, 6). Check: 2 + 6 = 8 ✓ and 6 = 3(2) ✓

Step through this and two more systems below. The graph fills in as you go: first x appears as a vertical line, then y gives the crossing point.

y = 3x, x + y = 8
  1. y = 3x and x + y = 8
One equation already says y = 3x. Replace y with that in the other equation.

Example 2: y = 2x − 2 and x + y = 7

Replace y with (2x − 2) in the second equation:
x + (2x − 2) = 7
3x − 2 = 7
3x = 9, so x = 3
y = 2(3) − 2 = 4
The solution is (3, 4). Check: 3 + 4 = 7 ✓

Example 3: y = x − 1 and 2x + y = 11

Replace y with (x − 1):
2x + (x − 1) = 11
3x − 1 = 11
3x = 12, so x = 4
y = 4 − 1 = 3
The solution is (4, 3). Check: 2(4) + 3 = 11 ✓

When graphing falls short

Take y = 2x − 2 and y = 1. The lines cross between grid points, so reading the graph only gives an estimate. Substitution is exact: 1 = 2x − 2, so 2x = 3 and x = 3/2. The solution is (3/2, 1).

Watch it explained in under a minute

The same idea, narrated step by step. Square version for sharing: download the 1:1 video.

The four mistakes to avoid

Try it yourself

Tap a question to see the answer.

1. y = 2x and x + y = 9

x + 2x = 9, so 3x = 9 and x = 3. Then y = 2(3) = 6. The solution is (3, 6).

2. y = x + 4 and 3x + y = 12

3x + (x + 4) = 12, so 4x = 8 and x = 2. Then y = 2 + 4 = 6. The solution is (2, 6).

3. y = 3x − 5 and 2x + y = 10

2x + (3x − 5) = 10, so 5x = 15 and x = 3. Then y = 3(3) − 5 = 4. The solution is (3, 4).

Where this fits in

Substitution gives the exact answer, but what if the lines never meet, or are the same line? Next in this course: no solution or infinitely many solutions.

Quick answers

Questions about this topic

What is the substitution method?

Replace one variable in an equation with an expression taken from the other equation. This leaves one equation with one variable, which you can solve.

When should you use substitution instead of graphing?

Use it when you need an exact answer, or when one equation already has a variable alone, like y = 3x. Graphing only gives an estimate unless the lines cross on a grid point.

What do you do after you find x?

Put x back into either equation to find y. The solution is the pair (x, y), so you are not finished until you have both.

Does it matter which equation you substitute into?

You must substitute into the other equation, not the one the expression came from. Once you have x, you can use either equation to find y, so pick the easier one.

Keep going

Learn it by playing

Pip: Math Adventure is a math game for iPhone where functions, lines, equations and calculus are puzzles you solve by playing. It is coming soon to the App Store.

Join the list and we will tell you the day Pip is out.