Straight-line graphs, gradient and rate of change
What this lesson covers
- A pattern, a table, an equation and a graph can all describe the same relationship.
- The gradient of a straight-line graph is its rate of change: how much y changes for each one unit of x.
One relationship, four views
- A pattern, a table, an equation and a graph.
- All four can describe exactly the same relationship.
- Year 10 drew the lines. Now we explain them.
| View | Shows | Matchsticks |
|---|---|---|
| Pattern | the shapes | squares in a row |
| Table | the numbers | 4, 7, 10, 13 |
| Equation | the rule | y = 3n + 1 |
| Graph | the shape | a straight line |
A matchstick pattern
- Picture a row of squares made from matchsticks.
- Count the sticks: 4, 7, 10, 13.
- Up by 3 every time. A constant difference means linear.
| Squares, n | Matchsticks | Change |
|---|---|---|
| 1 | 4 | |
| 2 | 7 | +3 |
| 3 | 10 | +3 |
| 4 | 13 | +3 |
Try it: the matchstick rule
Explaining the rule, not just finding it
- Each new square shares a side, so needs only 3 new sticks.
- Step back to zero squares: 4 − 3 = 1 stick.
- So y = 3n + 1. Check: 3 × 4 + 1 = 13.
| Question | Reasoning | Gives |
|---|---|---|
| Why the 3? | each square adds 3 sticks | the 3n |
| Why the + 1? | step back once: 4 − 3 | term zero is 1 |
| Imagine the row | the first left-hand stick | starts the row |
| Rule | y = 3n + 1 | check n = 4: 13 |
Running the rule backwards
- Which pattern uses 64 sticks? Solve 3n + 1 = 64.
- n = 21, and substituting back gives 64.
- Fifty sticks would need a third of a square. Impossible.
| Question | Working | Answer |
|---|---|---|
| Uses 64 sticks? | 3n + 1 = 64, so 3n = 63 | n = 21 |
| Check | 3 × 21 + 1 | 64, correct |
| Uses 50 sticks? | 3n + 1 = 50, so 3n = 49 | n = 16⅓ |
| Reason | n must be whole | so no pattern uses 50 |
From the table to the graph
- Each row of the table becomes one point.
- Same climb each step, so the points line up.
- The line crosses the y-axis at 1. That is c.

Why the difference is the gradient
- Rise over run between any two points.
- 12 up for 4 across is 3, the same as the table.
- The difference is the rise for a run of exactly 1.
| Between | Rise over run | Gradient |
|---|---|---|
| (1, 4) and (5, 16) | (16 − 4) ÷ (5 − 1) | 12 ÷ 4 = 3 |
| (2, 7) and (3, 10) | 3 ÷ 1 | 3 |
| A run of 1 | the rise is the difference | same number |
| So | difference = gradient | m = 3 |
Graphing calculator
When x jumps by more than 1
- Here x goes up in twos, and y goes up by 6.
- That is 6 for every 2 across, so m = 3, not 6.
- At x = 0, y = 5. So y = 3x + 5.
| x | y | Change |
|---|---|---|
| 0 | 5 | |
| 2 | 11 | +6 for +2 across |
| 4 | 17 | +6 for +2 across |
| 6 | 23 | m = 6 ÷ 2 = 3 |
A gradient with units
- 2 km costs $10. 6 km costs $22.
- Rise $12, run 4 km: $3 per km.
- Units of a gradient: y units per one x unit.

What the intercept means
- Back 2 km from $10, taking $3 each: $4.
- The gradient: each extra km adds $3.
- The intercept: $4 is charged before the taxi moves.
| Part | Value | Meaning |
|---|---|---|
| Gradient | $12 ÷ 4 km | $3 per km |
| Its units | y units per x unit | dollars per km |
| Intercept | 10 − 2 × 3 = 4 | $4 before moving |
| Equation | F = 3d + 4 | check d = 6: $22 |
Try it: rate and starting value
When does the line reach $25?
- Set the rule equal to the value: 3d + 4 = 25.
- Take off the fixed charge, then divide by the rate.
- Seven kilometres.
| Step | Working | Result |
|---|---|---|
| Budget $25 | 3d + 4 = 25 | |
| Take off the $4 | 3d = 21 | |
| Divide by $3 per km | d = 7 | 7 km |
| On the taxi graph | across from 25 | down to 7 |
A negative rate of change
- A tank starts with 24 litres and drains steadily.
- 16 L at 2 minutes, 8 L at 4 minutes.
- Minus 8 litres over 2 minutes: −4 L per minute.

