O Level Maths 4024 · Area 3 · Coordinate geometry

Gradient of a Line

The gradient of a line measures how steeply it climbs or falls: it is the rise divided by the run. You have to find it from a graph by counting squares, and calculate it from the coordinates of two points with y2−y1x2−x1. The same idea, applied to a tangent, gives the gradient of a curve at a point.

Not started

Syllabus coverage

  • Find the gradient of a straight line
  • Calculate the gradient of a straight line from the coordinates of two points on it
  • Estimate and interpret the gradient of a tangent at a point on a curve
  • Read a gradient as a rate of change in a practical graph

Part of the O Level Maths syllabus 4024.

123456-11234567891011y = 2x + 1(1, 3)(3, 7)run = 2rise = 4gradient = rise / run = 4 / 2 = 2gradient = 0.5read the line from left to right, rise over run.
The line y=2x+1 with the rise of 4 and run of 2 marked between (1,3) and (3,7), and a second, shallower line whose gradient of 0.5 comes from a rise of 1 for a run of 2.

What a gradient actually measures

The gradient of a line is a number that says how much the line rises or falls for every unit you move to the right. A gradient of 3 means that for every 1 unit across, the line climbs 3 units. A gradient of 12 means it climbs half a unit for every 1 unit across, which is a gentle slope. The gradient is a single number, and that number is the same at every point on a straight line.

Always read a line from left to right, the same direction you read a page. Going up as you move right gives a positive gradient. Going down as you move right gives a negative gradient. This convention is not a detail: a line that falls from left to right and is written with a positive gradient has the wrong sign, and the accuracy mark goes with it.

Gradient is often called slope, and in a practical graph it is a rate. On a distance-time graph the gradient is speed; on a conversion graph it is the exchange rate; on a cost graph it is the cost of one item. The arithmetic is identical in every case, which is why the same formula turns up in so many questions.

  • Gradient =riserun, with the run measured to the right
  • Rising left to right: positive gradient
  • Falling left to right: negative gradient
  • Flat: gradient 0. Vertical: no gradient at all

Rise over run from a grid

To read a gradient off squared paper, pick two points on the line that sit exactly on grid intersections, because those are the only points whose coordinates you can read without guessing. Draw a right-angled triangle with the two points at opposite corners. The vertical side of the triangle is the rise and the horizontal side is the run.

Count squares, not millimetres, and count from left to right. If the line goes up 4 squares while going across 2 squares, the gradient is 42=2. If it goes down 3 squares while going across 6, the gradient is −36=−12. A steep line has a rise bigger than its run, so its gradient is greater than 1; a shallow line has a rise smaller than its run, so its gradient is between −1 and 1.

Choose the two points as far apart as the grid allows. Two neighbouring points on a hand-drawn line give a gradient that is easily thrown off by half a square, while two points 8 squares apart average out that error. The examiner wants to see the triangle, so draw it on the grid rather than doing the counting invisibly.

RiseRunGradientWhat the line does
4 up2 right2steep, rising
3 down6 right−12gentle, falling
05 right0horizontal
5 up0undefinedvertical
Count the rise and the run along the line itself, not along the axes. A line that rises 4 while running 2 has gradient 2, whatever the axis scales happen to be.

Gradient from two coordinates: the formula

When the coordinates are given, you do not need a grid. The gradient is the change in y divided by the change in x: m=y2−y1x2−x1 where (x1,y1) and (x2,y2) are the two points. Subtract in the same order both times: second point minus first point, top and bottom. That single rule prevents almost every sign error in this topic.

Take A(1,3) and B(5,11). The change in y is 11−3=8 and the change in x is 5−1=4, so the gradient is 84=2. Swap the points round and you get 3−111−5=−8−4=2, the same answer. Swapping both points is safe; swapping only one of the two lines is not.

The formula works for negative coordinates too, because subtracting a negative adds. From A(−3,4) to B(1,1) the change in y is 1−4=−3 and the change in x is 1−(−3)=4, giving −34. Write the subtraction out in full before you simplify, so the double negative is visible on the page.

Write (y2−y1) on the top line and (x2−x1) on the bottom, then substitute. Doing the two subtractions in the opposite orders gives a gradient with the wrong sign.

Negative gradients, step by step

A negative gradient means the line falls as it goes right. Students lose marks here not because they cannot see the fall but because they lose the minus sign in the arithmetic. The safe routine is: write the substitution with brackets, work out the top, work out the bottom, then divide.

