Worked Example · Straight-Line Graphs · Paper 1 · 4 marks

Using the Distance Formula to Find an Unknown

Rig, founder of IGCSE Add Math Malaysia

Written by Rig, our founder

8 years teaching IGCSE & SPM maths · Updated 16 August 2026

When a question fixes the length between two points and hides a coordinate, square the distance formula to get a quadratic in the unknown. Squaring is what introduces the two answers students so often miss.

The points A(1,4)A(-1, 4) and B(3,k)B(3, k) are such that the length AB=5AB = 5. Find the possible values of kk. [4]

The working

Step 1, write AB2AB^2 using the distance formula (square both sides to avoid surds): AB2=(3(1))2+(k4)2=52(M1)AB^2 = (3 - (-1))^2 + (k - 4)^2 = 5^2 \quad \text{(M1)}

Step 2, simplify the known part: (4)2+(k4)2=25    16+(k4)2=25(A1)(4)^2 + (k - 4)^2 = 25 \;\Rightarrow\; 16 + (k - 4)^2 = 25 \quad \text{(A1)}

Step 3, solve for kk: (k4)2=9    k4=±3(M1)(k - 4)^2 = 9 \;\Rightarrow\; k - 4 = \pm 3 \quad \text{(M1)} k=4+3=7ork=43=1(A1)k = 4 + 3 = 7 \qquad \text{or} \qquad k = 4 - 3 = 1 \quad \text{(A1)}

Where the marks are won and lost

  • Squaring the distance (AB2=25AB^2 = 25) avoids carrying a square root through the algebra, cleaner and less error-prone.
  • (k4)2=9(k - 4)^2 = 9 gives k4=±3k - 4 = \pm 3, hence two values. Taking only the positive root loses k=1k = 1.
  • (3(1))2=42=16(3 - (-1))^2 = 4^2 = 16: mind the double negative in the xx-difference.

Common mistakes

  • Writing 3(1)=23 - (-1) = 2 (sign error), giving the wrong constant.
  • Forgetting the ±\pm and reporting only k=7k = 7.
  • Leaving the answer as (k4)2=9(k-4)^2 = 9 without solving.

Full method: Gradient, Midpoint & Length notes. Topic home: Straight-Line Graphs pillar.

Common questions

Why are there usually two answers when finding a coordinate from a length?
The distance formula squares the differences, so recovering the unknown means square-rooting, which allows a positive or negative value. Geometrically, a point at a fixed distance from another can sit on either side, above or below, left or right, so two positions fit. Unless the question restricts the coordinate (for example 'k is positive'), report both. Giving only one value is the standard way to lose the final mark on these questions.

Keep going

See the teaching work on your own child. Then decide.

Every student starts with a 1-hour trial class taught by the vetted tutor your child would actually have. Real teaching, a diagnostic on real exam questions, and a straight answer on the gap to target. One hour at your tutor's rate (RM80–90/hr), no package and no deposit, and you decide afterwards whether to book a weekly slot. Online anywhere in Malaysia.