Vertex Learn

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.
Key idea

See the triangle

  • Every formula here comes from this picture.
Points (1, 2) and (7, 10) joined, with run 6, rise 8 and midpoint (4, 6).
Key idea

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).
Worked example

From A(1, 2) to B(7, 10)

  • Find the run and rise first: both are used twice.
  1. run = 7 − 1 = 6, rise = 10 − 2 = 8
  2. m = 8 ÷ 6 = 4/3rise over run
  3. d = √(36 + 64) = √100 = 10Pythagoras
  4. midpoint = (4, 6)average each coordinate
Key idea

Try it: drag the points

  • Drag either point. Gradient, distance and midpoint update as you go.
Worked example

Using the midpoint backwards

  • M(3, 4) is the midpoint of A(1, 1) and B. Find B.
  1. (1 + x) ÷ 2 = 3, so x = 5
  2. (1 + y) ÷ 2 = 4, so y = 7
  3. B is (5, 7)
Key idea

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.
Key idea

Try it: one triangle, four questions

Your turn

1

Find the gradient from (1, 2) to (3, 8).

2

Find the distance from (0, 0) to (5, 12).

3

Find the midpoint of (2, 6) and (8, 0).

4

M(2, 2) is the midpoint of A(0, 1) and B. Find B.

5

Find the exact distance between (−1, 4) and (3, −2).

6

The line through (2, 1) and (6, k) has gradient 3/2. Find k.

7

A path runs from gate A(−3, 2) to gate B(5, 8), in units of 100 m. A bench sits at its midpoint. Where is it, and how far from A?

8

P(2, 3), Q(8, 3) and R(5, 7) form a triangle. Which is true?

Show answer

1. 6 ÷ 2 = 3 2. √(25 + 144) = 13 3. (5, 3) 4. (4, 3) 5. √52 (which is 2√13). Run 3 − (−1) = 4, rise −2 − 4 = −6, so d = √(16 + 36) = √52. 6. k = 7. Rise over run: (k − 1) ÷ 4 = 3/2, so k − 1 = 6 and k = 7. 7. (1, 5), 500 m from A. Midpoint ((−3 + 5) ÷ 2, (2 + 8) ÷ 2) = (1, 5); AB = √(64 + 36) = 10 units, so half is 5 units = 500 m. 8. PR = QR = 5, so it is isosceles. PR = √(9 + 16) = 5 and QR = √(9 + 16) = 5, while PQ = 6.

Your turn

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
  1. Start with the run and the rise, because both formulas use them.
  2. Run = 4 − (−2) = 6. Rise = −3 − 5 = −8. Take B minus A in both, so the signs stay consistent.
  3. Distance is Pythagoras on the run and rise: √(6² + (−8)²) = √(36 + 64) = √100 = 10.
  4. The midpoint averages the x values and averages the y values.
  5. x: (−2 + 4) ÷ 2 = 1. y: (5 + (−3)) ÷ 2 = 1. So the midpoint is (1, 1).
  6. Classic mistake: subtracting the coordinates for the midpoint. A midpoint always adds, then halves.
  7. 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
  1. run = 6, rise = −8B minus A
  2. AB = √(36 + 64) = √100 = 10Pythagoras
  3. M = ((−2 + 4) ÷ 2, (5 − 3) ÷ 2)average each coordinate
  4. AB = 10, M = (1, 1)
Your turn

Sample questions: Merit

1

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
  1. The distance formula links the two points: PQ² = (a − 1)² + (3 − (−1))².
  2. PQ = 5, so square both sides to remove the square root: (a − 1)² + 16 = 25.
  3. Take 16 from both sides: (a − 1)² = 9.
  4. A square of 9 comes from 3 or −3. Do not forget the negative one: a − 1 = 3 or a − 1 = −3.
  5. So a = 4 or a = −2. There really are two points, one on each side of Q.
  6. Gradient for a = 4: rise ÷ run = (3 − (−1)) ÷ (4 − 1) = 43.
  7. Gradient for a = −2: (3 − (−1)) ÷ (−2 − 1) = 4 ÷ (−3) = −43.
  8. Check a = −2: run −3 and rise 4 give √(9 + 16) = √25 = 5. Correct.
Full working
  1. (a − 1)² + 4² = 5²distance formula, squared
  2. (a − 1)² = 9
  3. a − 1 = ±3, so a = 4 or a = −2two square roots
  4. a = 4: m = 43rise 4, run 3
  5. a = −2: m = 4−3 = −43rise 4, run −3
  6. a = 4, m = 43 or a = −2, m = −43
