math.wiki
Functions › Linear functions › Linear functions in context
Open on the map
Algebra 1 · 8.F.B.4 · F.BF.A.1

Linear functions in context

A situation changes by the same amount at every step. How do you turn its description into a function, and what do the two numbers in that function say about the situation?

Where you are 5 in Linear functions

When you reach for it

A situation rarely arrives as a rule. It arrives as a price list, a pair of measurements, a table, a graph or a sentence. When one quantity changes by the same amount for every equal step in another, it is described by a linear function,

f(x) = mx + b

and the whole description boils down to two numbers: the starting value b = f(0), the output when the input is 0, and the rate of change m, the change in output for each one unit of input. Building the function means finding those two numbers; using it means saying, in the words and units of the situation, what each number and each output stands for.

Reading the two numbers off a picture is taught in Reading a linear function from its graph, and turning a story into a model and judging its fit in Modeling with linear relationships. This lesson works from any mix of descriptions, then asks what happens when a number changes. It takes two days. Day 1 (Examples 1 to 4) builds the function from words, from two input-output pairs, from a table and from a graph. Day 2 (Examples 5 and 6) changes the numbers, compares two functions, and reads values and limits.

The procedure

Day 1: building the function and naming its numbers

Which quantity is the input. The output is the quantity that depends on the other. A cost depends on how many days a car is hired, so days are the input and cost the output. “A as a function of B” makes B the input, and a rate “per seat” or “per hour” names the input in its second half. A question that runs backwards, such as “how long until the tank is empty?”, does not swap them: it becomes an equation to solve, f(x) = 0, as in Function notation in a real situation.

Units come with the numbers. The starting value is an output, so it carries the output’s units: dollars, liters, meters. The rate is a change in output divided by a change in input, so it carries output units per input unit: dollars per day, liters per hour. A negative rate means the output goes down as the input goes up, and its size is how much is lost per unit.

From words. A description that names a fixed amount and an amount per unit hands over b and m directly. Two charges per unit on the same input add into one rate, because each unit of input brings both of them.

From two input-output pairs. Two pairs (x_1, y_1) and (x_2, y_2) give the rate as

m = \frac{y_2 - y_1}{x_2 - x_1}

as in The slope formula and the four kinds of slope. The starting value comes from walking back to input 0. The pair (x_1, y_1) satisfies y_1 = mx_1 + b, so

b = y_1 - mx_1

which says: from input x_1 back to input 0 is x_1 steps, and each step back undoes a change of m.

From a table. A table is a list of pairs. First check that it is linear at all: between every two neighboring rows, the change in output divided by the change in input must come out the same (Average rate of change from a table or graph works with tables where it does not). If the input goes up in steps of 3, the change between rows is the change for 3 units and must be divided by 3. If there is no row for input 0, walk back as above.

From a graph. The starting value is where the line meets the vertical axis, provided the horizontal axis starts at 0; the rate comes from two grid corners, read in the axes’ units.

Checking. A rule built from two pieces of information always fits those two, so test it on a third row, point or fact.

Day 2: changing the numbers, comparing, and reading values

Changing the starting value. If b rises by k, every output rises by k, whatever the input. The graph moves straight up and stays parallel to the old one.

Changing the rate. If m changes by k, the output at input x changes by kx, so the effect grows with the input. The point (0, b) stays put and the line pivots about it. Doubling the rate doubles the change from the start, mx, but not the output, because b is not doubled.

Comparing two functions by their numbers. Two linear functions f(x) = m_1x + b_1 and g(x) = m_2x + b_2 in the same situation can be compared without drawing either. The starting values say which is ahead at input 0, and by how much; the rates say which gains faster, and by how much each unit. If the one that starts behind has the larger rate, the gap closes by the difference in rates every unit, so it is gone after

\frac{\text{starting gap}}{\text{difference in rates}}

units of input, which is the solution of f(x) = g(x). If the rates are equal, the gap never changes and the two never meet. Comparing functions given in different forms is Comparing linear functions given different ways.

