Formula sheet
Gradient (two points)
The two-point gradient formula is given in the exam, so you focus on using it correctly: pick any two points the line passes through, keep the y-differences on top and the x-differences on the bottom, and subtract them in the same order. A positive result rises from left to right, a negative one falls.
What the symbols mean
- m the gradient (steepness) of the straight line; a pure number with no units
- x₁, y₁ the coordinates of the first point on the line (x₁, y₁)
- x₂, y₂ the coordinates of the second point on the line (x₂, y₂)
Given in the exam, or memorise?
The two-point gradient formula is given in the exam, so you focus on using it correctly: pick any two points the line passes through, keep the y-differences on top and the x-differences on the bottom, and subtract them in the same order. A positive result rises from left to right, a negative one falls.
Why it works
Gradient measures how steep a line is, how much it rises for each step across.
- Between two points, the vertical change (rise) is y₂ − y₁ and the horizontal change (run) is x₂ − x₁.
- Gradient is defined as rise over run.
- Dividing the rise by the run gives a single number that stays the same anywhere along a straight line.
Worked example 1
Find the gradient of the straight line passing through A(1, 2) and B(4, 11).
- Take (x₁, y₁) = (1, 2) and (x₂, y₂) = (4, 11).
- m = (11 − 2)/(4 − 1)
- = 9/3
- = 3
Worked example 2
Find the gradient of the line joining P(−2, 5) and Q(2, −3).
- Take (x₁, y₁) = (−2, 5) and (x₂, y₂) = (2, −3).
- m = (−3 − 5)/(2 − (−2))
- = −8/4
- = −2
Where students go wrong
- Flipping the formula to (x₂ − x₁)/(y₂ − y₁), the rise (y) must be on top and the run (x) on the bottom.
- Subtracting in opposite orders top and bottom, e.g. (y₂ − y₁) over (x₁ − x₂), which reverses the sign of the gradient.
- Sign errors with negatives, especially 2 − (−2) = 4, not 0, and −3 − 5 = −8, not −2.
- Confusing a zero gradient (horizontal line) with an undefined gradient (vertical line, where the run is 0).
Use it with
Source:SPM: Format Pentaksiran mulai 2021, Matematik (1449)
Frequently asked questions
Does it matter which point I use first?
No, as long as you subtract in the same order on top and bottom. (y₂ − y₁)/(x₂ − x₁) and (y₁ − y₂)/(x₁ − x₂) give the same gradient.
The mistake to avoid is mixing orders, new y minus old y over old x minus new x, because that flips the sign.
What does a negative gradient mean?
A negative gradient means the line falls as you read from left to right, as x increases, y decreases. A positive gradient rises.
A gradient of 0 is a flat, horizontal line, and a vertical line has an undefined gradient because the run (x₂ − x₁) would be zero.
What if the two x-coordinates are the same?
Then x₂ − x₁ = 0, and you cannot divide by zero, so the gradient is undefined. This happens for a vertical line.
It is not a gradient of zero, zero gradient is a horizontal line where the y-coordinates are equal instead. Watch for this before dividing.