Formula sheet
Distance between two points
This formula is printed on the exam formula sheet, so you do not have to memorise it. What you must know is when to reach for it, any time a question asks for the length of a line segment or the distance between two coordinate points, and how to substitute the coordinates in the correct order.
What the symbols mean
- x₁, y₁ the x- and y-coordinates of the first point (x₁, y₁)
- x₂, y₂ the x- and y-coordinates of the second point (x₂, y₂)
- Distance the straight-line length between the two points, in the same units as the axes
Given in the exam, or memorise?
This formula is printed on the exam formula sheet, so you do not have to memorise it. What you must know is when to reach for it, any time a question asks for the length of a line segment or the distance between two coordinate points, and how to substitute the coordinates in the correct order.
Why it works
It is simply Pythagoras' theorem applied to the right-angled triangle formed by the horizontal and vertical gaps between the two points.
- Plot the two points; the horizontal gap is (x₂ − x₁) and the vertical gap is (y₂ − y₁).
- These two gaps are the legs of a right-angled triangle, and the line joining the points is the hypotenuse.
- By Pythagoras, hypotenuse² = (x₂ − x₁)² + (y₂ − y₁)², so the distance is the square root of that.
Worked example 1
Find the distance between the points A(1, 2) and B(4, 6).
- Take (x₁, y₁) = (1, 2) and (x₂, y₂) = (4, 6).
- Distance = √((4 − 1)² + (6 − 2)²)
- = √(3² + 4²) = √(9 + 16)
- = √25 = 5
Worked example 2
Find the distance between P(0, 1) and Q(6, 4), leaving your answer in surd form.
- Take (x₁, y₁) = (0, 1) and (x₂, y₂) = (6, 4).
- Distance = √((6 − 0)² + (4 − 1)²)
- = √(6² + 3²) = √(36 + 9)
- = √45 = √(9 × 5) = 3√5
Where students go wrong
- Forgetting to square the differences, writing √((x₂ − x₁) + (y₂ − y₁)) instead of squaring each gap first.
- Splitting the root wrongly: √(9 + 16) is NOT √9 + √16 = 7. Add inside the root first, then take one square root: √25 = 5.
- Treating a squared negative as negative: (−4)² = 16, not −16, so a downward or leftward gap still adds a positive value.
- Leaving the answer as √45 when the question asks for surd form, simplify it to 3√5.
Use it with
Source:SPM: Format Pentaksiran mulai 2021, Matematik (1449)
Frequently asked questions
Does it matter which point I call point 1 and which point 2?
No. Because each difference is squared, (x₂ − x₁)² gives the same value as (x₁ − x₂)².
So you can label either point as the first one and still get the same distance. Just be consistent within a single calculation and square each gap before adding them together.
How do I know when to use the distance formula instead of the midpoint formula?
Use the distance formula when a question asks for a length, how far apart two points are, the length of a side, or the perimeter of a shape. Use the midpoint formula when it asks for the point exactly halfway between two points.
The words 'length' or 'distance' are your signal.
Should I leave the answer as a surd or a decimal?
Follow the question. If it says 'in surd form', simplify to something like 3√5.
If it asks for the length correct to a number of decimal places, use your calculator to get a decimal such as 6.71. When it does not specify, giving both the exact surd and its decimal value is a safe choice.