What a value means. A statement such as f(6) = 295 means one sentence naming both numbers with units: “a 6 day hire costs 295 dollars”. The equation f(x) = k asks which input gives that output.

Where the model stops. A linear function gives an output for every number; the situation does not. Days of hire come in whole numbers, a tank cannot hold less than nothing, a climb ends at the summit. The inputs that make sense form the model’s domain (A reasonable domain for a real situation), and even the starting value may lie outside it, as in Example 6.

Worked examples

Example 1

Day 1: a car hire, from words

Kasimira hires a car. The firm charges 34 dollars a day for the car and 11 dollars a day for insurance, plus a single cleaning fee of 25 dollars for the whole hire. Say which quantity is the input and which the output, write the cost C(d) of a hire lasting d days, and say what each number in the rule means. Find C(4), and say what C(7) = 340 means.

Solution

The cost depends on the number of days, so the input is d, in days, and the output is C(d), in dollars.

Each day brings two charges, so each extra day adds 34 + 11 = 45 dollars: the rate is 45 dollars per day. The cleaning fee is paid once, however long the hire, so it does not grow with d: the starting value is 25 dollars. The rule is

C(d) = 45d + 25

Nobody hires a car for 0 days, so C(0) = 25 is not the price of any real hire; it is the fixed part of every price.

A 4 day hire costs C(4) = 45(4) + 25 = 180 + 25 = 205 dollars. The statement C(7) = 340 says that a 7 day hire costs 340 dollars. Check: 45(7) + 25 = 315 + 25 = 340.

Example 2

Day 1: a theater’s profit, from two pairs

Mattea runs a small theater. Every ticket costs the same, and every show has the same fixed costs for actors, lights and the hall. One show sold 120 seats and made a profit of 1{,}080 dollars; another sold 200 seats and made 3{,}000 dollars. Assuming the profit P(s) is a linear function of the number of seats sold s, write P(s), say what both numbers mean, and find how many seats must be sold for the show not to lose money.

Solution

Seats are the input and profit, in dollars, is the output. The two shows give the pairs (120, 1080) and (200, 3000). The rate is

\begin{aligned} m &= \frac{3000 - 1080}{200 - 120} = \frac{1920}{80} \\ &= 24 \text{ dollars per seat} \end{aligned}

Walking back from (120, 1080) to 0 seats undoes 120 steps of 24 dollars:

b = 1080 - 24(120) = 1080 - 2880 = -1800

so

P(s) = 24s - 1800

Check with the other show: 24(200) - 1800 = 4800 - 1800 = 3000.

Each seat sold adds 24 dollars of profit, the price of a ticket. The starting value P(0) = -1800 says that a show with no seats sold loses 1{,}800 dollars, the fixed cost of putting it on. The show breaks even when P(s) = 0: 24s = 1800, so s = 75 seats.

Example 3

Day 1: a water tower, from a table

A town’s water tower is pumped empty for cleaning. Leopold-Jay reads the gauge now and then and writes down the water left W, in liters, t hours after the pump started.

t (hours)W (liters)
245{,}000
537{,}500
830{,}000
1122{,}500

Show that the table fits a linear function, write W(t), say what its numbers mean, and find when the tower is empty.

Solution

Time is the input and the water left is the output. The inputs go up in steps of 3 hours, and between every two neighboring rows the water goes down by 7{,}500 liters. So the rate is the same across the whole table:

\begin{aligned} m &= \frac{-7500 \text{ liters}}{3 \text{ hours}} \\ &= -2500 \text{ liters per hour} \end{aligned}

Dividing by 3 matters: the change between rows is for 3 hours, not for 1. The rate is negative because the water goes down.

The table has no row for t = 0. Walking back the 2 hours from the first row puts back 2 \times 2500 = 5000 liters, so W(0) = 45000 + 5000 = 50000 and the rule is

W(t) = 50000 - 2500t

Check with the last row: 50000 - 2500(11) = 50000 - 27500 = 22500.