Two intercepts, two meanings
- Vertical intercept: 24 litres at the start.
- So V = 24 − 4t.
- Time intercept: V = 0 when t = 6. Empty at 6 minutes.
| Feature | Value | Meaning |
|---|---|---|
| Vertical intercept | 24 L | full at the start |
| Gradient | −8 L ÷ 2 min | −4 L per minute |
| Equation | V = 24 − 4t | |
| Time intercept | 24 − 4t = 0 | empty at 6 minutes |
Try it: read the rate
When are there 10 litres left?
- Solve 24 − 4t = 10. So 4t = 14.
- t = 3.5 minutes. Substitute back to check.
- Sense check: 10 L sits between 16 L and 8 L.
| Step | Working | Result |
|---|---|---|
| 10 L left? | 24 − 4t = 10 | |
| Rearrange | 4t = 14 | t = 3.5 minutes |
| Check | 24 − 4 × 3.5 | 10, correct |
| Sense check | 16 L at 2, 8 L at 4 | 10 is between |
What to take away
- Seven lines. The first two find the rule, the rest read it.
| Constant difference | linear; with x up in 1s, it is m |
| Term zero | step back once to find c |
| Gradient | rise over run, any two points |
| x steps by more than 1 | divide the change by the step |
| Units of a gradient | y units per one x unit |
| The intercept c | the value when x is zero |
| Reaching a value | set the rule equal to it, solve |
Common mistakes
- Sticks go 4, 7, 10, 13, so the rule is y = 3n.Check n = 1: 3 × 1 = 3, not 4; step back to zero squares (4 − 3 = 1) to get y = 3n + 1.
- x = 0, 2, 4 gives y = 5, 11, 17, so the gradient is 6.y rises 6 for every 2 across, so m = 6 ÷ 2 = 3 and y = 3x + 5.
- The tank goes from 24 L to 16 L in 2 minutes, so the gradient is 4.The volume is falling, so the gradient is −4 L per minute, giving V = 24 − 4t; give the sign and the units.
- In F = 3d + 4, the 4 is the cost per kilometre.The 4 is the intercept, $4 charged before the taxi moves; the gradient, $3 per km, is the cost of each kilometre.
Your turn: eight questions
- Give a reason for each step.
- Question 2: watch how far x moves each time.
- Question 3 needs a sign and units.
Tiles: 6, 11, 16, 21 for n = 1 to 4. Find the rule.
x = 0, 3, 6 gives y = 2, 8, 14. Write y = mx + c.
Steady drain, 90 L to 30 L in 12 min. Find m, with units.
Hall hire: C = 40h + 75. What does 75 mean? Hours for $275?
A plumber charges C = 85h + 60 dollars for h hours of work. Which statement is true?
Chairs in a pattern follow y = 4n + 2. Which pattern number n uses 58 chairs?
Ana finds the gradient through (2, 9) and (6, 21) as 4 ÷ 12 = 1/3. What is her mistake?
A candle burns steadily. It is 30 cm tall 2 hours after lighting and 18 cm after 6 hours. How many hours after lighting does it burn out?
Show answer
1. y = 5n + 1. The tiles go up by 5 each step, so m = 5, and stepping back once gives term zero 6 − 5 = 1. Check n = 4: 21. 2. y = 2x + 2. y rises 6 while x rises 3, so m = 6 ÷ 3 = 2, not 6. At x = 0, y = 2, so c = 2. 3. m = −5 litres per minute. The change is −60 L over 12 min, and the minus sign says the water is going down. 4. $75 is the fixed charge, paid before any hours. 40h + 75 = 275 gives 40h = 200, so 5 hours. Watch for students who use 60 as the rise in Q3 without the sign, or 6 as the gradient in Q2. 5. Each extra hour adds $85. The gradient 85 is the rate in dollars per hour, and the intercept 60 is the call-out fee paid before any work. 6. n = 14. Solve 4n + 2 = 58: take off the 2 to get 4n = 56, then divide by 4. Check: 4 × 14 + 2 = 58. 7. She put run over rise; m = 3. Rise over run is (21 − 9) ÷ (6 − 2) = 12 ÷ 4 = 3. 8. After 12 hours. The rate is −12 cm ÷ 4 h = −3 cm per hour, so at the start it was 30 + 2 × 3 = 36 cm, L = 36 − 3t, and 36 − 3t = 0 gives t = 12.
The answers
- y = 5n + 1.
- y = 2x + 2.
- m = −5 litres per minute.
- $75 is the fixed charge. 5 hours.
Sample question: Achieved
A straight line passes through (2, 7) and (6, 19). Find its equation in the form y = mx + c.
Hint
Find the gradient as rise over run, then put one point into y = mx + c to find c.
Answer
y = 3x + 1
Step by step
- A straight line is y = mx + c, so we need the gradient m and the y-intercept c.
- Gradient is rise over run. From (2, 7) to (6, 19), y rises by 19 − 7 = 12.
- x runs from 2 to 6, which is 6 − 2 = 4. Take both differences in the same order.
- m = 12 ÷ 4 = 3. y goes up 3 for every 1 across.
- So y = 3x + c. Substitute the point (2, 7): 7 = 3 × 2 + c, so 7 = 6 + c and c = 1.
- The equation is y = 3x + 1.
- Check with the other point: 3 × 6 + 1 = 19. It is on the line.
Full working
- m = 19 − 76 − 2 = 124 = 3rise over run
- 7 = 3 × 2 + c, so c = 1substitute (2, 7)
- check: 3 × 6 + 1 = 19
- y = 3x + 1
Sample questions: Merit
A plumber charges a call-out fee plus an hourly rate. A 2-hour job costs $190 and a 5-hour job costs $385. Find a rule for the cost C of an h-hour job, explain what the gradient and the intercept mean, and find how long a $450 job took.
Hint
Use the two jobs as two points (h, C). The gradient is the extra cost for each extra hour.
Answer
C = 65h + 60: $65 per hour, a $60 call-out fee; a $450 job took 6 hours
Step by step
- Treat each job as a point (hours, cost): (2, 190) and (5, 385). A fixed fee plus a steady rate makes a straight line.
- Gradient: the cost rises 385 − 190 = $195 while the time rises 5 − 2 = 3 hours.
- m = 195 ÷ 3 = 65. The units are dollars per hour: each extra hour costs $65.
- So C = 65h + c. Use (2, 190): 190 = 130 + c, so c = 60.
- The intercept is the cost when h = 0, before any work is done. So $60 is the call-out fee.
- Now solve 65h + 60 = 450. Take off the fixed fee: 65h = 390.
- Divide by the rate: h = 390 ÷ 65 = 6 hours.
- Check: 65 × 6 + 60 = 390 + 60 = 450. Also 65 × 5 + 60 = 385, the second job.
Full working
- m = 385 − 1905 − 2 = 1953 = 65dollars per hour
- 190 = 65 × 2 + c, so c = 60call-out fee
- C = 65h + 60
- 65h + 60 = 450, so 65h = 390subtract the fee
- h = 6 hours
Hexagons are made from matchsticks in a row, each new hexagon sharing one side with the one before. 1, 2 and 3 hexagons use 6, 11 and 16 matches. Find a rule for the number of matches s in pattern n, and explain where each number in it comes from. Which pattern uses 101 matches? Can a pattern use exactly 150?
Hint
Find the constant difference, then step back to pattern 0. To test 150, solve the equation and see if n is a whole number.
Answer
s = 5n + 1; pattern 20 uses 101; 150 is impossible, because n = 29.8 is not a whole number
Step by step
- The numbers go 6, 11, 16: up 5 each time. A constant difference means the rule is linear, s = 5n + c.
- Why 5? Each new hexagon shares one side with the last one, so it needs only 6 − 1 = 5 new matches.
- Step back one pattern to n = 0: 6 − 5 = 1. So c = 1, and s = 5n + 1.
- So think of one starting match, then 5 more for every hexagon. That is what 5n + 1 says.
- Check: n = 3 gives 5 × 3 + 1 = 16. Correct.
- 101 matches: solve 5n + 1 = 101. Subtract 1: 5n = 100. Divide by 5: n = 20.
- 150 matches: solve 5n + 1 = 150. 5n = 149, so n = 29.8.
- A pattern number must be a whole number of hexagons, so no pattern uses exactly 150 matches. Pattern 29 uses 146 and pattern 30 uses 151.
Full working
- differences 5, 5linear, m = 5
- 6 − 5 = 1, so c = 1step back to n = 0
- s = 5n + 1
- 5n + 1 = 101, so n = 20
- 5n + 1 = 150, so n = 29.8not a whole number
- s = 5n + 1; pattern 20; 150 is impossible
Sample questions: Excellence
At the same moment, tank A starts draining from 500 litres at 12 litres per minute, and tank B starts filling from 80 litres at 9 litres per minute. (a) Write a rule for each tank. (b) When do they hold the same amount, and how much is that? (c) For what times does A hold more than B? (d) Is the rule for A sensible at t = 50 minutes? Explain.
Hint
A draining rate is a negative gradient. Set the two rules equal for (b), use an inequation for (c), and think about when A runs out for (d).
Answer
(a) A = 500 − 12t, B = 80 + 9t (b) after 20 minutes, 260 litres each (c) 0 ≤ t < 20 (d) no: A is empty at 1253 minutes (about 41.7), and the rule gives −100 litres
Step by step
- Each tank starts with a fixed amount and changes at a steady rate, so each rule is a straight line.
- A starts at 500 and loses 12 each minute: A = 500 − 12t. The gradient −12 is negative because it drains.
- B starts at 80 and gains 9 each minute: B = 80 + 9t.
- (b) Same amount means A = B: 500 − 12t = 80 + 9t.
- Add 12t to both sides and subtract 80: 420 = 21t, so t = 20 minutes.
- Amount: 500 − 12 × 20 = 260 litres, and 80 + 9 × 20 = 260 litres. Both agree.
- (c) A more than B: 500 − 12t > 80 + 9t, so 420 > 21t and t < 20. Time starts at 0, so 0 ≤ t < 20.
- That makes sense: A starts higher and the gap closes by 12 + 9 = 21 litres every minute. 420 ÷ 21 = 20.
- (d) At t = 50 the rule gives 500 − 600 = −100 litres. A tank cannot hold a negative amount.
- A is empty when 500 − 12t = 0, so t = 50012 = 1253 minutes (about 41.7). After that the rule no longer fits.
- So the rule for A only works for 0 ≤ t ≤ 1253. This is a limitation of the model.
Full working
- A = 500 − 12t, B = 80 + 9tstart plus rate × time
- 500 − 12t = 80 + 9t, so 21t = 420set equal
- t = 20, 260 L each
- 500 − 12t > 80 + 9t gives t < 20so 0 ≤ t < 20
- 500 − 12t = 0 gives t = 1253A is empty
- t = 50 gives −100 Limpossible, rule only for 0 ≤ t ≤ 1253
- 20 min, 260 L; A more for 0 ≤ t < 20; rule fails after 41.7 min
Kiwi Cabs charges a fixed fee plus a rate per km. A 4 km trip costs $14 and a 10 km trip costs $29. A rival charges $2 per km plus a fixed fee of F dollars. Find the values of F for which the rival is cheaper for every trip of 6 km or more. Explain your reasoning.
Hint
Find Kiwi Cabs' rule first. Then think about which trip of 6 km or more is the hardest one for the rival to win.
Answer
Kiwi Cabs: C = 2.5d + 4. The rival is cheaper for every trip of 6 km or more when 0 ≤ F < 7
Step by step
- Kiwi Cabs is a straight-line rule C = md + c. Use the points (4, 14) and (10, 29).
- m = (29 − 14) ÷ (10 − 4) = 15 ÷ 6 = 2.5, so $2.50 per km.
- c: 14 = 2.5 × 4 + c = 10 + c, so the fixed fee is $4. C = 2.5d + 4.
- The rival costs F + 2d. Its rate, $2 per km, is lower than 2.5, so the longer the trip, the more the rival saves.
- Each extra km, the rival saves another $0.50. So the hardest trip for the rival to win is the shortest one allowed: 6 km.
- At 6 km Kiwi Cabs costs 2.5 × 6 + 4 = $19. The rival costs F + 12.
- Rival cheaper at 6 km: F + 12 < 19, so F < 7.
- If F < 7, the rival is cheaper at 6 km, and its lead only grows after that. So it is cheaper for every trip of 6 km or more.
- If F is 7 or more, the 6 km trip is not cheaper, so the condition fails.
- Check F = 6: at 6 km, 18 < 19; at 20 km, 46 < 54. Check F = 7: at 6 km both cost 19, so not cheaper.
Full working
- m = 29 − 1410 − 4 = 2.5dollars per km
- 14 = 2.5 × 4 + c, so c = 4C = 2.5d + 4
- rival F + 2d: saves 0.5 per kmgap grows with d
- hardest case d = 6: F + 12 < 19Kiwi Cabs costs 19
- 0 ≤ F < 7a fee cannot be negative
Graphing Slope-Intercept

