You are planning a bike ride. At the bottom of a long climb, a sign says β8% hillβ. Your map app shows two points on the road:
| point on the road | horizontal distance from the start (m) | height above sea level (m) |
|---|---|---|
| bottom of the climb | 1500 | 120 |
| top of the climb | 4000 | 320 |
You canβt stand back and draw a slope triangle 2.5 km long, and you canβt count grid squares on a mountain. Is the sign telling the truth?
Last lesson, gradient came from counting blocks. Today, all you get is two pairs of numbers. Guess first: is the hill gentler than 8%, about 8%, or steeper?
Every point on a graph has an address, its coordinates . If you know the addresses of two points, you can find the rise and the run by subtracting instead of counting. That works for points far apart, points with negative coordinates, and points too far away to draw.
Try these first. Nothing is marked: just have a go.
On a park plan, measured in metres, a straight path runs from the point to the point . The first number is the distance across and the second is the distance up the plan.
For each 1 m across, how many metres up does the path go?
A straight line passes through and .
For each 1 unit you move to the right along the line, how far do you move up? (A move down counts as negative. A fraction is fine.)
The line through and has gradient . The point is further along the same line. If you use and instead, the gradient will beβ¦
Now investigate with the graph.
- Drag A to and B to . Check the run, the rise and the formula below the graph.
- Slide the purple point P along the line, on both sides of A. Its triangle changes size. What happens to ?
- Tick use B as the first point. Which numbers in the formula change? Does the answer change?
- Tick show the mixed-up-order mistake. What goes wrong, and why?
- Make a line that goes downhill, a horizontal line, and a vertical line. What happens to the formula each time?
- The run is just the difference in the -coordinates, and the rise is the difference in the -coordinates. No counting needed. In try-first 1 the path goes m across and m up, so m up for each metre across, without drawing anything.
- Negative coordinates need care. In try-first 2, from to the move across is (you pass 0 on the way) and the move up is , so the answer is .
- Pβs triangle can be tiny or huge, but never changes. Any two points on a line give the same gradient.
- Swapping which point comes first makes the top and the bottom of the fraction change sign. Since , the answer stays the same.
- Mixing the order, as in (top from A to B, bottom from B to A), flips only one sign, and the answer comes out with the wrong sign.
- A horizontal line gives . A vertical line gives a run of 0, so the gradient is undefined.
The gradient formula
The gradient of the straight line through two points and is
- The small numbers are subscripts: means βthe -coordinate of the first pointβ. They are labels, not powers.
- Order: you may choose either point to be βfirstβ, but you must subtract in the same order on the top and the bottom. Both of these are correct:
- Conditions: the two points must be different. If , the line is vertical and the gradient is undefined. If , the line is horizontal and .
- This is the same as the rate of change from Lesson 1. The gradient of a line is its rate of change.
Why any two points work. Take any two slope triangles on the same straight line. Their horizontal sides are parallel and their vertical sides are parallel, and they share the same slanted line. So they have the same angles: the triangles are similar, and one is an enlargement of the other. Enlarging multiplies the rise and the run by the same scale factor , and So the gradient is a property of the line, not of the points you happened to pick.
Why subtracting gives the rise and the run. On a number line, going from to is a move of to the right. βEnd minus startβ is always the move you made, and it makes a move left or down negative by itself. So is the run and is the rise, going from the first point to the second.
Why either point can go first. Starting from the other point walks the same slope triangle backwards: the run and the rise both change sign. Two sign changes cancel, because a negative divided by a negative is positive: .
Why a mixed order goes wrong. Taking the top from A to B but the bottom from B to A changes only one sign. You get the right size with the wrong sign (unless the gradient is 0), a line going up described as going down.
Why the formula needs . Equal -coordinates mean a run of 0, and there is no number to divide by 0. That is the vertical line again.
Brackets (American English: parentheses) around negatives. With the points and : Write the brackets every time you substitute a negative number. Many wrong answers come from this one slip.
Same order, top and bottom. looks almost right, but it gives the right size with the wrong sign.
Checking the hill sign
The bottom of the climb is and the top is , both in metres.
Step 1 β Label the points
and . (Either could be first, as long as we stay consistent.)
Step 2 β Substitute and calculate
Step 3 β Interpret (try this yourself first)
A gradient of 0.08 means the road climbs 0.08 m for every 1 m across, which is 8 m per 100 m: an 8% grade. The sign matches.
Step 4 β Is the answer sensible?
- Sign: positive, and the road goes up from the first point to the second β
- Size: 0.08 is just under the steepest wheelchair ramp allowed () and far below a staircase (about 0.67). Kept up for 2.5 km, that is a serious climb on a bike, but believable β
- Units: both distances are in metres, so the gradient has no units β
- But: two points only give the average gradient. The road could be 4% in one place and 12% in another, and our calculation would never know. The sign is right on average. A cyclist might want to know the steepest part too. (Youβll explore this in the real-life task.)
With negative coordinates
Find the gradient of the line through and .
Step 1 β Substitute, with brackets
Step 2 β Your turn: simplify (then open)
Step 3 β Is the answer sensible?
Going from (left) to (right), the -value falls from 4 to β2, so the line goes down: negative β. As a final check, do it in the other order: β
Find the gradient of the line through and .
Find the gradient of the line through and .
Still stuck after the example? Hearing it from another teacher often helps. This video was checked against this lesson. Try the questions again afterwards.
Gradient between two points - Corbettmaths Β· corbettmaths Β· about 5 min
How the gradient formula comes from rise over run, and how to use it with two coordinates, including negative numbers, keeping the subtraction in the same order.
A line passes through and has gradient . Without drawing a graph, can you list three more points on the line? What about points to the left of ? (Hint: what does "" let you do, again and again?) In Lesson 4, this idea becomes the equation of a line.
Extension: lines made of blocks
A computer screen is a grid of tiny square pixels. It canβt draw a perfectly smooth sloping line. It can only light up whole squares. So how does it draw ?
For each column , it lights the pixel in the row nearest to the true height :
| column | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| true height | 0 | 0.67 | 1.33 | 2 | 2.67 | 3.33 | 4 |
| pixel row lit | 0 | 1 | 1 | 2 | 3 | 3 | 4 |
The steps go up, stay, up, then up, stay, up again. The pattern repeats every 3 columns, rising 2, exactly the run and rise of . Why does it repeat? After 3 columns, the line has risen exactly 2, a whole number of pixels. So it sits in exactly the same position relative to the pixel grid as it did at the start, and everything that follows is a copy.
This works for any gradient that is a fraction in simplest form: the staircase repeats every columns, rising . But for a gradient like , which canβt be written as a fraction, the line never lands exactly on a whole number again. The staircase has no repeating cycle at all. Here is why: if the jumps repeated every columns with a total rise of , the lit pixels would climb exactly every columns forever, so the line would never get more than a fixed distance away from the line . But two lines through the origin with different gradients drift further and further apart, so the gradient would have to equal the fraction , and is not a fraction.
Try it: change the rise and run, and look for the repeat (the colours alternate for each copy). What happens with compared with ? Then switch on the irrational gradient.
Drawing lines quickly on a pixel grid is a classic problem in computer graphics. A famous method published by Jack Bresenham in the 1960s draws lines using only whole-number arithmetic, by keeping track of how far the true line is from the pixel it has just lit. Ramps built in block-building games are the same idea, just with much bigger pixels.
Find the gradient of the line through and . Give your answer as a fraction or a decimal.
Is the hill sign honest?
A cycling club is planning a route over a hill. Their map gives these points along the road (horizontal distance from point A, and height above sea level):
| point | A | B | C | D (top) |
|---|---|---|---|---|
| horizontal distance (m) | 0 | 1000 | 2000 | 2500 |
| height (m) | 200 | 250 | 350 | 450 |
A sign at point A reads β10% hill for 2.5 kmβ. Use gradients between pairs of points to decide whether the sign gives cyclists a fair picture. (These numbers are illustrative, but very similar to real climbs.)
Find the gradient of the section from B to C, as a percentage grade.
Which section of the road is the steepest?
Find the average gradient of the whole climb, from A to D, as a percentage.
The sign at A says "10% hill for 2.5 km". Your calculations show the average really is 10%.
Is the sign fair to cyclists? Use your gradients to explain, and suggest a better sign. Also: how much should we trust gradients worked out from only four points on a map?
π Work it out in your notebook first β sketch, calculate, then write your answer here in full sentences. A model answer appears after you submit, so you can compare.
The formula is used whenever two measurements are known and the steepness between them matters. Map apps calculate road gradients from height data. Scientists find speeds from two readings of a distanceβtime graph. Economists measure how fast prices rose between two years. Computer graphics draws every sloping line on your screen from just its two end points.
Next lesson youβll meet the equation , where is exactly the gradient you have learned to find. Then two points will be enough to write the equation of a whole line.
In your own words, explain why it doesn't matter which two points on a line you use to find its gradient. Mention triangles.
Which slip catches you more: subtracting a negative, or subtracting in a mixed-up order? Write one habit that will prevent it.
In the hill task, the average gradient was 'true' but still misleading. Where else might an average hide something important?
- Introduction to Algebra (Art of Problem Solving) β Chapter 8, sections 8.2β8.3 β the slope formula, and using slope to test whether points are in line
The book goes deeper and its problems are harder. Read it after this lesson, with a pencil in your hand.