The tower held 50{,}000 liters when the pump started, and the pump takes out 2{,}500 liters every hour. It is empty when W(t) = 0: 2500t = 50000, so t = 20 hours.

Example 4

Day 1: a climb, from a graph

Orla leaves a mountain camp and climbs steadily. Figure 1 graphs her altitude A(t), in meters above sea level, t hours after she left camp. Write A(t) and say what its two numbers mean. When does she reach 4{,}150 meters?

0 1 2 3 4 5 6 3200 3400 3600 3800 4000 4200 4400 time since leaving camp (hours) altitude (meters)
Figure 1Orla’s climb in Example 4. Each square is 1 hour across and 100 meters up, and the altitude axis starts at 3{,}200, not at 0.
Solution

The horizontal axis starts at 0, so the starting value is where the line meets the altitude axis: A(0) = 3400 meters. That the altitude axis starts at 3{,}200 only means the bottom of the picture is not sea level. From the corner (0, 3400) to (4, 4000) the time grows by 4 hours and the altitude by 600 meters:

m = \frac{600 \text{ m}}{4 \text{ h}} = 150 \text{ meters per hour}

So

A(t) = 150t + 3400

Check with the corner (2, 3700): 150(2) + 3400 = 3700.

The camp is 3{,}400 meters above sea level, and Orla gains 150 meters every hour. Reaching 4{,}150 meters is the equation A(t) = 4150: 150t = 750, so t = 5 hours.

Example 5

Day 2: what a second pump or a fuller tower does

The water tower from Example 3 has W(t) = 50000 - 2500t. Write the function and find the time to empty in each case, and say how the graph changes.

(a) A second pump, the same as the first, runs alongside it from the start.

(b) Instead, the tower had been filled higher, to 56{,}000 liters, and only the one pump runs.

(c) After 4 hours, compare the water left and the water removed under W and under (a).

0 4 8 12 16 20 24 0 10 20 30 40 50 60 time since pumping started (hours) water left (thousands of liters)
W
W_1
W_2
Figure 2Example 5. Doubling the rate keeps the start and makes the line steeper; raising the start keeps the rate and lifts the whole line.
Solution

(a) Two equal pumps take out 2 \times 2500 = 5000 liters an hour. The rate doubles to -5000 liters per hour and the start does not change:

W_1(t) = 50000 - 5000t

The tower is empty when 5000t = 50000, at t = 10 hours, half the time. In Figure 2 (thousands of liters) the line W_1 starts from the same point as W and falls twice as steeply.

(b) The start rises by 6{,}000 liters and the rate does not change:

W_2(t) = 56000 - 2500t

Every output is 6{,}000 liters more than W’s, at every time, so the line W_2 is W moved up, parallel to it. It is empty when 2500t = 56000, at t = 22.4 hours, which is 22 hours 24 minutes. The extra 6{,}000 liters take \displaystyle \frac{6000}{2500} = 2.4 more hours.

(c) After 4 hours, W(4) = 50000 - 10000 = 40000 liters and W_1(4) = 50000 - 20000 = 30000 liters. The water removed doubled, from 10{,}000 to 20{,}000 liters. The water left did not halve, because the 50{,}000 liters at the start were not doubled. Doubling the rate doubles the change, mt, and nothing else.

Example 6

Day 2: a factory with a start-up, and where the model stops

Phineas runs a tile factory. Each shift lasts 8 hours. For the first 45 minutes the kiln heats up and makes nothing; from then on it makes 180 tiles an hour. Write the number of tiles T(h) made by h hours into the shift, with its domain. What is T(0), and does it describe the factory? What does T(5) say, when has the shift made 900 tiles, and how many does a whole shift make?

Solution

Production starts at h = 0.75, when 0 tiles have been made, and grows by 180 tiles each hour after that. The number of hours of making is h - 0.75, so

\begin{aligned} T(h) &= 180(h - 0.75) = 180h - 135, \\ &\phantom{=}\ 0.75 \le h \le 8 \end{aligned}