2

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
  1. To show facts about the sides, find all three lengths with the distance formula.
  2. AB: run 4, rise 2, so AB = √(16 + 4) = √20.
  3. BC: run −2, rise 4, so BC = √(4 + 16) = √20.
  4. AC: run 2, rise 6, so AC = √(4 + 36) = √40.
  5. AB = BC, so the triangle is isosceles.
  6. For a right angle, Pythagoras must work: AB² + BC² = 20 + 20 = 40 = AC². So the angle opposite AC, at B, is 90°.
  7. In a right-angled triangle the two shorter sides are a base and a height: area = ½ × √20 × √20 = ½ × 20 = 10.
  8. Classic mistake: rounding √20 to 4.47 too early. Keep the surds and the area comes out exact.
  9. 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
  1. AB = √(4² + 2²) = √20
  2. BC = √((−2)² + 4²) = √20
  3. AC = √(2² + 6²) = √40
  4. AB = BCisosceles
  5. AB² + BC² = 20 + 20 = 40 = AC²Pythagoras holds, right angle at B
  6. area = ½ × √20 × √20the two shorter sides are base and height
  7. isosceles, right-angled at B, area 10 square units
Your turn

Sample questions: Excellence

1

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
  1. In a parallelogram the diagonals cut each other in half, so AC and BD have the same midpoint.
  2. Midpoint of AC: ((−1 + 5) ÷ 2, (2 + 0) ÷ 2) = (2, 1).
  3. 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).
  4. A parallelogram is a square when two neighbouring sides are equal and meet at 90°. Test AB and BC.
  5. AB = √(4² + 2²) = √20 and BC = √(2² + (−4)²) = √20. They are equal, so ABCD is at least a rhombus.
  6. Gradient AB = 24 = 12. Gradient BC = −42 = −2.
  7. (12) × (−2) = −1, so AB is perpendicular to BC.
  8. A parallelogram with equal neighbouring sides at right angles is a square. That is the proof.
  9. Classic mistake: showing only that all four sides are equal. That proves a rhombus, not a square; you also need the right angle.
  10. 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
  1. M of AC = (2, 1)diagonals bisect each other
  2. (3 + x) ÷ 2 = 2, (4 + y) ÷ 2 = 1, so D = (1, −2)M of BD is also (2, 1)
  3. AB = √(16 + 4) = √20, BC = √(4 + 16) = √20neighbouring sides equal
  4. m(AB) = 12, m(BC) = −2rise over run
  5. (12) × (−2) = −1AB ⊥ BC
  6. D = (1, −2); ABCD is a square
2

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
  1. The right angle is at O, because OA lies on the x-axis and OB on the y-axis. So the hypotenuse is AB.
  2. Using 2a and 2b keeps the midpoint free of fractions. Midpoint of AB: ((2a + 0) ÷ 2, (0 + 2b) ÷ 2) = (a, b).
  3. MO: run a, rise b, so MO = √(a² + b²).
  4. MA: from (a, b) to (2a, 0) is run a, rise −b, so MA = √(a² + b²).
  5. MB: from (a, b) to (0, 2b) is run −a, rise b, so MB = √(a² + b²).
  6. All three are √(a² + b²). Because a and b can be any positive numbers, this is true for every right-angled triangle.
  7. So the midpoint of the hypotenuse is the centre of a circle through all three corners.
  8. Classic mistake: proving it for one triangle with numbers. That is an example, not a proof. Letters cover every case.
  9. Check with a = 3, b = 4: M = (3, 4) and MO = 5, MA = √(9 + 16) = 5, MB = √(9 + 16) = 5.
Full working
  1. M = ((2a + 0) ÷ 2, (0 + 2b) ÷ 2) = (a, b)midpoint of the hypotenuse
  2. MO = √(a² + b²)
  3. MA = √((2a − a)² + (0 − b)²) = √(a² + b²)
  4. MB = √((0 − a)² + (2b − b)²) = √(a² + b²)
  5. MO = MA = MB = √(a² + b²), true for all a, b > 0
Summary

What to take away

  • Draw the triangle: run and rise give you everything.
  • Gradient divides, distance uses Pythagoras, midpoint averages.

Challenge

1

Point A lies on the line y = x and point B lies on the line y = −2x. The midpoint of AB is M(3, 0). Find A and B, then the exact length and the gradient of AB.

Hint

Call the points A(s, s) and B(t, −2t). The midpoint gives two equations in s and t.

Answer

A = (4, 4), B = (2, −4); AB = √68 = 2√17 ≈ 8.25 units; gradient 4

Step by step
  1. A point on y = x has equal coordinates, so write A(s, s). A point on y = −2x can be written B(t, −2t).
  2. Midpoint x: (s + t) ÷ 2 = 3, so s + t = 6.
  3. Midpoint y: (s − 2t) ÷ 2 = 0, so s = 2t.
  4. Substitute: 2t + t = 6, so t = 2 and s = 4. A = (4, 4) and B = (2, −4).
  5. Run from A to B is −2 and rise is −8, so AB = √(4 + 64) = √68 = 2√17 and the gradient is −8 ÷ −2 = 4.
  6. Check: ((4 + 2) ÷ 2, (4 − 4) ÷ 2) = (3, 0). Correct.