From (2,7) to (6,−1): the top is −1−7=−8, the bottom is 6−2=4, and −84=−2. The line drops 8 units over a run of 4, so a gradient of −2 is exactly what the picture should show. If you get +2, the top was calculated as 7−(−1) instead of −1−7.

A negative gradient smaller than 1 in size is a gentle fall, not a steep one. −14 falls only a quarter of a unit for every unit across. Compare magnitudes when you check: the size of the number tells you the steepness and the sign tells you the direction.

  • (2,7) to (6,−1): −1−76−2=−84=−2
  • (−3,4) to (1,1): 1−41+3=−34
  • (0,5) to (4,−3): −3−54−0=−2
  • (1,2) to (5,−2): −2−25−1=−1

Horizontal and vertical lines

A horizontal line has no rise, so its gradient is 0. Every point on it has the same y-coordinate, which is why its equation looks like y=3. A gradient of 0 is a perfectly good answer and must be written as 0, not left blank.

A vertical line has no run, so the division by zero cannot be done. Its gradient is undefined, and that word, or the phrase no gradient, is the expected answer. Every point on a vertical line has the same x-coordinate, so its equation looks like x=4. Writing 0 for the gradient of a vertical line is one of the commonest errors in the topic: it turns a line that cannot be measured into a flat one.

The test is quick. Subtract the x-coordinates first: if they are equal, stop, because the line is vertical. Subtract the y-coordinates: if they are equal, the gradient is 0. Only when both differences are non-zero do you divide.

PointsChange in yChange in xGradient
(2,1) and (7,1)050
(3,8) and (3,−2)−100undefined
(1,2) and (4,8)632
(−2,6) and (4,−6)−126−2

Gradient as a rate of change

In a practical graph the gradient carries units, and those units come from the axes. A distance-time graph with distance in kilometres on the vertical axis and time in hours on the horizontal axis has a gradient measured in kilometres per hour, which is speed. A graph of cost against mass has a gradient in currency per kilogram, which is the price of one kilogram.

The arithmetic is unchanged: choose two points on the line, divide the change in the vertical quantity by the change in the horizontal quantity. If a cyclist covers 40 km in 2 hours, the gradient of the distance-time line is 402=20, and the answer is 20 km/h. Quoting the number without its unit loses a mark whenever the question asks for a rate.

A negative gradient in context means the quantity is falling: water draining, a car decelerating, a value depreciating. Read the graph left to right as always. A line that goes down as time increases has a negative gradient, and saying so is often worth a mark on its own.

Give the unit with a rate. A gradient of 20 on a distance-time graph is 20 km/h, and 20 on its own does not answer the question.

The gradient of a curve: drawing a tangent

A curve does not have one gradient: it is steeper in some places than others. The gradient at a particular point is the gradient of the tangent at that point, where the tangent is the straight line that touches the curve at that point and follows its direction there.

To estimate it, lay a ruler against the curve at the point so that the straight edge touches the curve and does not cut across it. Adjust until the curve bends away evenly on both sides of the point of contact. Draw the tangent long enough to reach two clear grid intersections, then read two points from the tangent itself, not from the curve, and use the ordinary gradient formula.

The gradient of the curve at P is then the gradient of that tangent. If the tangent passes through (0,1) and (4,9), the estimate is 9−14−0=2. Because the tangent is drawn by eye, an answer within a small tolerance of the true value is accepted, but the two points must genuinely lie on the tangent you drew. A chord joining two points of the curve is not a tangent and gives the average gradient between them instead.

  • Touch the curve at the point; do not cross it there
  • Let the curve curve away evenly on both sides
  • Extend the tangent to two readable grid points
  • Read the two points from the tangent, then use riserun
A tangent touches the curve at one point over the shortest possible distance. A line that cuts through the curve at the point of contact is a chord, and its gradient is not the gradient of the curve.

A routine that gets the mark every time

For a pair of coordinates, write the formula, substitute with brackets, evaluate the top and the bottom separately, then divide and simplify. Show the substitution, because the method mark is for using the correct difference, not for the final number.

For a graph, draw the rise-and-run triangle on the grid, label the two lengths, and write the division. For a tangent, say which two points you read from the tangent. In every case check the sign against the picture: if the line falls and your answer is positive, something in the subtraction has gone wrong.

