Primary & Middle School Mathematics · Grades 1–9
67Linear and Affine Functions
“Three kilograms cost three times as much as one”: that is proportionality, the simplest way two quantities can be related. Linear functions are proportionality in the language of functions; affine functions add a fixed starting amount. Their graphs are straight lines, and reading those lines is the skill this chapter builds.
67.1 Proportionality and linear functions
Definition 67.1 (Linear function)
A linear function multiplies every number by a fixed number :
The number is the coefficient of . Two quantities are proportional exactly when one is a linear function of the other.
Example 67.2
If apples cost per kilogram, the price of kilograms is : buying twice as much costs twice as much, and the price of kg is .
Conversely, if a linear function satisfies , then and : one value determines a linear function completely.
Proposition 67.3 (Graph of a linear function)
The graph of is a straight line through the origin. Conversely, every non-vertical line through the origin is the graph of a linear function.
Proof. Admitted at this level. ∎
67.2 Affine functions
Definition 67.4 (Affine function)
An affine function has the form
where and are fixed numbers. Linear functions are the special case ; constant functions the case .
Example 67.5
A gym charges a registration fee of , then per visit: the total cost of visits is . The cost is not proportional to the number of visits (10 visits do not cost twice as much as 5), but each extra visit adds the same amount, .
Proposition 67.6 (Graph of an affine function)
The graph of is a straight line:
- is the -intercept: the line crosses the vertical axis at ;
- is the slope: moving one unit to the right moves units up (down if ); the function is increasing when , decreasing when ;
- for any two inputs , .
Proof of the last point. ; divide by . The rest is admitted at this level (the High School volume gives a full treatment of lines and their equations). ∎
Method 67.7 (Finding an affine function from two values)
Given and with :
- compute the slope ;
- substitute one of the two known values into to find ;
- check with the other value.
Example 67.8
Find the affine function with and .
then gives : . Check: .
67.3 Percentages
Proposition 67.9 (Percentage change)
Increasing a quantity by multiplies it by ; decreasing it by multiplies it by . Percentage changes are linear functions.
Proof. Increasing by means adding :
Same computation with a minus sign for a decrease. ∎
Example 67.10
A price of increases by : new price . A price of decreases by : .
Chaining changes multiplies the factors. A increase followed by a decrease gives : a decrease overall, not a return to the start!
67.4 Exercises
Exercise 67.1 ★
Among these functions, which are linear? affine? neither?
Exercise 67.2 ★
Let . Compute , , , and find the number such that .
Solution
Solution of Exercise 67.2.
; ; . And means , so and .
Exercise 67.3 ★
A linear function satisfies . Find its coefficient, then compute and .
Solution
Solution of Exercise 67.3.
, so . Then and .
Exercise 67.4 ★
Draw on the same coordinate system the graphs of , and . What can be said about the graphs of and ?
Solution
Solution of Exercise 67.4.
passes through the origin with slope ; has the same slope but crosses the -axis at ; decreases from with slope . The graphs of and are parallel lines (same slope, different intercepts).
Exercise 67.5 ★
Find the affine function such that and ; then the one such that and .
Exercise 67.6 ★★
Compute: the price after a increase on ; the price after a discount on ; the original price if an article costs after a discount.
Solution
Solution of Exercise 67.6.
Increase of : .
Discount of : .
Original price with : .
Exercise 67.7 ★★
A phone plan A costs per month plus per minute of calls; plan B costs per month with unlimited calls.
- Express the monthly cost of plan A as a function of the number of minutes.
- From how many minutes per month is plan B cheaper?
Solution
Solution of Exercise 67.7.
1. .
2. Plan B is cheaper when , i.e. , i.e. . From minutes ( hours) per month onward, plan B wins.
Exercise 67.8 ★★
A population of bacteria increases by every hour.
- How many bacteria are there after one hour? After two hours?
- Explain why the answer after two hours is not .
Solution
Solution of Exercise 67.8.
1. After one hour: . After two hours: .
2. The second increase applies to , not to : growing by twice multiplies by , a increase, not .
Exercise 67.9 ★★
The graph of an affine function passes through the points and .
- Compute its slope. Is the function increasing or decreasing?
- Give its expression, and compute the input for which the output is .
Solution
Solution of Exercise 67.9.
1. Slope: : the function is decreasing.
2. with : , so and . Output : gives .
Exercise 67.10 ★★★
A shop first raises a price by , then lowers the new price by .
- Show that the final price equals the original multiplied by .
- Deduce that the final price is always lower than the original (for ), and find the overall percentage change for .
Solution
Solution of Exercise 67.10.
1. The two changes multiply the price by
(third identity with , ).
2. For , , so the factor is less than : the final price is lower than the original. For : factor , i.e. an overall decrease of .
67.5 Problem: The two thermometers
Problem 67.1
Weekend problem — Celsius, Fahrenheit and the affine functions of daily life: one temperature reads the same on both scales, and constant slope is the signature of straightness
Americans hear “ degrees” and dress lightly; Europeans hear it and grab a coat. The two thermometers of the world are linked by an affine function — and building it from two facts is exactly the skill of Method 67.7. This problem constructs the conversion, finds the eerie temperature at which the two scales agree, then reads taxis, crickets and candles with the same pair of glasses, and ends with the test that recognizes straightness itself.
Part I — Building the conversion. Two facts pin the Fahrenheit scale: water freezes at F and boils at F (at C and C).
- Find the affine function converting Celsius into Fahrenheit (Method 67.7 with the values and ).
- Convert to Fahrenheit: a mild C day; the body’s C; a freezing C.
- Solve for to build the return conversion, and use it on F and on F.
- Is a linear function (Definition 67.1)? Test the tell-tale signs: what is , and does doubling the Celsius reading double the Fahrenheit one? Conclude with the right word (Definition 67.4).
- The classic riddle: is there a temperature that reads the same number on both scales? Solve , and describe what your solution means on the graph of (which line does the graph cross there?).
Part II — Affine functions in the wild.
- Taxi A charges euros plus per km; taxi B charges a flat euros per km. Write the two price functions and compare them for a km ride and an km ride.
- Find the break-even distance at which the two taxis cost the same, and describe the situation on a graph (two lines — what happens at the crossing point, before it, after it?).
- Naturalists’ rule of thumb: a cricket chirps about times per minute at temperature C. How many chirps on a C evening? You count chirps in a minute: what temperature does the cricket announce?
- A phone bought euros loses value by euros per month: write the value function , find when the phone is worth euros, and when the model says it is worth nothing. Does the formula still mean anything after that date?
- Percentage moves are linear functions: is multiplication by , and by (Proposition 67.9). Compose them: what does a rise followed by a cut do to a price? Explain the little miracle, and compare with Exercise 67.10.
Part III — The slope is everything.
- A candle measures cm when lit and cm half an hour later. Assuming affine melting, find (height in cm, in minutes), and predict when the candle dies.
- Two cyclists ride the same road: the first’s distance is (km after hours), the second’s is . Who started with a head start, who rides faster, and at what time and kilometer does the first catch the second?
- Let and . Compute and check it is affine again. What are the slope and intercept of a sum, in general?
- Discuss completely the equation : how many solutions when (and which one)? When and ? When and ? (Every case has a graph story: where does a line of slope cross the horizontal axis?)
- The alignment test: are the points , , on one straight line? Are , , ? Compute rates of change between pairs and decide. State the moral: a constant rate of change is the signature of affine functions — curved graphs change their rate, and measuring that is a story for the High School volume.
Solution
Solution of Problem 67.1.
1. Slope: ; intercept . Hence
2. F (the famous mild day); F; F.
3. From : . Then F C, and F C.
4. , and is not the double of : not linear. The graph is a straight line missing the origin: is affine, not linear.
5. gives , so : at forty below, both thermometers read . On the graph, the line of crosses the diagonal line exactly there.
6. and . For km: euros against : B cheaper. For km: against : A cheaper.
7. gives : at six kilometers both cost euros. Graphically, B’s line (through the origin, steeper) starts below A’s and crosses it at : B wins short rides, A wins long ones.
8. chirps per minute. From : C.
9. . Worth : , months. Worth : months. Beyond months the formula goes negative — but a phone’s value stops at zero: every affine model has a domain where it makes sense.
10. Composing: then multiplies by : the price returns exactly to its start. No miracle: the percentages act on different references (the cut applies to the raised price), and here the multipliers happen to cancel — the general story, with its built-in loss , is Exercise 67.10.
11. Slope: cm per minute; . It dies at : minutes — three hours and twenty minutes of light.
12. The second started km ahead (intercept); the first is faster ( km/h). Catch-up: gives , h h min, at kilometer .
13. : affine, with slope the sum of the slopes and intercept the sum of the intercepts — clear from collecting like terms in .
14. If : exactly one solution, — a non-horizontal line crosses the axis once. If , : no solution — a horizontal line above or below the axis never touches it. If , : every is a solution — the line is the axis.
15. First triple: rates and : equal, the points are aligned (on ). Second triple: but : not aligned. Affine functions are exactly those with a constant rate of change — one number, the slope, tells the whole story; for curves the rate itself changes from point to point, and chasing it leads to the derivative, in the High School volume.