Full working
  1. A(s, s), B(t, −2t)each point on its own line
  2. s + t = 6 and s − 2t = 0midpoint (3, 0)
  3. 3t = 6, so t = 2, s = 4
  4. run = −2, rise = −8A to B
  5. AB = √((−2)² + (−8)²) = √68 = 2√17, m = 4
  6. A(4, 4), B(2, −4), AB = 2√17 ≈ 8.25, gradient 4
2

A(−2, 1) and C(6, 5) are opposite corners of a rhombus ABCD with every side 5 units long. Find B and D, and the area of the rhombus.

Hint

B is 5 units from A and 5 units from C. Write both distance equations, square them, and subtract one from the other to get a straight line.

Answer

B and D are (3, 1) and (1, 5) (either way round); area 20 square units

Step by step
  1. Let a corner be (x, y). It is 5 from A and 5 from C: (x + 2)² + (y − 1)² = 25 and (x − 6)² + (y − 5)² = 25.
  2. Expand and subtract: the x² and y² cancel, leaving 16x + 8y − 56 = 0, so y = 7 − 2x.
  3. Substitute into the first: (x + 2)² + (6 − 2x)² = 25, which tidies to x² − 4x + 3 = 0, so x = 1 or x = 3.
  4. x = 1 gives (1, 5) and x = 3 gives (3, 1). These are the other two corners, B and D.
  5. The diagonals are AC = √(64 + 16) = √80 and BD = √(4 + 16) = √20. They cross at right angles at their shared midpoint (2, 3), cutting the rhombus into 4 equal right-angled triangles.
  6. Area = ½ × √80 × √20 = ½ × √1600 = ½ × 40 = 20.
Full working
  1. (x + 2)² + (y − 1)² = 255 from A
  2. (x − 6)² + (y − 5)² = 255 from C
  3. 16x + 8y − 56 = 0, so y = 7 − 2xsubtract
  4. 5x² − 20x + 15 = 0, so x = 1 or 3substitute
  5. B, D = (3, 1), (1, 5)
  6. area = ½ × √80 × √20 = 20half the product of the diagonals
  7. B(3, 1), D(1, 5), area 20 square units
3

ABCD is any quadrilateral, with A(2p, 2q), B(2r, 2s), C(2t, 2u) and D(2v, 2w). P, Q, R and S are the midpoints of AB, BC, CD and DA. Prove that PQRS is always a parallelogram, and that its perimeter equals AC + BD.

Hint

Find the four midpoints in letters. Compare the run and rise from P to Q with those from S to R, and compare PQ with the diagonal AC.

Answer

PQ and SR both have run t − p and rise u − q, and QR and PS both have run v − r and rise w − s, so opposite sides are equal and parallel; PQ = SR = ½AC and QR = PS = ½BD, so the perimeter is AC + BD

Step by step
  1. The 2s keep the midpoints free of fractions: P = (p + r, q + s), Q = (r + t, s + u), R = (t + v, u + w), S = (v + p, w + q).
  2. P to Q: run t − p, rise u − q. S to R: run t − p, rise u − q. The same move, so PQ and SR are parallel and equal in length.
  3. Q to R: run v − r, rise w − s. P to S: run v − r, rise w − s. So QR and PS are parallel and equal too. Both pairs of opposite sides are parallel: PQRS is a parallelogram.
  4. PQ = √((t − p)² + (u − q)²). AC has run 2t − 2p and rise 2u − 2q, so AC = 2√((t − p)² + (u − q)²). So PQ = SR = ½AC.
  5. In the same way QR = PS = ½BD.
  6. Perimeter = 2 × ½AC + 2 × ½BD = AC + BD. Letters cover every quadrilateral, so this is a proof, not an example.
Full working
  1. P(p + r, q + s), Q(r + t, s + u), R(t + v, u + w), S(v + p, w + q)midpoints
  2. P to Q and S to R: run t − p, rise u − qequal and parallel
  3. Q to R and P to S: run v − r, rise w − sequal and parallel
  4. PQ = √((t − p)² + (u − q)²) = ½ × √((2t − 2p)² + (2u − 2q)²) = ½AC
  5. QR = √((v − r)² + (w − s)²) = ½BD
  6. perimeter = 2(½AC) + 2(½BD)
  7. PQRS is a parallelogram with perimeter AC + BD

More challenge problems

Practice

Practise this

Worksheet with answersWithout answersDownload PDF
Report a mistake

More in AS 91256

Is your child on track?

Take the free placement test