The domain comes from the situation, not the rule: the rule describes the factory only from the end of the heat-up to the end of the shift (A reasonable domain for a real situation). Before h = 0.75 the count is 0, which the rule does not give.

So the rule’s starting value, T(0) = -135, is not a number of tiles the factory ever has. It still means something: 135 = 180 \times 0.75 is what the heat-up costs each shift, in tiles.

T(5) = 900 - 135 = 765 says that 5 hours into the shift, 765 tiles have been made. For 900 tiles, 180h - 135 = 900 gives 180h = 1035 and h = 5.75, which is 5 hours 45 minutes in. A whole shift makes T(8) = 1440 - 135 = 1305 tiles. The rule would say T(10) = 1665, but the shift ends at h = 8, so that number describes nothing.

Boundaries

The rate must really be constant. Two pairs always produce a rule, even when the situation is not linear; a third row or a fact from the description is what tests it. When the rate drifts, the situation needs a curve, and Linear and nonlinear functions tells the two apart.

The starting value is the output at input 0, which may not be a value the situation takes. In Example 1 nobody hires a car for 0 days, and in Example 6 the shift has not started producing at h = 0. The number belongs to the rule; whether it describes the situation has to be decided each time.

The rule covers only the inputs the situation allows. Whole numbers of days or seats, times before a tank is empty, hours inside a shift. Outside that domain the rule gives numbers but no meaning, and so does a graph drawn as an unbroken line where only whole numbers make sense, as in Figure 3.

A comparison holds for a range of inputs. Which of two functions is larger can switch where the two are equal, so “the more profitable theater” is an answer for some numbers of seats, never in general.

Where this goes next

Choosing the inputs that make sense is A reasonable domain for a real situation. Saying what each number in a model means, for linear and other families, is Interpreting the numbers in a model. A situation that multiplies by the same factor at each step is exponential, set beside linear in Linear, polynomial and exponential growth compared. When data only roughly follow a line, the rate and the start come from a Line of best fit instead of two exact pairs.

Exercises

Day 1: from words

  1. A car-hire firm charges 52 dollars a day plus a single insurance charge of 30 dollars per hire. Write the cost C(d) of a d day hire, say what each number means with its units, and find C(5).
  2. Another firm charges 29 dollars a day for the car and 7 dollars a day for insurance, with no other fee. Write C(d), give its starting value and say what it means, and find C(9).

Day 1: from two pairs

  1. A factory’s cost for a day’s work is a linear function of the number of chairs it makes that day. A day making 40 chairs costs 2{,}900 dollars and a day making 65 chairs costs 3{,}900 dollars. Write the cost C(n) for n chairs and say what both numbers mean.
  2. A theater sold 90 seats for one show and made a profit of -330 dollars, a loss, and sold 160 seats for another and made 1{,}140 dollars. Assuming the profit is linear in the seats sold, write P(s), say what both numbers mean, and find the fewest seats that avoid a loss.

Day 1: from a table

  1. A rainwater tank is drained by a pump. A table of the water left W, in liters, t hours after the pump started has the rows t = 1: 31{,}200; t = 3: 27{,}600; t = 4: 25{,}800; and t = 7: 20{,}400. Show that the rate is the same between every two neighboring rows, write W(t), and find when the tank is empty.
  2. A climber comes down a mountain at a steady pace. A table of her altitude A, in meters, t hours after she started down has the rows t = 1: 4{,}120; t = 2.5: 3{,}730; and t = 4: 3{,}340. Write A(t), say what its numbers mean, and find when she reaches a camp at 3{,}080 meters.

Day 1: from a graph

Figure 3 graphs a theater’s profit P(s), in dollars, for one show with s seats sold.

0 40 80 120 160 200 −1500 −1000 −500 0 500 1000 1500 2000 2500 seats sold profit (dollars)
Figure 3A theater’s profit for one show, for Exercises 7 and 8.
  1. Find the starting value and the rate with their units, write P(s), and say what each number means.
  2. Find where the line crosses the zero line and say what that number of seats means. Then find the profit when 180 seats are sold.

