The Distance Formula
The distance between two points is not a new idea. It is Pythagoras theorem applied to a triangle you draw yourself, with legs that run parallel to the axes so their lengths can be read straight off the coordinates.
Plot $(-3, 2)$ and $(5, 8)$ and join them. Now add a horizontal line and a vertical line to make a right triangle with that interval as the hypotenuse. How long is each of the two legs? What theorem finishes the job?
Complete the right triangle under the interval. Its legs run parallel to the axes, so their lengths are the coordinate differences. Then Pythagoras theorem turns those two numbers into the length of the interval itself.
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
The diagram is the same one as the gradient lesson, used differently. There, the two legs were divided to measure steepness. Here they are squared and added to measure length. One construction, two formulas, which is why they are worth learning together.
Know
- the distance formula $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ for the two points $(x_1, y_1)$ and $(x_2, y_2)$
- that the formula is Pythagoras theorem applied to the right triangle whose hypotenuse is the interval
- that a distance answer is normally left exact, as a simplified surd, unless a rounded value is requested
Understand
- why the legs of that triangle have lengths equal to the coordinate differences
- why squaring makes the order of the two points irrelevant, unlike in the gradient formula
- how comparing the three side lengths of a triangle classifies it, and how the converse of Pythagoras theorem detects a right angle
Can Do
- find the exact and approximate distance between two points, including horizontal and vertical cases
- classify a triangle given the coordinates of its vertices as scalene, isosceles or right-angled
- find an unknown point satisfying a distance condition, such as a point on an axis equidistant from two others
Two points on the plane are joined by an interval that is, in general, slanted. Slanted lengths are hard to measure directly, but horizontal and vertical ones are easy, because you can read them off the coordinates.
So build a triangle that has one of each. From the left-hand point draw a horizontal line, from the right-hand point draw a vertical one, and let them meet. The interval becomes the hypotenuse of a right triangle whose legs are parallel to the axes.
You have converted an unmeasurable length into two measurable ones plus a theorem. That conversion is the entire idea, and the algebra that follows is bookkeeping.
The horizontal leg runs from $x_1$ to $x_2$, so its length is $x_2 - x_1$. The vertical leg runs from $y_1$ to $y_2$, so its length is $y_2 - y_1$.
Strictly, a length cannot be negative, so those should be written with absolute value signs as $|x_2 - x_1|$ and $|y_2 - y_1|$. Pythagoras theorem then gives
$d^2 = |x_2 - x_1|^2 + |y_2 - y_1|^2$
But squaring a number and squaring its negative give the same result, so the absolute value signs do nothing and can be dropped:
$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
That is why the formula looks tidier than the geometry it came from. The squaring absorbs the sign problem, which is a small piece of luck worth noticing rather than passing over.
In the gradient formula the order of the points was safe only if you were consistent, because reversing just one subtraction flipped the sign. Distance has no such trap.
Reverse the points and each difference becomes its own negative, but each is then squared, and squaring destroys the sign entirely. $(5 - (-3))^2 = 8^2 = 64$ and $(-3 - 5)^2 = (-8)^2 = 64$.
So you may subtract in whichever order you find easier, even inconsistently between the two brackets, and the answer is unaffected.
What still matters is where the square root sits. It covers the whole sum. Writing $\sqrt{(x_2 - x_1)^2} + \sqrt{(y_2 - y_1)^2}$ computes the two legs and adds them, which is the distance a taxi would drive, not the distance a drone would fly.
Most distances are irrational, so the honest answer is a surd.
Simplify it where a square factor allows. $\sqrt{50} = \sqrt{25 \times 2} = 5\sqrt{2}$, and $\sqrt{98} = \sqrt{49 \times 2} = 7\sqrt{2}$. Where no square factor exists, as in $\sqrt{74}$, the surd is already in simplest form and is a complete answer.
Round only when the question asks, or when the context demands it. A distance on a map is naturally a decimal; a distance inside a proof should stay exact, because rounding early makes later comparisons unreliable.
That last point matters for the next card. Deciding whether two sides are equal is trivial with exact values and genuinely awkward with rounded ones, since $\sqrt{50}$ and $\sqrt{50.01}$ both round to $7.07$.
Given three vertices, three applications of the formula give the three side lengths, and the lengths classify the triangle.
All three different means scalene. Exactly two equal means isosceles. All three equal means equilateral.
To test for a right angle, use the converse of Pythagoras theorem. Identify the longest side, square it, and compare with the sum of the squares of the other two. If they are equal the triangle is right-angled, with the right angle opposite the longest side. If they are not equal, it is not right-angled.
Working with squared lengths makes this painless, since the squares are what the formula produces before the final root. A triangle can be both isosceles and right-angled, and that combination shows up often enough to be worth expecting rather than doubting.
Watch Me Solve It · 3 examples
-
1Find the two differences$x_2 - x_1 = 5 - (-3) = 8$$y_2 - y_1 = 8 - 2 = 6$These are the lengths of the horizontal and vertical legs.
-
2Substitute into the formula$d = \sqrt{8^2 + 6^2} = \sqrt{64 + 36}$Square each difference, then add, and keep the root over the whole sum.
-
3Simplify$d = \sqrt{100} = 10$A perfect square, so the answer is exact and whole. The drone flies $10$ units.
-
1Find the two differences$6 - 1 = 5$$3 - (-4) = 7$Take care with the double negative in the y-difference.
-
2Substitute and simplify$d = \sqrt{5^2 + 7^2} = \sqrt{25 + 49} = \sqrt{74}$Now check for square factors. Since $74 = 2 \times 37$ and neither is a square, the surd is already simplest.
-
3Give the rounded value as well$d = \sqrt{74} \approx 8.60$The exact answer is $\sqrt{74}$; the decimal is the approximation the question also asked for.
-
1Find all three side lengths$AB = \sqrt{4^2 + 3^2} = \sqrt{25} = 5$$BC = \sqrt{3^2 + (-4)^2} = \sqrt{25} = 5$$AC = \sqrt{7^2 + (-1)^2} = \sqrt{50}$Keep everything exact. Rounding here would make the next comparison unreliable.
-
2Compare the lengthsTwo sides are equal, $AB = BC = 5$, so the triangle is isosceles.
-
3Test the longest side with the converse$AC^2 = 50$$AB^2 + BC^2 = 25 + 25 = 50$The longest side is $AC$, since $\sqrt{50} > 5$. Its square equals the sum of the other two squares.
-
4State the conclusionBy the converse of Pythagoras theorem the triangle is right-angled, and the right angle lies opposite $AC$, which is at $B$.
Brain Trainer · 5 problems
Five distance items. Leave every answer exact, simplifying the surd where possible.
-
1 Find the distance between $(0, 0)$ and $(6, 8)$.
$\sqrt{36 + 64}$$10$ -
2 Find the distance between $(-1, -1)$ and $(2, 3)$.
Differences of $3$ and $4$.$5$ -
3 Find the distance between $(2, 5)$ and $(2, -3)$.
A vertical interval, so the horizontal difference is zero.$8$ -
4 Find the distance between $(-3, 4)$ and $(3, -4)$.
$\sqrt{6^2 + 8^2}$$10$ -
5 Find the exact distance between $(1, 2)$ and $(5, 9)$.
$\sqrt{16 + 49}$, and $65 = 5 \times 13$ has no square factor.$\sqrt{65}$
Multiple Choice · 5 questions
The distance between $(0, 0)$ and $(5, 12)$ is:
The distance between $(-2, 3)$ and $(4, 3)$ is:
The exact distance between $(1, 1)$ and $(4, 7)$ is:
Which expression gives the distance between $(x_1, y_1)$ and $(x_2, y_2)$?
A triangle has sides of length $\sqrt{8}$, $\sqrt{8}$ and $4$. The triangle is:
Short Answer · 3 questions
Pythagoras theorem with self-drawn legs
$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$. The interval is the hypotenuse and the legs run parallel to the axes, so their lengths are coordinate differences.
The root covers everything
Square both differences, add them, then take one root of the total. Rooting the terms separately measures the distance along the grid instead.
Order is genuinely free
Squaring removes any negative sign, so unlike the gradient formula, the distance formula does not care which point comes first or whether you are consistent.
Exact values make comparisons possible
Keep surds unsimplified until the end, then simplify. Comparing side lengths and applying the converse of Pythagoras theorem is straightforward with exact squares and awkward with rounded decimals.
Your Badges
0 of 6Mark lesson as complete
Tick when you've finished Learn, Practice and the Stretch. Earns +95 XP and +25 coins.