Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 37 ยท Linear Equations

Two-Step Equations

Solve two-step equations by undoing addition or subtraction first, then multiplication or division, with worked examples, word problems and code checks.

Many equations need more than one inverse operation. Take 3x + 4 = 19. The variable is first multiplied by 3 and then 4 is added. To solve it, we undo those operations in the reverse order.

Think of getting dressed: socks first, then shoes. To undo it, you remove shoes first, then socks. In an equation, the last operation applied to x is the first one you undo.

The method

  1. Undo addition or subtraction (move the constant term).
  2. Undo multiplication or division (deal with the coefficient).
  3. Check in the original equation.

Example 1. Solve 3x + 4 = 19.

  • Subtract 4 from both sides: 3x = 15
  • Divide both sides by 3: x = 5
  • Check: 3(5) + 4 = 19. Correct.

Example 2. Solve 2y - 7 = 11.

  • Add 7: 2y = 18
  • Divide by 2: y = 9

Example 3. Solve -5n + 8 = -12.

  • Subtract 8: -5n = -20
  • Divide by -5: n = 4

Example 4. Solve x / 3 - 2 = 6.

  • Add 2: x / 3 = 8
  • Multiply by 3: x = 24

Equations with fractions

Example 5. Solve (2/5)x + 1 = 7.

  • Subtract 1: (2/5)x = 6
  • Multiply by the reciprocal 5/2: x = 6 ร— 5/2 = 15

You can also clear the fraction at the start. Multiply every term by 5: 2x + 5 = 35. Then 2x = 30 and x = 15. The same answer by a different route.

When you multiply both sides to clear a fraction, multiply every term, including the ones without fractions.

The "undo" flowchart

flowchart LR
    A["x"] -->|"multiply by 3"| B["3x"]
    B -->|"add 4"| C["3x + 4 = 19"]
    C -->|"subtract 4"| D["3x = 15"]
    D -->|"divide by 3"| E["x = 5"]

Build the expression left to right, then undo it in reverse order.

Python Undo the steps in reverse order

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.

Word problems

A taxi. A taxi charges 3 dollars plus 2 dollars per kilometer. A trip costs 21 dollars. How far did it go?

Let d be the distance in km. The equation is 3 + 2d = 21. Subtract 3: 2d = 18. Divide by 2: d = 9 km.

Saving money. Lena has 40 dollars and saves 12 dollars each week. After how many weeks w will she have 148 dollars? 40 + 12w = 148, so 12w = 108 and w = 9.

Python Model a word problem and find the answer

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. Dividing before moving the constant. In 3x + 4 = 19, dividing by 3 first requires dividing every term: x + 4/3 = 19/3. It works but is messy. Moving the constant first is simpler.
  2. Not carrying the sign. In 2y - 7 = 11, the term is -7, so you add 7.
  3. Dividing only part of one side. If you divide 3x = 15 by 3, you get x = 5, but for 3x + 6 = 15 you cannot divide just 3x.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Solve 4x + 3 = 27.

    Subtract 3 to get 4x = 24, then divide by 4: x = 6.
  2. 2. Solve 5 - 2n = 1.

    Subtract 5: -2n = -4. Divide by -2: n = 2.
  3. 3. Solve x / 4 + 3 = 8.

    Subtract 3 to get x/4 = 5, then multiply by 4: x = 20.
  4. 4. A plan costs 10 dollars plus 4 dollars per hour, h. The total is 46 dollars. Which equation fits, and what is h?

    10 + 4h = 46 gives 4h = 36 and h = 9.

Summary

  • Undo operations in reverse order: first add or subtract, then multiply or divide.
  • Treat every side as a whole and do the same step to both.
  • A fraction coefficient can be undone with its reciprocal.
  • Check by substituting back into the original equation.

Next: Variables on Both Sides