Equation of a straight line, gradient, midpoint, distance between two points, parallel and perpendicular lines.
Answer at least 3 of 3 correctly to complete this section.
Straight lines are everywhere in maths. They describe constant rates of change, model linear relationships, and appear as tangents and normals in calculus. The gradient is arguably the single most important concept in A-Level Maths — differentiation is just “gradient of a curve”.
If you can confidently find the equation of a line, compute gradients, and determine whether lines are parallel or perpendicular, you have a toolkit that gets used in almost every topic from here onwards.
Drag the gradient slider below. What happens to the line as you increase the number? What about negative values? What does zero do?
The gradient of a line measures its steepness — more precisely, it tells you the rate of change of y with respect to x. For every 1 unit you move to the right, the gradient tells you how many units you move up (or down).
m=runrise=change in xchange in y=x2−x1y2−y1
| Gradient | Direction | Example |
|---|---|---|
| m>0 | Line slopes upward (left to right) | m=2 |
| m<0 | Line slopes downward (left to right) | m=−3 |
| m=0 | Horizontal line | y=5 |
| Undefined | Vertical line | x=3 |
Key insight: The order of the points does not matter, as long as you are consistent. If you put y2 first on top, you must put x2 first on the bottom. Mixing the order is the most common gradient mistake.
Find the gradient of the line through (3,1) and (7,9).
m=7−39−1=48=2
The gradient is 2. For every 1 unit right, the line goes 2 units up.
Find the gradient of the line through (−2,5) and (4,−1).
m=4−(−2)−1−5=6−6=−1
The gradient is −1. The line slopes downward at 45°.
Answer at least 3 of 4 correctly to complete this section.
There are two standard forms for the equation of a straight line. Both describe the same line — the difference is which one is easier to use in a given situation.
| Form | Equation | Best when… |
|---|---|---|
| Slope-intercept | y=mx+c | You know (or want) the y-intercept |
| Point-slope | y−y1=m(x−x1) | You know the gradient and any point on the line |
Pro tip: The point-slope form y−y1=m(x−x1) is almost always faster in exam questions. You never need to find c separately — just substitute the point and gradient directly. Many students waste time with y=mx+c when the point-slope form would give the answer in one step.
If you know the gradient m and the y-intercept c, write the equation directly:
Gradient 3,y-intercept −2⟹y=3x−2
If you know the gradient and a point (not the y-intercept), substitute to find c:
Find the equation of the line with gradient 4 passing through (2,5).
Substitute m=4, x=2, y=5 into y=mx+c:
5=4(2)+c 5=8+c c=−3
So the equation is y=4x−3.
This form lets you write the equation directly from a point and gradient — no need to find c.
Find the equation of the line with gradient 4 passing through (2,5).
Using point-slope form directly:
y−5=4(x−2) y−5=4x−8 y=4x−3
Same answer, fewer steps. No solving for c required.
Find the equation of the line through (1,3) and (4,12).
Step 1: Find the gradient.
m=4−112−3=39=3
Step 2: Use point-slope form with either point. Using (1,3):
y−3=3(x−1) y=3x
Answer at least 3 of 4 correctly to complete this section.
The midpoint of two points is their average — halfway between them in both x and y.
Midpoint of (x1,y1) and (x2,y2)=(2x1+x2,2y1+y2)
Think of it as: midpoint = average of the coordinates.
Find the midpoint of (3,7) and (9,1).
Midpoint=(23+9,27+1)=(212,28)=(6,4)
The distance between two points uses Pythagoras’ theorem — the line between the points is the hypotenuse, with horizontal and vertical differences as the other sides.
d=(x2−x1)2+(y2−y1)2
Find the distance between (1,2) and (4,6).
d=(4−1)2+(6−2)2=9+16=25=5
Find the exact distance between (−3,1) and (2,5).
d=(2−(−3))2+(5−1)2=25+16=41
Since 41 has no square factors, 41 is already in its simplest form.
Common confusion: Do not mix up the midpoint and distance formulae. Midpoint uses addition then halving. Distance uses subtraction, squaring, then square root. One averages, the other measures.
Answer at least 3 of 4 correctly to complete this section.
Two lines are parallel if and only if they have the same gradient:
l1∥l2⟺m1=m2
Parallel lines never meet — they travel in exactly the same direction, just shifted up or down.
Two lines are perpendicular (at right angles) if and only if the product of their gradients is −1:
l1⊥l2⟺m1×m2=−1
Another way to say this: the gradient of the perpendicular line is the negative reciprocal — flip the fraction and change the sign.
| Original gradient | Perpendicular gradient |
|---|---|
| 2 | −21 |
| −3 | 31 |
| 52 | −25 |
| −41 | 4 |
Watch out: “Perpendicular” does not just mean “negative”. The gradient of a line perpendicular to y=2x is not −2, it is −21. You must take the negative reciprocal.
The line l1 passes through (1,3) and (5,11). Find the equation of the line l2 that is perpendicular to l1 and passes through the midpoint of these two points.
Step 1: Gradient of l1:
m1=5−111−3=48=2
Step 2: Perpendicular gradient:
m2=−m11=−21
Step 3: Midpoint:
(21+5,23+11)=(3,7)
Step 4: Equation using point-slope form:
y−7=−21(x−3)
y=−21x+23+7=−21x+217
Set m=3 on the first line. Enable the second line and switch to Perpendicular mode. What gradient does the perpendicular line have? Try different values of m — can you spot the relationship?
Answer at least 3 of 4 correctly to complete this section.
These questions combine multiple skills from this lesson — just as they would appear in an exam.
The points A(2,−1) and B(8,5) are given. Find: (a) the gradient of AB (b) the equation of AB (c) the midpoint M of AB (d) the equation of the line perpendicular to AB through M
(a) Gradient:
m=8−25−(−1)=66=1
(b) Equation using point-slope form with A(2,−1):
y−(−1)=1(x−2)⟹y+1=x−2⟹y=x−3
(c) Midpoint:
M=(22+8,2−1+5)=(5,2)
(d) Perpendicular gradient: m⊥=−11=−1
Equation through M(5,2):
y−2=−1(x−5)⟹y=−x+7
Show that the points A(1,2), B(3,6), and C(5,10) are collinear (lie on the same line).
Find gradient AB:
mAB=3−16−2=24=2
Find gradient BC:
mBC=5−310−6=24=2
Since mAB=mBC=2 and B is a common point, all three points lie on the same line with equation y=2x. □
Answer at least 3 of 4 correctly to complete this section.
| Task | Method |
|---|---|
| Gradient from two points | m=x2−x1y2−y1 |
| Equation from gradient + point | y−y1=m(x−x1) |
| Equation from two points | Find m first, then use point-slope form |
| Midpoint | (2x1+x2,2y1+y2) |
| Distance | (x2−x1)2+(y2−y1)2 |
| Parallel condition | m1=m2 |
| Perpendicular condition | m1×m2=−1 |
| Perpendicular bisector | Find midpoint + perpendicular gradient, then equation |
| Collinear points | Show equal gradients between pairs sharing a common point |
Lock in what you've learned with exam-style questions and spaced repetition.
Simplifying surds, laws of indices, rationalising denominators.
Equation of a circle, finding tangents and normals, circle properties and intersection with lines.
Finding equations of tangents and normals to curves at given points.
Vector notation, magnitude, direction, position vectors, vector arithmetic in 2D.