Linear Models and Word Problems
Build linear equations from words and data, interpret slope and y-intercept in context, and know when a linear prediction can and cannot be trusted.
Welcome back!
Step 1 of 12Learn
From words to y = mx + b
Most linear word problems hide two numbers: a starting value and a constant rate. Find them and the equation writes itself.
A swimming pool holds 2,000 gallons and drains at 75 gallons per hour. The starting value is 2,000 and the rate is −75 (negative because the water decreases), so
V = −75t + 2,000
where V is the volume in gallons and t the time in hours. The pool is empty when V = 0: 75t = 2,000, so t ≈ 26.7 hours.
Clue words help:
- "per," "each," "every," "for each" signal the rate (the slope).
- "initial," "fixed fee," "starting," "flat," "already has" signal the starting value (the y-intercept).
Also think about the domain, the inputs that make sense. Time cannot be negative, and the pool model stops working after 26.7 hours because the volume cannot go below zero. A good model comes with its limits.
Step 2 of 12Practice · Chart
Pool draining: y = 2,000 − 75t
Start at 2,000 gallons, lose 75 every hour. The line hits 0 at about 26.7 hours.
Tap the first time shown when less than 1,000 gallons are left.
Tap the point that answers the question, then press Check.
| Hours | Gallons left |
|---|---|
| 0 h | 2,000 gal |
| 4 h | 1,700 gal |
| 8 h | 1,400 gal |
| 12 h | 1,100 gal |
| 16 h | 800 gal |
| 20 h | 500 gal |
| 24 h | 200 gal |
Step 3 of 12Practice · Match the pairs
Match each situation with its equation.
Tap an answer, then tap the place where it belongs (or drag it there).
- A taxi charges $3 plus $2 per mile
- A candle is 20 cm tall and burns 2 cm per hour
- You earn $3 for each dog you walk
- A gift card starts at $50 and you spend $3 per day
Step 4 of 12Practice · Work it out
A water tank holds 1,800 gallons and drains at a steady 60 gallons per hour. After how many hours is it empty?
Step 5 of 12Learn
Building a model from two data points
Sometimes you only get data. An electrician charges $140 for a 2-hour job and $260 for a 5-hour job, and the charge is linear in the hours worked.
- Slope from the two points (2, 140) and (5, 260): (260 − 140)/(5 − 2) = 120/3 = 40 dollars per hour.
- Intercept: 140 = 40(2) + b, so b = 60.
- Model: C = 40h + 60.
Now interpret each number in context. The slope says each extra hour costs $40. The y-intercept says that a 0-hour job still costs $60, which is a call-out fee for showing up.
The model makes predictions. A 3.5-hour job should cost 40(3.5) + 60 = $200. Going backward, a $380 bill means 40h + 60 = 380, so h = 8 hours.
The calculator below repeats these steps for any two data points, so you can test your own examples.
Step 6 of 12Try the calculator
Line through two data points
Enter two points and an x-value to predict. The calculator finds the slope, the y-intercept and the prediction.
- Slope m
- 40
- y-intercept b
- 60
- Predicted y
- 200
Step 7 of 12Practice · Work it out
A taxi charges $3.50 to start plus $2.25 per mile. How much does an 8-mile ride cost in dollars?
Step 8 of 12Learn
Trends, predictions and their limits
Real data rarely falls exactly on a line. Plot it as a scatter plot, and if the points roughly follow a straight path, draw a line of best fit through the middle of them. Its slope and intercept summarize the trend.
Predicting inside the range of your data is called interpolation, and it is usually reasonable. Predicting outside that range is extrapolation, and it can go badly wrong.
A child grows about 6 cm per year between ages 4 and 10, from about 102 cm to about 138 cm. A linear model, height = 6 × age + 78, fits that range well. Extrapolate to age 40 and it predicts 318 cm, over 10 feet tall. Growth slows and stops, so the line stops being a good model.
The same caution applies to sales, prices, temperatures and populations. A line describes a constant rate. Before trusting a prediction far outside your data, ask whether that rate can really stay constant that long.
Step 9 of 12Practice · Chart
A growth model, stretched too far
The line height = 6 × age + 78 fits ages 4 to 10 well. Past the data, real growth slows and stops while the line keeps climbing.
Tap the age where the model is furthest from reality.
Tap the point that answers the question, then press Check.
| Age (years) | Linear model | Typical real height |
|---|---|---|
| 4 | 102 cm | 102 cm |
| 6 | 114 cm | 115 cm |
| 8 | 126 cm | 128 cm |
| 10 | 138 cm | 138 cm |
| 14 | 162 cm | 160 cm |
| 18 | 186 cm | 172 cm |
| 25 | 228 cm | 174 cm |
| 40 | 318 cm | 174 cm |
Step 10 of 12Note
Step 11 of 12Practice · What would you do?
What would you do?
A model for the value of a used laptop is V = −150t + 900, where t is its age in years. What does the 900 mean?
Step 12 of 12Practice · Choose one
For an electrician, the cost model is C = 40h + 60, where h is hours worked. What does the slope 40 mean?
Lesson complete!