Functions — Print
A function is a machine: one input goes in, exactly one output comes out. The rule is the machine.
What the practice questions cover
These questions use 3 ideas from the course. Follow any of them for a definition, where it is taught, and what it leads to.
- Slope — How much y changes for each 1 that x increases.
- y-intercept — The output when x = 0 — where the line crosses the vertical axis.
- Linear function — One whose graph is a straight line: y = mx + b.
A currency booth posts one rate: £1 = $1.25. No haggling, no commission.
Hand over £20 and you get $25. Hand over £40 and you get $50.
Come back tomorrow with £20 and you get $25 again. The booth is reliable — that is the whole point of posting a rate.
One amount in, one amount out, the same every time. Put it in a table and each input appears once.
And the rule is easy to write: dollars = 1.25 × pounds.
That reliability is the definition of a function. A booth that sometimes gave $25 for £20 and sometimes $18 would be useless — and it would not be a function either.
The function machine
Picture a machine with a rule written on it, say "multiply by 3, then add 2". Feed in 4, out comes 14.
The rule in symbols is y = 3x + 2, or in function notation f(x) = 3x + 2, so f(4) = 14.
The defining condition: the same input must always give the same output. One in, exactly one out.
The test
If any input produces two different outputs, it is not a function. On a graph, that means a vertical line crossing the curve twice.
Four ways to show the same function
Rule: y = 3x + 2.
Table: x = 0, 1, 2, 3 giving y = 2, 5, 8, 11.
Graph: the points (0,2), (1,5), (2,8) lie on a straight line.
Words: "a $2 booking fee plus $3 per ticket".
Being able to move between all four is most of this unit.
Slope and intercept, read from anywhere
In y = mx + b, m is the slope and b is the y-intercept.
From a table: the constant jump in y per step of 1 in x is m; the value at x = 0 is b.
From a graph: m = riserun between any two points; b is where it crosses the y-axis.
From two points: m = y2 - y1x2 - x1, then substitute one point to find b.
What the slope means in a story
Slope is a rate: dollars per ticket, miles per hour, cm of growth per week.
Positive slope rises, negative slope falls, and zero slope is flat — no change.
The y-intercept is the starting amount, before anything happens: a joining fee, a head start, a tank already part full.
Name them in words first
Before touching the algebra, say aloud: "the slope is ___ per ___, and the starting value is ___." Then write y = mx + b. The equation almost writes itself.
Linear or not?
A function is linear exactly when equal steps in x give equal steps in y.
x = 1, 2, 3 giving y = 5, 8, 11 is linear — the jump is always +3.
y = 1, 4, 9 is not — the jumps are +3 then +5. That one is y = x2.
And a proportional relationship is just a linear function with b = 0.
Worked examples
Rule from a table
A table gives x = 0, 1, 2, 3 and y = 7, 11, 15, 19. Write the rule and find y when x = 10.
- Check the jumps: 11 - 7 = 4, 15 - 11 = 4, 19 - 15 = 4 Constant, so it is linear with slope 4.
- At x = 0, y = 7, so b = 7. The y-intercept is read straight off the table.
- Rule: y = 4x + 7 Check x = 2: 8 + 7 = 15 ✓
- y = 4(10) + 7 = 47 Substitute.
y = 4x + 7, and y = 47.
From two points
A line passes through (2, 9) and (5, 21). Find its equation.
- m = 21 - 95 - 2 = 123 = 4 Change in y over change in x.
- Substitute (2, 9) into y = 4x + b: 9 = 8 + b Use a known point to pin down b.
- b = 1 So the line crosses the y-axis at 1.
- Check with (5, 21): 4(5) + 1 = 21 ✓ Always verify with the point you did not use.
y = 4x + 1
A function in a story
A gym charges $30 to join plus $22 a month. Write the rule, and find the cost of a year.
- Slope is 22 dollars per month. The repeating, per-unit amount.
- Intercept is 30 — paid before any months pass. The value at x = 0.
- y = 22x + 30 Slope times months, plus the starting fee.
- y = 22(12) + 30 = 294 A year is 12 months.
y = 22x + 30, so $294.
Words to know
- Function
- A rule pairing each input with exactly one output.
- Input / output
- The value you put in (x) and what comes out (y).
- Slope
- How much y changes for each 1 that x increases.
- y-intercept
- The output when x = 0 — where the line crosses the vertical axis.
- Linear function
- One whose graph is a straight line: y = mx + b.
Mistakes to watch for
Computing slope as runrise. It is rise over run, because slope answers "how much does y change for each step in x" — which puts the x change on the bottom.
Reading b from any point instead of from x = 0. The y-intercept is the value when x is zero, so only the point on the y-axis gives it directly. Any other point needs the equation solved.
Calling a relationship linear after checking one pair of values. Two points always lie on some straight line. Test a third — and check that the x values step evenly too.
Rejecting a function because an output repeats. Two different inputs may give the same output; a vending machine can sell crisps from two buttons. Only a repeated input with different outputs breaks it.
The word function was introduced by Leibniz in 1673, and the notation f(x) by Euler in 1734.
For a long time "function" meant something you could write a formula for. Mathematicians only widened it to "any rule pairing each input with one output" in the 1800s.
That widening was forced on them by problems in physics where the rule existed but no formula did.
Problem 1
If f(x) = 3x + 2, find f(4).
Worked answer
14
3(4) + 2 = 14
Problem 2
A table gives x = 0, 1, 2, 3 and y = 7, 11, 15, 19. What is the slope?
Worked answer
4
11 - 7 = 4, and the jump stays 4
Slope = 4
Problem 3
What is the y-intercept of y = 5x - 3?
Worked answer
-3
At x = 0: y = -3
Problem 4
If f(x) = 2x - 7, find f(5).
Worked answer
3
2(5) - 7 = 3
Problem 5
What is the slope of y = 4x + 1?
Worked answer
4
Slope = 4
Problem 6
A table gives x = 0, 1, 2, 3 and y = 7, 11, 15, 19. Find y when x = 10.
Worked answer
47
y = 4x + 7
4(10) + 7 = 47
Problem 7
A line passes through (2, 9) and (5, 21). Find its slope.
Worked answer
4
21 - 95 - 2 = 123 = 4
Problem 8
A line passes through (2, 9) and (5, 21). Find its y-intercept.
Worked answer
1
9 = 4(2) + b
9 = 8 + b, so b = 1
Check with (5,21): 20 + 1 = 21 ✓
Problem 9
A gym charges $30 to join plus $22 a month. What does a year cost?
Worked answer
294
22 × 12 = 264
264 + 30 = 294
Problem 10
Is y = x2 a linear function?
- Yes
- No
Worked answer
No
x = 1, 2, 3 gives y = 1, 4, 9
Jumps are +3 then +5 — not constant
So it is not linear.
Problem 11
If f(x) = 3x + 2, find x when f(x) = 20.
Worked answer
6
3x = 18
x = 6
Problem 12
Find the slope of the line through (1, 5) and (4, 14).
Worked answer
3
14 - 54 - 1 = 93 = 3
Problem 13
A table gives x = 1, 2, 3 and y = 5, 8, 11. Write the rule in the form mx+b.
Worked answer
3x+2
Jump is 3, so slope = 3
At x = 1, y = 5, so 3(1) + b = 5 and b = 2
y = 3x + 2
Problem 14
A line has slope -2 and passes through (3, 1). Find its y-intercept.
Worked answer
7
1 = -2(3) + b
1 = -6 + b
b = 7
Problem 15
Which table shows a linear function?
- y = 2, 4, 8, 16
- y = 3, 7, 11, 15
- y = 1, 4, 9, 16
- y = 5, 6, 8, 11
Worked answer
y = 3, 7, 11, 15
3, 7, 11, 15 jumps by 4 every time — linear
The others double, or jump by changing amounts.
Problem 16
A tank holds 50 L and drains at 4 L per minute. After how many minutes is it empty?
Worked answer
12.5
50 - 4x = 0
4x = 50
x = 12.5 minutes