Part 12 of 20 · LinesSee the whole course

How to solve linear equation word problems

Short answer

The rate (per visit, per kilometer, per hour) is the slope m. The starting amount (a joining fee, a base fare) is b. Write y = mx + b, then put a number in for x, or solve for x when you know the total.

Turn the story into y = mx + b

Every linear word problem hides the same two numbers. Find them and the equation writes itself:

  1. Say what x and y are. x is what you count (visits, kilometers), y is the total that results (the cost).
  2. Find the rate. Words like “per”, “each” and “every” point at it. This is m, the slope.
  3. Find the start. It is paid or counted once, before anything happens. This is b.
  4. Write y = mx + b. Then read the question: do you know x, or do you know y?

That last step is the whole game. If you are given x, you put it in. If you are given the total y, you solve for x, exactly as in solving a linear equation.

Example 1: the gym

A gym costs 20 to join and 5 per visit. The 5 is paid every time, so m = 5. The 20 is paid once, so b = 20.

y = 5x + 20

How much after 6 visits? Put 6 in for x.
y = 5(6) + 20 = 30 + 20 = 50

How many visits for 70? Put 70 in for y and solve.
5x + 20 = 70
5x = 50
x = 10 visits

Example 2: the taxi

A taxi charges a fare of 3, plus 2 for every kilometer. So m = 2 and b = 3, and y = 2x + 3.

A 7 km ride: y = 2(7) + 3 = 17
25 in your pocket: 2x + 3 = 25, so 2x = 22 and x = 11 km

Try both stories below. Switch between “Find the cost” and “Work backwards” and watch the same line answer both questions.

y = 5(6) + 20 = 50
A gym costs 20 to join and 5 per visit. 6 visits cost 5(6) + 20 = 50.

Check the answer in the story

A word problem is not finished until the answer makes sense. Ten visits cost 5(10) + 20 = 70, which is exactly the money you had. An answer like 10.4 visits, or a negative number of kilometers, tells you to look again.

When the rate goes down

Not every story climbs. A candle that is 20 cm tall and burns 2 cm every hour has a negative slope: y = −2x + 20. Here b is the height you start at, and the candle is gone when y = 0.

Watch it explained in under a minute

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

The five mistakes to avoid

Try it yourself

Write the equation first, then answer. Tap a question to see the answer.

1. A pool costs 12 to join and 3 per swim. What is the cost after 8 swims, and how many swims can you afford with 30?

y = 3x + 12. After 8 swims: 3(8) + 12 = 36. For 30: 3x + 12 = 30, so 3x = 18 and x = 6 swims.

2. A candle is 20 cm tall and burns 2 cm every hour. How tall is it after 5 hours, and when does it burn out?

y = −2x + 20. After 5 hours: −2(5) + 20 = 10 cm. It is gone when y = 0: 0 = −2x + 20, so x = 10 hours.

3. A plant is 10 cm tall and grows 3 cm every week. When is it 25 cm tall?

y = 3x + 10. Set y = 25: 3x + 10 = 25, so 3x = 15 and x = 5 weeks.

Where word problems fit in

A story gives you the slope and b in plain words, which is why slope-intercept form is so useful. Next in this course: parallel and perpendicular lines.

Quick answers

Questions about this topic

How do you write a linear equation from a word problem?

Find the rate (the amount per visit, per kilometer or per hour) and call it m. Find the starting amount that is paid once and call it b. Then write y = mx + b.

How do you know which number is the slope?

The slope is the number that happens again and again: words like per, each and every point to it. The starting number happens once, before anything else, and is b.

What do x and y stand for in a word problem?

x is what you count or choose, such as visits or kilometers. y is the total that results, such as the cost. Write down what each means before you start.

What if the amount goes down instead of up?

Use a negative slope. A candle that burns 2 cm every hour has m = −2, so its height is y = −2x + 20 if it starts at 20 cm.

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.