What is a linear function?
A function is a rule that gives exactly one output for each input. We call the input x and the output y (or f(x)).
A function is linear when y changes by the same amount every time x goes up by 1. This fixed change is the rate of change.
Every linear function can be written as y = mx + c. Some books write f(x) = mx + b or y = ax + b. They mean the same thing.
- When c = 0, the function is y = mx. Its line passes through the origin (0, 0). This is direct proportion.
- When c is not 0, some books call it an affine function.
Tables, graphs and rules
One linear function can be shown in four ways:
- Words: "double the number, then add 1".
- Rule: y = 2x + 1.
- Table: x = 0, 1, 2, 3 gives y = 1, 3, 5, 7. The y values go up by 2 each time.
- Graph: plot (0, 1), (1, 3), (2, 5), (3, 7) and join them. You get a straight line.
Test from a table: if x goes up in equal steps and the differences in y are all equal, the function is linear.
Slope and intercepts
Slope m
m = rise ÷ run = (change in y) ÷ (change in x) = (y₂ − y₁) ÷ (x₂ − x₁).
- m > 0: the line goes up from left to right (increasing).
- m < 0: the line goes down (decreasing).
- m = 0: the line is flat, y = c (a constant function).
- Bigger |m| means a steeper line.
Intercepts
y-intercept: put x = 0, so y = c. The point is (0, c).
x-intercept (the zero or root): put y = 0 and solve 0 = mx + c, so x = −c ÷ m.
Parallel lines
Lines with the same slope never meet: they are parallel.
Finding the rule and solving real problems
From two points: find m with the slope formula, then put one point into y = mx + c to find c.
From a story: the fixed starting amount is c (initial value); the amount per unit is m (rate).
Linear or not? y = 3x − 4 is linear. y = x², y = 1/x and y = 2ˣ are not: their graphs curve and the y-differences are not equal.
Solving: to find when a linear function reaches a value, set y equal to it and solve the equation. Two lines cross where both rules give the same y.
Key formulas and definitions
- y = mx + c (f(x) = mx + b)
- m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁)
- y-intercept: (0, c)
- x-intercept: x = −c ÷ m
- Parallel lines: same m
- Direct proportion: y = mx (c = 0)
Worked examples
1. For y = 3x − 2, make a table for x = 0, 1, 2, 3.
x = 0: y = −2. x = 1: y = 1. x = 2: y = 4. x = 3: y = 7. The y values go up by 3 each time, which is the slope.
2. Find the slope and y-intercept of y = −4x + 9.
Compare with y = mx + c: m = −4 (the line goes down), c = 9, so it cuts the y-axis at (0, 9).
3. Find the slope of the line through (1, 3) and (4, 12).
m = (12 − 3) ÷ (4 − 1) = 9 ÷ 3 = 3.
4. Find the equation of the line through (2, 5) and (6, 13).
Step 1: m = (13 − 5) ÷ (6 − 2) = 8 ÷ 4 = 2. Step 2: put (2, 5) in y = 2x + c: 5 = 4 + c, so c = 1. Answer: y = 2x + 1.
5. Find the x-intercept of y = 4x − 10.
Set y = 0: 0 = 4x − 10, so 4x = 10 and x = 2.5. The line cuts the x-axis at (2.5, 0).
6. A taxi charges a fixed 50 plus 12 per km. Write the rule and find the cost of 8 km. How far can you go for 170?
Cost y = 12x + 50. For 8 km: 12 × 8 + 50 = 146. For 170: 12x + 50 = 170, 12x = 120, x = 10 km.
7. Plan A costs 100 + 5 per GB; plan B costs 20 per GB. When do they cost the same?
100 + 5x = 20x, so 100 = 15x and x ≈ 6.67 GB. Below that B is cheaper; above that A is cheaper.
Common mistakes
- Writing slope as run ÷ rise. It is rise ÷ run: change in y on top.
- Mixing up the order: (y₂ − y₁) ÷ (x₁ − x₂). Take both differences in the same order.
- Thinking c is where the line cuts the x-axis. c is the y-intercept; the x-intercept is −c ÷ m.
- Calling y = x² linear because it has x in it. A linear rule has x only to the power 1 and gives a straight line.