Day 2: changing the numbers

  1. A car hire costs C(d) = 45d + 25 dollars, as in Example 1. The firm raises its insurance from 11 to 14 dollars a day. Write the new cost, say how the graph changes, and compare the cost of a 5 day hire before and after.
  2. The tank of Exercise 5, W(t) = 33000 - 1800t, gets a pump that works twice as fast instead. Write the new function and find when the tank is empty. Compare the water left after 5 hours under the old pump and the new one.
  3. The chair factory of Exercise 3 has C(n) = 40n + 1300. A manager says that halving the start-up cost would halve the cost of every day. Write the new cost and test the claim on a day making 50 chairs.

Day 2: comparing two functions

  1. Rhian and Fergus climb the same mountain. Rhian’s altitude is R(t) = 3100 + 210t meters and Fergus’s is F(t) = 3520 + 140t meters, t hours after both set off. Compare their starts and their rates, find when they are at the same altitude and how high that is, and say who reaches the summit at 4{,}570 meters first.
  2. Two theaters have profits P(s) = 21s - 2220 and Q(s) = 26s - 3000 dollars for s seats sold. Which loses more with no seats sold? Which gains more per seat? For how many seats are the profits equal, and what is that profit?
  3. Tank A holds 48{,}000 liters and is drained at 3{,}000 liters an hour; tank B holds 36{,}000 liters and is drained at 2{,}000 liters an hour, both starting at the same moment. Which empties first? When do they hold the same amount, and how much is it?

Day 2: what a value means, and where the model stops

  1. For the car hire C(d) = 45d + 25, say in a sentence what C(6) = 295 means. What does the equation C(d) = 520 ask, and what is its answer?
  2. A bottling machine starts 20 minutes into a 7.5 hour shift and then fills 150 bottles an hour. Write the number of bottles B(h) filled h hours into the shift, with its domain. Find B(0) and say why it is not a number of bottles. How many bottles does the shift fill, and when has it filled 600?
  3. A climber leaves a hut at 2{,}750 meters above sea level, gains 180 meters an hour, and is heading for a summit at 4{,}010 meters. Write her altitude A(t) after t hours and find A(3.5). Which inputs does the model cover? What would A(9) claim, and why is it not believable?

Reasoning

  1. For f(x) = mx + b, show that raising b by k raises every output by k, but raising m by k raises the output at input x by kx. Explain what this means for a car hire whose daily rate rises, against one whose fixed fee rises.
  2. A tank holding V liters is drained at r liters an hour. Show that it is empty after \displaystyle \frac{V}{r} hours, and use this to explain why doubling the pumping rate halves the time, while adding 10\% more water adds 10\% more time.
  3. Two linear functions in the same situation have the same rate and different starting values. Explain why their graphs never meet, and what that says about which one is ahead and by how much.
