High school

How to solve systems of equations by substitution

· 3 min read

Quick answerSolve one equation for one variable, substitute that expression into the other equation, solve the equation you get, then put the value back to find the second variable. For y = 2x + 1 and 3x + y = 11: 3x + (2x + 1) = 11 gives x = 2, then y = 5.

A system of equations is two equations that must be true at the same time. Substitution works by using one equation to replace a variable in the other, so you are left with one equation and one unknown.

The four steps

  1. Isolate one variable in one of the equations (pick the easiest).
  2. Substitute that expression into the other equation.
  3. Solve the one-variable equation.
  4. Go back and find the other variable. Check in both equations.

Example 1: one variable is already isolated

y=2x+1y = 2x + 1 3x+y=113x + y = 11

The first equation already says what yy is. Replace yy in the second equation:

3x+(2x+1)=113x + (2x + 1) = 11 5x+1=115x + 1 = 11 5x=10⇒x=25x = 10 \quad \Rightarrow \quad x = 2

Now go back: y=2(2)+1=5y = 2(2) + 1 = 5.

The solution is (2,5)(2, 5).

Check in the second equation: 3(2)+5=113(2) + 5 = 11 ✓

Example 2: isolate a variable first

x+y=10x + y = 10 2x−y=22x - y = 2

From the first equation, y=10−xy = 10 - x. Substitute into the second:

2x−(10−x)=22x - (10 - x) = 2

Be careful with the minus sign in front of the bracket:

2x−10+x=22x - 10 + x = 2 3x=12⇒x=43x = 12 \quad \Rightarrow \quad x = 4

Then y=10−4=6y = 10 - 4 = 6. The solution is (4,6)(4, 6).

Check: 4+6=104 + 6 = 10 ✓ and 2(4)−6=22(4) - 6 = 2 ✓

Example 3: no solution

y=2x+3y = 2x + 3 4x−2y=14x - 2y = 1

Substitute:

4x−2(2x+3)=14x - 2(2x + 3) = 1 4x−4x−6=14x - 4x - 6 = 1 −6=1-6 = 1

That is never true, so the system has no solution. The two lines are parallel and never meet.

If the variables disappear and you get something always true, such as 12=1212 = 12, the two equations describe the same line and there are infinitely many solutions.

Which variable should you isolate?

Pick the one with a coefficient of 1 or −1, because it avoids fractions. In 2x+y=72x + y = 7, isolating yy gives y=7−2xy = 7 - 2x. Isolating xx would give x=7−y2x = \tfrac{7 - y}{2}, which is more work.

Common mistakes

  • Substituting into the same equation you used to isolate the variable. You will get something like 0=00 = 0 and learn nothing.
  • Forgetting the brackets. 2x−(10−x)2x - (10 - x) is not 2x−10−x2x - 10 - x.
  • Stopping after one variable. A solution needs both xx and yy.
  • Checking in only one equation. A wrong answer can satisfy one of them.

Practice problems

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

Answer

2x+(x+2)=112x + (x + 2) = 11, so 3x=93x = 9 and x=3x = 3. Then y=5y = 5. Solution: (3,5)(3, 5).

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

Answer

3y+y=123y + y = 12, so y=3y = 3 and x=9x = 9. Solution: (9,3)(9, 3).

3. 2x+y=72x + y = 7 and x−y=2x - y = 2

Answer

From the second equation, x=y+2x = y + 2. Then 2(y+2)+y=72(y + 2) + y = 7, so 3y=33y = 3 and y=1y = 1, x=3x = 3. Solution: (3,1)(3, 1).

4. y=−x+4y = -x + 4 and 3x+3y=123x + 3y = 12

Answer

3x+3(−x+4)=123x + 3(-x + 4) = 12 gives 12=1212 = 12, which is always true. The equations are the same line: infinitely many solutions.

More on algebra