Geometry · JSS 2, SS 3
Gradient of a straight line
Measure how steep a line is from two points on it.
- m = y2 − y1x2 − x1
What the letters mean
- m
- the gradient (slope)
- (x1, y1), (x2, y2)
- two points on the line
Worked example
Find the gradient of the line through (1, 2) and (3, 8).
Step 1: Change in y over change in x
m = 8 − 23 − 1 = 62 = 3
Final answer: 3
Rise over run: subtract the y's and the x's in the same order.
When to use it
Use it when you are given two points, or can read two points off a graph, and need the slope of the straight line through them. It is also the first step in finding the equation of a line. Do not use it on a curve, where the steepness keeps changing; there you need a tangent, which is an SS-level idea.
Why it works
Gradient tells you how much y changes each time x goes up by 1. Between two points, y changes by y2 − y1 (the rise) while x changes by x2 − x1 (the run). Dividing rise by run shares the total rise equally over each unit of x. Because a straight line has the same steepness everywhere, any two points on it give the same answer.
Try it yourself
Find the gradient of the line joining P(−2, 7) and Q(4, −5).
Try it first, then show the solution
- Label the points: (x1, y1) = (−2, 7) and (x2, y2) = (4, −5).
- Rise: y2 − y1 = −5 − 7 = −12.
- Run: x2 − x1 = 4 − (−2) = 4 + 2 = 6.
- m = −126 = −2.
Answer: −2 (the line slopes downwards from left to right)
See it
Play with this picture from the Gradient, Distance and Midpoint lesson.
Your task: plot the point (3, -2)
Drag P. Remember: x first (across), then y (up or down).
Common mistakes
- Putting x on top: x2 − x1y2 − y1. Remember: y goes up the wall, so y goes on top.
- Mishandling negative signs, such as 4 − (−2) = 2. Subtracting a negative means adding, so 4 − (−2) = 6. Put negative numbers in brackets.
In BECE and WASSCE
Gradient is mainly an SS topic in WASSCE coordinate geometry; JSS work on plotting points and drawing lines on the Cartesian plane prepares you for it. You may be asked for the gradient from points, from a drawn graph, or from an equation like y = 3x − 4. WASSCE questions may also ask about parallel lines, which share the same gradient.
Questions students ask
What does a negative gradient mean?
A negative gradient means the line goes downhill as you move from left to right: when x increases, y decreases. A positive gradient goes uphill, a gradient of 0 is a flat horizontal line.
What is the gradient of a vertical line?
For a vertical line the x-values of both points are the same, so the run is 0. Dividing by 0 is not possible, so we say the gradient of a vertical line is undefined.