Simplify the fraction unless the question asks for a decimal. 68 should be written as 34, and 8−4 as −2. A gradient left as 12−6 looks unfinished and can lose the final accuracy mark.

Question typeFirst moveWhat earns the method mark
Two coordinatesWrite y2−y1x2−x1the correct substitution with brackets
Line drawn on a gridDraw the rise-and-run trianglethe two counted lengths
Tangent to a curveDraw the tangent at the pointreading two points from the tangent
Rate in contextRead the two axesdividing change in y by change in x

Key terms you must be able to define

Gradient
The steepness of a line, measured as the rise divided by the run; the change in y for each unit of change in x.
Rise
The vertical distance between two points on a line, counted upwards as positive and downwards as negative.
Run
The horizontal distance between the same two points, always counted to the right so that it is positive.
Gradient formula
m=y2−y1x2−x1, subtracting second point minus first point on both lines.
Positive gradient
A line that rises as it goes from left to right, such as a gradient of 3.
Negative gradient
A line that falls as it goes from left to right, such as a gradient of −12.
Zero gradient
The gradient of a horizontal line, where the rise is 0 and the equation has the form y=c.
Undefined gradient
The gradient of a vertical line, where the run is 0 and the division cannot be carried out.
Tangent
A straight line that touches a curve at one point and has the same direction as the curve there.
Point of contact
The single point where a tangent touches the curve; the gradient of the curve is measured there.
Chord
A straight line joining two points on a curve. Its gradient is an average, not the gradient at either point.
Rate of change
How quickly one quantity changes as another changes; on a graph it is the gradient, with units taken from the axes.

In context

Cambridge sets 4024 in real situations - a recipe, a bank statement, a map, a garden, a graph of a car's journey. These show how the mathematics appears in a question, then you write your own working for the numbers you are given.

Reading a gradient from a grid

A line passes through (0,1) and (2,5). Rising from the first point to the second is 4 units while moving 2 units right, so the gradient is 42=2. The line climbs, so the answer is positive, and the equation of the line will be y=2x+1.

A negative gradient from coordinates

Find the gradient of the line through (2,7) and (6,−1). Top: −1−7=−8. Bottom: 6−2=4. Gradient =−84=−2. The line falls 8 units over a run of 4, so a gradient of −2 matches the picture.

A fractional gradient with negative coordinates

Find the gradient of the line through (−3,4) and (1,1). Top: 1−4=−3. Bottom: 1−(−3)=4. Gradient =−34. The double negative on the bottom line is the step that most students lose, so write it as 1+3 before dividing.

A vertical line

Find the gradient of the line through (3,8) and (3,−2). The two x-coordinates are equal, so the run is 0 and the line is vertical. The gradient is undefined; it is not 0, because 0 would describe a horizontal line.

Gradient of a curve from a tangent

The tangent to a curve at P(2,5) passes through (0,1) and (4,9). Both points are on the tangent, so the gradient of the tangent is 9−14−0=2. The gradient of the curve at P is therefore about 2. Reading the points from the curve instead of the tangent would answer a different question.

Flashcards

Click a card to flip it. Mark honestly — the tracker uses this.

Q1What is the formula for the gradient of a line through two points?
m=y2−y1x2−x1, second point minus first point, top and bottom.
Q2Gradient of the line through (1,3) and (5,11)?
11−35−1=84=2.
Q3Gradient of the line through (2,7) and (6,−1)?
−1−76−2=−2, a falling line.
Q4What does a negative gradient look like?
The line goes down as you read from left to right.
Q5What is the gradient of a horizontal line?
0, because the rise is 0. Its equation has the form y=c.
Q6What is the gradient of a vertical line?
Undefined, because the run is 0. Its equation has the form x=k.
Q7How do you read a gradient off a grid?
Draw a right-angled triangle between two grid points on the line, then divide the rise by the run.
Q8Why choose two points far apart when reading a gradient?
A longer run averages out the error in reading positions that are only half a square apart.
Q9What is a tangent to a curve?
A straight line that touches the curve at one point and follows the curve's direction there.
Q10How do you estimate the gradient of a curve at a point?
Draw the tangent at the point, read two points from the tangent, and find the gradient of that line.
Q11What does the gradient represent on a distance-time graph?
Speed, in distance units per time unit, such as km/h.
Q12Simplify the gradient 8−4.
−2.
0 of 12 marked as known