Full screen · PhET Interactive Simulations, University of Colorado Boulder, CC BY 4.0
Challenge
A straight line has gradient 4 and passes through the points (1, k) and (k, 21). Find k and the equation of the line, and say whether the point (−3, −11) is on it.
Hint
Gradient is rise over run. Write the rise and the run between the two points using k, set the gradient equal to 4, and solve.
Answer
k = 5; y = 4x + 1; yes, (−3, −11) is on the line
Step by step
- Rise from the first point to the second is 21 − k. Run is k − 1.
- Gradient is rise over run, so 21 − kk − 1 = 4.
- Multiply both sides by k − 1: 21 − k = 4k − 4. So 25 = 5k and k = 5.
- The points are (1, 5) and (5, 21). From (1, 5), step back 1 in x and 4 in y: the intercept is 1. So y = 4x + 1.
- At x = −3: 4 × (−3) + 1 = −11. That matches, so the point is on the line.
- Check the gradient: (21 − 5) ÷ (5 − 1) = 16 ÷ 4 = 4.
Full working
- 21 − kk − 1 = 4rise over run
- 21 − k = 4k − 4multiply by k − 1
- 25 = 5k, k = 5collect
- c = 5 − 4 × 1 = 1, so y = 4x + 1step back to x = 0
- 4 × (−3) + 1 = −11substitute x = −3
- k = 5, y = 4x + 1, and (−3, −11) is on the line
Matchsticks make a grid of squares 3 squares high and n squares long. Find a rule for the number of matches s, explaining where each number in the rule comes from. Kahu has 250 matches. What is the longest grid she can make, and how many matches are left over?
Hint
Count the horizontal matches and the vertical matches separately. How many horizontal rows of matches are there, and how many vertical columns of matches?
Answer
s = 7n + 3; the longest grid is 35 squares long, using 248 matches, with 2 left over
Step by step
- Horizontal matches: a grid 3 squares high has 4 rows of matches (top, bottom and 2 in between), each n long. That is 4n.
- Vertical matches: there are n + 1 columns of matches, each 3 long. That is 3(n + 1) = 3n + 3.
- Total: s = 4n + 3n + 3 = 7n + 3. The 7 is the matches each new column of squares adds (4 across, 3 up). The 3 is the left-hand edge that starts the grid.
- Check: n = 1 is a column of 3 squares: 4 across and 6 up is 10, and 7 + 3 = 10.
- With 250 matches: 7n + 3 ≤ 250 gives 7n ≤ 247, n ≤ 35.28...
- n must be whole, so n = 35. That uses 7 × 35 + 3 = 248 matches, leaving 2.
Full working
- across: 4 rows × n = 4n3 squares high has 4 lines
- up: (n + 1) columns × 3 = 3n + 3one more column than squares
- s = 7n + 3collect
- 7n + 3 ≤ 250, so n ≤ 35.28...at most 250 matches
- 7 × 35 + 3 = 248, 250 − 248 = 2n = 35, whole
- s = 7n + 3; 35 squares long, 2 matches left over
Cambridge and Hamilton are 24 km apart on a straight cycle path. Tama leaves Cambridge at 7:00 am cycling to Hamilton at 18 km per hour. Mere leaves Hamilton at 7:30 am cycling to Cambridge at 12 km per hour. Let t be hours after 7:00 am and d the distance from Cambridge. Write a rule for each rider, and explain what the 30 in Mere's rule would mean and why her rule only holds from t = 0.5. When do they meet, and at what two times are they exactly 6 km apart?
Hint
Tama: d = 18t. Mere is at 24 km when t = 0.5 and her d falls by 12 each hour, so work back to t = 0. Before 7:30 only Tama is moving.
Answer
Tama d = 18t, Mere d = 30 − 12t (for t ≥ 0.5); they meet at 8:00 am, 18 km from Cambridge; they are 6 km apart at 7:48 am and 8:12 am
Step by step
- Tama starts at d = 0 and gains 18 km each hour: d = 18t.
- Mere's distance falls by 12 km each hour, a gradient of −12. At t = 0.5, d = 24. Stepping back half an hour adds 6, so the intercept is 30: d = 30 − 12t.
- The 30 is where Mere would have been at 7:00 am if she had been riding all along: 30 km from Cambridge, 6 km beyond Hamilton. She was really waiting in Hamilton, so the rule only holds from t = 0.5.
- They meet when 18t = 30 − 12t, so 30t = 30 and t = 1. That is 8:00 am, at 18 km from Cambridge.
- Before 7:30 the gap is 24 − 18t, which is still 15 km at 7:30. After that the gap is (30 − 12t) − 18t = 30 − 30t until they meet. 30 − 30t = 6 gives t = 0.8, which is 7:48 am.
- After they pass, the gap is 18t − (30 − 12t) = 30t − 30. 30t − 30 = 6 gives t = 1.2, which is 8:12 am. Tama is at 21.6 km and Mere at 15.6 km.
Full working
- Tama: d = 18tstarts at 0, 18 km per hour
- Mere: d = 24 − 12(t − 0.5) = 30 − 12tat 24 km when t = 0.5, falling 12 per hour
- 18t = 30 − 12t, t = 1, d = 18they meet
- 30 − 30t = 6, t = 0.8gap closing: 7:48 am
- 30t − 30 = 6, t = 1.2gap opening: 8:12 am
- meet at 8:00 am, 18 km from Cambridge; 6 km apart at 7:48 am and 8:12 am
Where science uses this
Practise this
Report a mistake
More in AS 91947
Expanding, index laws and algebraic fractions8 min
Factorising quadratics, HCF and difference of squares8 min
Algebraic proof: even, odd and consecutive numbers8 min
Solving linear equations and inequations8 min
Solving quadratic equations by factorising8 min
Simultaneous equations: elimination and substitution8 min
Straight-line graphs, gradient and rate of change8 min
Optimal solutions: break-even and maximum area7 min
Pythagoras' theorem in 2D and 3D explained7 min
Trigonometry: SOH CAH TOA, elevation and 3D7 min
Similar shapes: scale factors, area and volume7 min
Surface area of pyramids, cones and spheres7 min
Volume of cones, pyramids, spheres and composite solids7 min
Expressions: 7 exam questions solved step by step11 min
Factorising: 7 exam questions solved step by step10 min
Generalising: 7 exam questions solved step by step10 min
Equations and inequations: 7 exam questions solved11 min
Quadratic equations: 7 exam questions solved step by step11 min
Simultaneous equations: 7 exam questions solved step by step12 min
Straight-line graphs: 7 exam questions solved step by step11 min
Optimal solutions: 7 exam questions solved step by step11 min
Pythagoras: 7 exam questions solved step by step11 min
Trigonometry: 7 exam questions solved step by step10 min
Similar shapes: 7 exam questions solved step by step10 min
Surface area: 7 exam questions solved step by step11 min
Volume: 7 exam questions solved step by step10 min