Distance, midpoint and gradient
What this lesson covers
- Gradient is the rise divided by the run.
- Distance comes from Pythagoras on the rise and run.
- The midpoint averages the x values and averages the y values.
See the triangle
- Every formula here comes from this picture.
One triangle, three formulas
- Take any two points and draw the right-angled triangle between them. The run is the difference in x and the rise is the difference in y.
- Gradient m = (y₂ − y₁) ÷ (x₂ − x₁).
- Distance d = √((x₂ − x₁)² + (y₂ − y₁)²).
- Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).
From A(1, 2) to B(7, 10)
- Find the run and rise first: both are used twice.
- run = 7 − 1 = 6, rise = 10 − 2 = 8
- m = 8 ÷ 6 = 4/3rise over run
- d = √(36 + 64) = √100 = 10Pythagoras
- midpoint = (4, 6)average each coordinate
Try it: drag the points
- Drag either point. Gradient, distance and midpoint update as you go.
Using the midpoint backwards
- M(3, 4) is the midpoint of A(1, 1) and B. Find B.
- (1 + x) ÷ 2 = 3, so x = 5
- (1 + y) ÷ 2 = 4, so y = 7
- B is (5, 7)
Try it: the midpoint and the bisector
Common mistakes
- Subtracting in a different order on the top and the bottom.Use the same point first in both, or the sign of the gradient flips.
- Subtracting the coordinates to find a midpoint.A midpoint adds and halves, because it is an average.
Your turn
Find the gradient from (1, 2) to (3, 8).
Find the distance from (0, 0) to (5, 12).
Find the midpoint of (2, 6) and (8, 0).
M(2, 2) is the midpoint of A(0, 1) and B. Find B.
Show answer
1. 6 ÷ 2 = 3 2. √(25 + 144) = 13 3. (5, 3) 4. (4, 3)
Sample question: Achieved
Find the distance between A(−2, 5) and B(4, −3), and the midpoint of AB.
Hint
Find the run and the rise first, then use Pythagoras for the distance and average the coordinates for the midpoint.
Answer
AB = 10 and the midpoint is (1, 1)
Step by step
- Start with the run and the rise, because both formulas use them.
- Run = 4 − (−2) = 6. Rise = −3 − 5 = −8. Take B minus A in both, so the signs stay consistent.
- Distance is Pythagoras on the run and rise: √(6² + (−8)²) = √(36 + 64) = √100 = 10.
- The midpoint averages the x values and averages the y values.
- x: (−2 + 4) ÷ 2 = 1. y: (5 + (−3)) ÷ 2 = 1. So the midpoint is (1, 1).
- Classic mistake: subtracting the coordinates for the midpoint. A midpoint always adds, then halves.
- Check: from A(−2, 5) to (1, 1) is a run of 3 and a rise of −4, exactly half of 6 and −8.
Full working
- run = 6, rise = −8B minus A
- AB = √(36 + 64) = √100 = 10Pythagoras
- M = ((−2 + 4) ÷ 2, (5 − 3) ÷ 2)average each coordinate
- AB = 10, M = (1, 1)
Sample questions: Merit
P(a, 3) is exactly 5 units from Q(1, −1). Find both possible values of a, and the gradient of PQ for each.
Hint
Write the distance formula with a in it, set it equal to 5, and square both sides.
Answer
a = 4, with gradient 43; or a = −2, with gradient −43
Step by step
- The distance formula links the two points: PQ² = (a − 1)² + (3 − (−1))².
- PQ = 5, so square both sides to remove the square root: (a − 1)² + 16 = 25.
- Take 16 from both sides: (a − 1)² = 9.
- A square of 9 comes from 3 or −3. Do not forget the negative one: a − 1 = 3 or a − 1 = −3.
- So a = 4 or a = −2. There really are two points, one on each side of Q.
- Gradient for a = 4: rise ÷ run = (3 − (−1)) ÷ (4 − 1) = 43.
- Gradient for a = −2: (3 − (−1)) ÷ (−2 − 1) = 4 ÷ (−3) = −43.
- Check a = −2: run −3 and rise 4 give √(9 + 16) = √25 = 5. Correct.
Full working
- (a − 1)² + 4² = 5²distance formula, squared
- (a − 1)² = 9
- a − 1 = ±3, so a = 4 or a = −2two square roots
- a = 4: m = 43rise 4, run 3
- a = −2: m = 4−3 = −43rise 4, run −3
- a = 4, m = 43 or a = −2, m = −43
A(1, 1), B(5, 3) and C(3, 7) are the corners of a triangle. Show that the triangle is isosceles and right-angled, and find its area.
Hint
Find all three side lengths. Two equal sides make it isosceles; Pythagoras on the three lengths tests for a right angle.
Answer
AB = BC = √20 and AB² + BC² = AC², so it is isosceles with a right angle at B; area = 10 square units
Step by step
- To show facts about the sides, find all three lengths with the distance formula.
- AB: run 4, rise 2, so AB = √(16 + 4) = √20.
- BC: run −2, rise 4, so BC = √(4 + 16) = √20.
- AC: run 2, rise 6, so AC = √(4 + 36) = √40.
- AB = BC, so the triangle is isosceles.
- For a right angle, Pythagoras must work: AB² + BC² = 20 + 20 = 40 = AC². So the angle opposite AC, at B, is 90°.
- In a right-angled triangle the two shorter sides are a base and a height: area = ½ × √20 × √20 = ½ × 20 = 10.
- Classic mistake: rounding √20 to 4.47 too early. Keep the surds and the area comes out exact.
- Check with gradients: AB has gradient 24 = 12 and BC has gradient 4−2 = −2. Their product is −1, so they are perpendicular.
Full working
- AB = √(4² + 2²) = √20
- BC = √((−2)² + 4²) = √20
- AC = √(2² + 6²) = √40
- AB = BCisosceles
- AB² + BC² = 20 + 20 = 40 = AC²Pythagoras holds, right angle at B
- area = ½ × √20 × √20the two shorter sides are base and height
- isosceles, right-angled at B, area 10 square units
Sample questions: Excellence
A(−1, 2), B(3, 4) and C(5, 0) are three corners of a parallelogram ABCD. Find D, then prove that ABCD is in fact a square.
Hint
The diagonals of a parallelogram share a midpoint. For the square, show two neighbouring sides are equal and at right angles.
Answer
D = (1, −2); AB = BC = √20 and the gradients of AB and BC multiply to −1, so ABCD is a square
Step by step
- In a parallelogram the diagonals cut each other in half, so AC and BD have the same midpoint.
- Midpoint of AC: ((−1 + 5) ÷ 2, (2 + 0) ÷ 2) = (2, 1).
- D must make the midpoint of BD also (2, 1): (3 + x) ÷ 2 = 2 gives x = 1, and (4 + y) ÷ 2 = 1 gives y = −2. So D = (1, −2).
- A parallelogram is a square when two neighbouring sides are equal and meet at 90°. Test AB and BC.
- AB = √(4² + 2²) = √20 and BC = √(2² + (−4)²) = √20. They are equal, so ABCD is at least a rhombus.
- Gradient AB = 24 = 12. Gradient BC = −42 = −2.
- (12) × (−2) = −1, so AB is perpendicular to BC.
- A parallelogram with equal neighbouring sides at right angles is a square. That is the proof.
- Classic mistake: showing only that all four sides are equal. That proves a rhombus, not a square; you also need the right angle.
- Check D: going from A to D should be the same move as from B to C. A to D is (+2, −4), B to C is (+2, −4). It matches.
Full working
- M of AC = (2, 1)diagonals bisect each other
- (3 + x) ÷ 2 = 2, (4 + y) ÷ 2 = 1, so D = (1, −2)M of BD is also (2, 1)
- AB = √(16 + 4) = √20, BC = √(4 + 16) = √20neighbouring sides equal
- m(AB) = 12, m(BC) = −2rise over run
- (12) × (−2) = −1AB ⊥ BC
- D = (1, −2); ABCD is a square
O(0, 0), A(2a, 0) and B(0, 2b) form a right-angled triangle, with a and b positive. Prove that the midpoint of the hypotenuse AB is the same distance from all three corners.
Hint
Find the midpoint M of AB in terms of a and b, then find MO, MA and MB with the distance formula.
Answer
M = (a, b) and MO = MA = MB = √(a² + b²), so M is equally far from all three corners
Step by step
- The right angle is at O, because OA lies on the x-axis and OB on the y-axis. So the hypotenuse is AB.
- Using 2a and 2b keeps the midpoint free of fractions. Midpoint of AB: ((2a + 0) ÷ 2, (0 + 2b) ÷ 2) = (a, b).
- MO: run a, rise b, so MO = √(a² + b²).
- MA: from (a, b) to (2a, 0) is run a, rise −b, so MA = √(a² + b²).
- MB: from (a, b) to (0, 2b) is run −a, rise b, so MB = √(a² + b²).
- All three are √(a² + b²). Because a and b can be any positive numbers, this is true for every right-angled triangle.
- So the midpoint of the hypotenuse is the centre of a circle through all three corners.
- Classic mistake: proving it for one triangle with numbers. That is an example, not a proof. Letters cover every case.
- Check with a = 3, b = 4: M = (3, 4) and MO = 5, MA = √(9 + 16) = 5, MB = √(9 + 16) = 5.
Full working
- M = ((2a + 0) ÷ 2, (0 + 2b) ÷ 2) = (a, b)midpoint of the hypotenuse
- MO = √(a² + b²)
- MA = √((2a − a)² + (0 − b)²) = √(a² + b²)
- MB = √((0 − a)² + (2b − b)²) = √(a² + b²)
- MO = MA = MB = √(a² + b²), true for all a, b > 0
What to take away
- Draw the triangle: run and rise give you everything.
- Gradient divides, distance uses Pythagoras, midpoint averages.
Practise this
Report a mistake
More in AS 91256
Is your child on track?
Take the free placement test