Exam-style questions

8 questions, 20 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.

CalculateAO12 marks
Calculate the gradient of the straight line that passes through (1,3) and (5,11).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • A12not checked yet
Examiner tip: Write the substitution before dividing. The top line is the change in y and the bottom line is the change in x.
Work outAO13 marks
Work out the gradient of the line joining (−2,6) and (4,−6).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A1−2not checked yet
Examiner tip: Subtracting a negative adds, so the run is 6, not 2. The line falls, so the gradient is negative.
StateAO12 marks
The points (3,8) and (3,−2) lie on a straight line. State the gradient of this line.
Write a short answer in words.

Mark scheme — tick each point you actually made

  • B1
  • B1the gradient is undefinednot checked yet
Examiner tip: A run of 0 cannot be divided into a rise. The line is vertical, and 0 would be the gradient of a horizontal line.
StateAO11 mark
State the gradient of the line that passes through (3,5) and (9,5).
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • B1both points have y=5, so the line is horizontal and its gradient is 0not checked yet
Examiner tip: Matching y-coordinates mean a horizontal line. A horizontal line has gradient 0.
Work outAO23 marks
The tangent to a curve at the point P(2,5) passes through (0,1) and (4,9). Work out an estimate of the gradient of the curve at P.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A12not checked yet
Examiner tip: The points must come from the tangent, not from the curve. Using two points of the curve would give an average gradient instead.
Show (that)AO23 marks
Show that the gradient of the line joining (−3,4) and (5,−2) is −34.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A1
Examiner tip: The result is given, so every step must be visible. The run is 8 because subtracting −3 adds 3.
ExplainAO22 marks
Explain why the gradient of a vertical line cannot be written as a number.

Mark scheme — tick each point you actually made

  • B1
  • B1
Examiner tip: Name the zero run and the impossible division. Saying only that the line is steep does not explain anything.
DetermineAO24 marks
A straight line has gradient 32 and passes through (2,1) and (6,k). Determine the value of k.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • M1
  • A1k=7not checked yet
Examiner tip: Put the unknown into the gradient formula and solve the equation. The run is 4, so multiplying both sides by 4 is the first step.

Exam technique for this topic

  • Write the substitution with brackets before you calculate: −1−76−2 shows the examiner the correct difference, and the method mark is for that line.
  • Check the sign against the diagram. If the line falls from left to right and your gradient is positive, you have subtracted the coordinates in opposite orders.
  • Do not write 0 for the gradient of a vertical line. Two equal x-coordinates mean the gradient is undefined.
  • When a tangent is involved, say which two points you read from the tangent. The examiner can then see that the gradient came from the tangent rather than from the curve.
  • Simplify the fraction and give a rate its unit. 68 is 34, and a speed read from a gradient needs km/h or m/s.

Why students lose marks here

A student wroteGradient of the line through (2,7) and (6,−1) is +2
Why it loses marksThe y values were subtracted the other way round, giving 7−(−1)=8 instead of −1−7=−8. The line falls, so the gradient must be negative.
The answer that scores−1−76−2=−84=−2.
A student wroteThe gradient of the line through (3,8) and (3,−2) is 0
Why it loses marksA run of 0 cannot be divided into a rise, so the line has no gradient. A gradient of 0 belongs to a horizontal line, where the rise is 0.
The answer that scoresThe line is vertical, so its gradient is undefined.
A student wrote1−41−3=−32 for (−3,4) and (1,1)
Why it loses marksThe bottom line was worked out as 1−3 instead of 1−(−3). Subtracting a negative gives 1+3=4.
The answer that scores1−41−(−3)=−34=−34.
A student wroteGradient =runrise
Why it loses marksThe division is upside down. Gradient is the change in y divided by the change in x, so the rise goes on the top line.
The answer that scoresm=riserun=y2−y1x2−x1.
A student wroteA tangent drawn as a chord across the curve, then its gradient quoted as the gradient at the point
Why it loses marksA chord joins two points of the curve and gives an average gradient. The tangent must touch the curve at the required point only.
The answer that scoresDraw the tangent so it touches at the point and the curve bends away on both sides, then read two points from the tangent.

Where this fits in O Level Maths 4024

This page is one topic of Cambridge O Level Maths 4024. O Level Maths 4024 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Maths 4024 syllabus page.