Answers
  1. C(d) = 52d + 30, and C(5) = 260 + 30 = 290 dollars. Each day adds 52 dollars; the 30 dollars of insurance is paid once on every hire.
  2. C(d) = 36d, from 29 + 7 = 36 dollars per day. The starting value is 0: there is no fixed charge. C(9) = 324 dollars.
  3. C(n) = 40n + 1300: the rate is \displaystyle \frac{1000}{25} = 40 dollars per chair, and b = 2900 - 40(40) = 1300. Each chair adds 40 dollars; starting up costs 1{,}300 dollars a day before any chair is made.
  4. P(s) = 21s - 2220: the rate is \displaystyle \frac{1470}{70} = 21 dollars per seat and b = -330 - 21(90) = -2220, the fixed costs lost by a show with no seats sold. 105 seats still lose 15 dollars and 106 make 6, so 106 seats.
  5. The rates are \displaystyle \frac{-3600}{2}, \displaystyle \frac{-1800}{1} and \displaystyle \frac{-5400}{3}, all -1800 liters per hour. W(0) = 31200 + 1800 = 33000, so W(t) = 33000 - 1800t, empty at \displaystyle t = 18\frac{1}{3} hours, which is 18 hours 20 minutes.
  6. The rate is \displaystyle \frac{-390}{1.5} = -260 meters per hour between both pairs of rows, so A(t) = 4380 - 260t: she started down from 4{,}380 meters and loses 260 meters an hour. 260t = 1300, so t = 5 hours.
  7. P(0) = -1500 dollars and the rate is \displaystyle \frac{2000}{100} = 20 dollars per seat, so P(s) = 20s - 1500: 1{,}500 dollars of fixed costs, and 20 dollars for each seat sold.
  8. 20s = 1500 gives s = 75 seats, where the show breaks even. P(180) = 3600 - 1500 = 2100 dollars.
  9. C(d) = 48d + 25. The graph keeps its start (0, 25) and becomes steeper. A 5 day hire goes from 250 to 265 dollars, 3 dollars more for each of the 5 days.
  10. W(t) = 33000 - 3600t, empty at \displaystyle t = 9\frac{1}{6} hours (9 hours 10 minutes), half the old time. After 5 hours: 24{,}000 liters against 15{,}000. The water removed doubles, but the water left does not halve.
  11. C(n) = 40n + 650. A 50 chair day costs 3{,}300 dollars before and 2{,}650 after, not 1{,}650: the claim is false, since only the fixed 650 is saved.
  12. Fergus starts 420 meters higher; Rhian climbs 70 meters an hour faster, so they meet after \displaystyle \frac{420}{70} = 6 hours, at 3100 + 210(6) = 4360 meters. Summit: Rhian at \displaystyle \frac{1470}{210} = 7 hours, Fergus at \displaystyle \frac{1050}{140} = 7.5 hours, so Rhian first.
  13. Q loses more with no seats sold, 3{,}000 dollars against 2{,}220, and gains 5 dollars more per seat. Equal when 5s = 780, at s = 156 seats, where both make 21(156) - 2220 = 1056 dollars.
  14. A is empty after \displaystyle \frac{48000}{3000} = 16 hours and B after \displaystyle \frac{36000}{2000} = 18 hours, so A first. 48000 - 3000t = 36000 - 2000t gives t = 12 hours, when both hold 12{,}000 liters.
  15. A 6 day hire costs 295 dollars. C(d) = 520 asks how many days of hire cost 520 dollars: 45d = 495, so d = 11 days.
  16. \displaystyle B(h) = 150\left(h - \frac{1}{3}\right) = 150h - 50 for \displaystyle \frac{1}{3} \le h \le 7.5. B(0) = -50 lies outside the domain: it is the 50 bottles lost to the late start. The shift fills B(7.5) = 1125 - 50 = 1075 bottles, and 150h - 50 = 600 gives \displaystyle h = 4\frac{1}{3}, which is 4 hours 20 minutes in.
  17. A(t) = 180t + 2750, and A(3.5) = 630 + 2750 = 3380 meters. She reaches the summit when 180t + 2750 = 4010, at t = 7 hours, so the model covers 0 \le t \le 7. A(9) = 4370 meters would put her 360 meters above the summit; past t = 7 the climb is over.
  18. mx + (b + k) = (mx + b) + k, so every output rises by k; (m + k)x + b = (mx + b) + kx, so the output at x rises by kx. A higher fixed fee adds the same to every hire; a higher daily rate adds more to a long hire than to a short one.
  19. The water left is V - rt, which is 0 when \displaystyle t = \frac{V}{r}. Doubling r gives \displaystyle \frac{V}{2r}, half the time; 1.1V in place of V gives \displaystyle \frac{1.1V}{r}, 10\% more.
  20. With f(x) = mx + b_1 and g(x) = mx + b_2, f(x) - g(x) = b_1 - b_2 for every x, never 0 since b_1 \ne b_2. So the lines, which are parallel, never meet, and the one with the larger start is ahead at every input by the same amount, the gap between the two starts.
kg1128 · updated 2026-10-10 · CC-BY-SA-4.0