Intuition Why a whole page of examples?
You already know the distance formula from the parent note — it turns two points into a single straight-line length by building a right triangle and using Pythagoras. But knowing a formula and never being surprised by it are different things. Real problems come in flavours: both points in the same corner of the plane, points straddling the axes, a point sitting on another point, a word problem, an exam trick. This page walks a worked example through every flavour so nothing can ambush you.
Before we start, let's earn each symbol so nothing appears "out of the blue." We name our two points and their four numbers first, then write the formula.
Definition The pieces (defined before the formula uses them)
A point ( x , y ) is a location on the flat grid (Cartesian Coordinate System ): x = how far right (or left if negative), y = how far up (or down if negative).
We always have two points. We label the first one's coordinates x 1 and y 1 (read "x-one", "y-one"), and the second one's x 2 and y 2 ("x-two", "y-two"). The little numbers 1 and 2 are just name tags telling you which point — they are NOT powers.
x 2 − x 1 is the horizontal gap between the two points (a signed number: positive if the second point is to the right).
y 2 − y 1 is the vertical gap (positive if the second point is higher).
d is the straight-line distance — the length of the arrow flying directly from one point to the other. It is always ≥ 0 .
Only now that all four name tags are defined do we state the tool we'll use throughout:
d = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2
Here the little 2 outside a bracket, like ( … ) 2 , is a power ("square it"), while the little 2 inside a name like x 2 is a tag. Watch the position and you'll never confuse them.
Definition What "quadrant" means (so the matrix below makes sense)
The two axes chop the plane into four regions called quadrants . They are numbered anticlockwise starting from the top-right :
Quadrant I — top-right: x > 0 , y > 0 (both positive).
Quadrant II — top-left: x < 0 , y > 0 .
Quadrant III — bottom-left: x < 0 , y < 0 (both negative).
Quadrant IV — bottom-right: x > 0 , y < 0 .
The figure below is your map of exactly this numbering with the example cells dropped into the quadrants they live in — glance at it whenever a quadrant is named.
Figure 1 — the four quadrants, with each scenario cell (A–I) placed at the point-region it belongs to. Alt-text: a cream-coloured coordinate grid; top-right shows cell A, top-left shows cell C2, bottom-left shows cell C, bottom-right shows cell C4, cell B stretches diagonally across, and cells D, E, F, G, H, I are labelled along the axes and centre.
Every distance problem you'll ever meet falls into one of these cells. Each example is tagged with the cell it covers, and Figure 1 shows where each cell sits on the plane — find a cell on that map before reading its example.
Cell
What makes it special
Example
A. Both points in Quadrant I
all coordinates positive — the "easy" case
Ex 1
B. Points in different quadrants
signs mix, subtracting negatives
Ex 2
C. Both in Quadrant III (− , − )
double negatives everywhere
Ex 3
C2. Both in Quadrant II (− , + )
same-sign x 's, mixed traps
Ex 3b
C4. Both in Quadrant IV (+ , − )
same-sign x 's, negative y 's
Ex 3c
D. Purely horizontal / vertical
one gap is zero, triangle collapses
Ex 4
E. Degenerate: same point
distance is exactly 0
Ex 5
F. Irrational answer
can't simplify to a whole number
Ex 6
G. Word problem (real world)
translate words → coordinates → distance
Ex 7
H. Exam twist: unknown coordinate
distance is given, solve backwards
Ex 8
I. Exam twist: prove a shape
use distance to test equal sides
Ex 9
Worked example Example 1 — Cell A: both in Quadrant I
Find the distance between A ( 1 , 2 ) and B ( 4 , 6 ) . (Both sit top-right — Quadrant I on the map.)
Sketch first — see the triangle before touching algebra:
Figure 2 — points A and B with the right triangle: orange hypotenuse (the distance), plum horizontal leg 3 , teal vertical leg 4 . Alt-text: a coordinate grid with a 3-4-5 right triangle drawn from A(1,2) to B(4,6).
Forecast: Both points are up-and-right of the origin, gaps are 3 and 4 ... guess the answer before reading on.
Label x 1 = 1 , y 1 = 2 , x 2 = 4 , y 2 = 6 .
Why this step? Fixing which point is "1" and which is "2" so signs stay consistent.
Horizontal gap x 2 − x 1 = 4 − 1 = 3 ; vertical gap y 2 − y 1 = 6 − 2 = 4 (the two legs in Figure 2).
Why this step? These are the two legs of the right triangle (Pythagoras Theorem ).
Square and add: 3 2 + 4 2 = 9 + 16 = 25 .
Why this step? Pythagoras: hypotenuse2 = leg2 + leg2 .
d = 25 = 5 .
Why this step? Distance is the positive square root.
Verify: Swap the points — A and B reversed give gaps − 3 and − 4 , but ( − 3 ) 2 + ( − 4 ) 2 = 25 too. Same answer ⇒ formula is symmetric. ✓ (Classic 3 -4 -5 triangle.)
Worked example Example 2 — Cell B: different quadrants
Find the distance between P ( − 3 , 2 ) (Quadrant II, top-left) and Q ( 5 , − 4 ) (Quadrant IV, bottom-right).
Sketch first:
Figure 3 — P and Q in opposite quadrants; the right-angle corner R ( 5 , 2 ) ; plum horizontal leg 8 , teal vertical leg 6 , orange hypotenuse 10 . Alt-text: a grid showing an 8-6-10 right triangle spanning quadrants II and IV.
Forecast: The points sit in opposite corners, so expect a bigger distance than Example 1.
Label x 1 = − 3 , y 1 = 2 , x 2 = 5 , y 2 = − 4 .
Why this step? We must nail down which point is "1" and which is "2" before subtracting, or the signs will scramble.
x 2 − x 1 = 5 − ( − 3 ) = 5 + 3 = 8 (the plum leg in Figure 3).
Why this step? Subtracting a negative flips it to addition — the single most common slip.
y 2 − y 1 = − 4 − 2 = − 6 (the teal leg).
Why this step? The second point is lower, so the vertical gap is negative — fine, we'll square it.
8 2 + ( − 6 ) 2 = 64 + 36 = 100 .
Why this step? Squaring kills the minus sign: ( − 6 ) 2 = 36 , never − 36 .
d = 100 = 10 .
Why this step? The distance is the positive square root of the sum of squares.
Verify: The gaps 8 and 6 are just a doubled 4 -3 , so the distance is a doubled 5 = 10 . ✓
Worked example Example 3 — Cell C: both in Quadrant III (
− , − )
Find the distance between E ( − 6 , − 2 ) and F ( − 1 , − 5 ) (both bottom-left — Quadrant III).
Sketch first:
Figure 4 — E and F both in the bottom-left, with the right triangle: plum leg 5 , teal leg 3 , orange hypotenuse 34 . Alt-text: a grid with a small right triangle drawn entirely in quadrant III.
Forecast: Everything's negative — but distance can't be negative, so watch the squaring.
Label x 1 = − 6 , y 1 = − 2 , x 2 = − 1 , y 2 = − 5 .
Why this step? Committing to which point is "1" and "2" keeps every following subtraction in the correct order.
x 2 − x 1 = − 1 − ( − 6 ) = − 1 + 6 = 5 .
Why this step? Double negative again → addition.
y 2 − y 1 = − 5 − ( − 2 ) = − 5 + 2 = − 3 .
Why this step? Same trick on the y side.
5 2 + ( − 3 ) 2 = 25 + 9 = 34 .
Why this step? Pythagoras again: square each leg (the minus vanishes) and add to get the hypotenuse squared.
d = 34 .
Why this step? 34 has no perfect-square factor, so 34 is already the simplest exact form — we keep it as a surd and do not round.
Verify: 5 2 = 25 < 34 < 36 = 6 2 , so d lies between 5 and 6 ; a decimal check gives 34 ≈ 5.83 , which sits in that window. ✓ (Use 34 in exact/exam work; the decimal is only for a quick size check — see the note after Example 6.)
Worked example Example 3b — Cell C2: both in Quadrant II (
− , + )
Find the distance between U ( − 7 , 5 ) and V ( − 2 , 1 ) (both top-left — Quadrant II).
Forecast: Both x 's are negative, both y 's are positive. Same-quadrant, but the negatives still hide a trap in the x -gap.
Label x 1 = − 7 , y 1 = 5 , x 2 = − 2 , y 2 = 1 .
Why this step? Both points share the sign pattern ( − , + ) ; fixing tags keeps subtractions ordered.
x 2 − x 1 = − 2 − ( − 7 ) = − 2 + 7 = 5 .
Why this step? Two negatives in the x -slot — subtracting − 7 becomes + 7 , the same trap as Example 3.
y 2 − y 1 = 1 − 5 = − 4 .
Why this step? Both y 's positive but the second is lower, so the vertical gap is negative — we'll square it away.
5 2 + ( − 4 ) 2 = 25 + 16 = 41 .
Why this step? Pythagoras: square each leg, signs vanish, add.
d = 41 .
Why this step? 41 is prime → no square factor → keep it as an exact surd.
Verify: 6 2 = 36 < 41 < 49 = 7 2 , so 6 < d < 7 ; indeed 41 ≈ 6.40 . ✓
Worked example Example 3c — Cell C4: both in Quadrant IV (
+ , − )
Find the distance between W ( 3 , − 1 ) and Z ( 11 , − 7 ) (both bottom-right — Quadrant IV).
Forecast: Both x 's positive, both y 's negative. The x -gap is easy this time, but the y -gap needs the double-negative care.
Label x 1 = 3 , y 1 = − 1 , x 2 = 11 , y 2 = − 7 .
Why this step? Both points share the pattern ( + , − ) ; tag them so the subtraction order is locked.
x 2 − x 1 = 11 − 3 = 8 .
Why this step? Both x 's positive → a plain subtraction, no trap here.
y 2 − y 1 = − 7 − ( − 1 ) = − 7 + 1 = − 6 .
Why this step? Subtracting a negative in the y -slot: − 7 − ( − 1 ) = − 6 , the trap moves to y this time.
8 2 + ( − 6 ) 2 = 64 + 36 = 100 .
Why this step? Pythagoras: square each leg, minus vanishes, add.
d = 100 = 10 .
Why this step? Perfect square → whole-number distance (8 -6 -10 triangle again).
Verify: 8 2 + 6 2 = 100 = 1 0 2 — a scaled 4 -3 -5 . ✓
Worked example Example 4 — Cell D: purely horizontal / vertical
(a) Distance between G ( 2 , 7 ) and H ( 9 , 7 ) . (b) Distance between J ( − 4 , 1 ) and K ( − 4 , 8 ) .
Sketch first — both collapsed triangles at once:
Figure 5 — the orange horizontal segment G H (length 7 , vertical gap 0 ) and the teal vertical segment J K (length 7 , horizontal gap 0 ). Alt-text: a grid showing one horizontal line and one vertical line, each of length 7, where the right triangle has flattened into a single segment.
Forecast: In each, one coordinate never changes — the triangle flattens into a single line (as Figure 5 shows). Guess: distance = just the one gap.
Part (a): y is 7 for both, so y 2 − y 1 = 0 . Then d = ( 9 − 2 ) 2 + 0 2 = 49 = 7 .
Why this step? When one leg is zero, Pythagoras reduces to the other leg's length, and ( 9 − 2 ) 2 = ∣9 − 2∣ = 7 — the square-then-root is just the absolute value of the single gap.
Part (b): x is − 4 for both, so x 2 − x 1 = 0 . Then d = 0 2 + ( 8 − 1 ) 2 = 49 = 7 .
Why this step? Same logic on the vertical side: ( 8 − 1 ) 2 = ∣8 − 1∣ = 7 , so the distance is just the length of the vertical gap.
Verify: A horizontal or vertical distance is simply ∣ x 2 − x 1 ∣ or ∣ y 2 − y 1 ∣ : ∣9 − 2∣ = 7 and ∣8 − 1∣ = 7 . ✓ The formula agrees with plain counting.
Worked example Example 5 — Cell E: the degenerate case (same point)
Find the distance between S ( 3 , − 5 ) and T ( 3 , − 5 ) .
Forecast: They're the same point. How far is a point from itself?
x 2 − x 1 = 3 − 3 = 0 and y 2 − y 1 = − 5 − ( − 5 ) = 0 .
Why this step? Identical coordinates ⇒ both gaps vanish.
d = 0 2 + 0 2 = 0 = 0 .
Why this step? Both legs are zero, so the triangle has shrunk to nothing.
Verify: Distance = 0 only when the points coincide — this is the one and only case where d = 0 . Any real gap makes the sum-of-squares strictly positive. ✓
Worked example Example 6 — Cell F: irrational answer
Find the distance between M ( 0 , 0 ) and N ( 2 , 3 ) .
Forecast: Small numbers, but will the root be "nice"?
Gaps: 2 − 0 = 2 and 3 − 0 = 3 .
Why this step? From the origin, gaps are just the target's coordinates.
2 2 + 3 2 = 4 + 9 = 13 .
Why this step? Pythagoras: square each leg and add to build the hypotenuse squared.
d = 13 .
Why this step? 13 has no square factors, so 13 won't simplify.
Verify: Leaving it as 13 is the exact answer; the decimal ≈ 3.606 is only a rounding. Sanity check: 3 2 = 9 < 13 < 16 = 4 2 , so 3 < d < 4 . ✓
Intuition Exact form vs. decimal — when to use which
When the number under the root is not a perfect square (like 34 , 41 or 13 ), the surd is the answer: it is exact and loses nothing. Prefer it in geometry proofs, exams, and any further algebra. Use a decimal (≈ 5.83 , ≈ 6.40 , ≈ 3.61 ) only for a quick "does the size look right?" check or when a real-world context demands a measured number (e.g. "about 5.8 km"). Never write a rounded decimal as if it were the exact answer.
Worked example Example 7 — Cell G: real-world word problem
A drone starts at a launchpad at position ( 2 , 1 ) km and flies to a delivery point at ( 8 , 9 ) km on the same map. How far did it travel in a straight line?
Forecast: "Same map" means the coordinates share units (km), so the answer will be in km. Guess a whole number?
Translate words → points: start ( 2 , 1 ) , end ( 8 , 9 ) .
Why this step? The distance formula needs coordinates, not sentences.
Gaps: 8 − 2 = 6 km east, 9 − 1 = 8 km north.
Why this step? These horizontal and vertical gaps are the two legs of the right triangle whose hypotenuse is the flight path.
6 2 + 8 2 = 36 + 64 = 100 .
Why this step? Pythagoras: square each leg and add to get the straight-line distance squared.
d = 100 = 10 km.
Why this step? Straight-line flight = hypotenuse of the east/north right triangle; take the positive root.
Verify: Units: km2 under the root → km after the root. ✓ Also 6 -8 -10 is a scaled 3 -4 -5 . If the drone had driven along roads (east then north) it would cover 6 + 8 = 14 km — the flight saving is real.
Worked example Example 8 — Cell H: exam twist, unknown coordinate
Point A ( 1 , 3 ) is exactly 5 units from B ( x , 6 ) . Find all possible x .
Forecast: The distance is given ; we run the formula in reverse. Expect maybe two answers (left and right).
Set up: ( x − 1 ) 2 + ( 6 − 3 ) 2 = 5 .
Why this step? The formula equals the known distance 5 .
Square both sides: ( x − 1 ) 2 + 3 2 = 25 .
Why this step? Removing the root to get a plain equation.
( x − 1 ) 2 + 9 = 25 ⇒ ( x − 1 ) 2 = 16 .
Why this step? Compute 3 2 = 9 , then subtract 9 from both sides to isolate the unknown square on its own.
x − 1 = ± 4 , so x = 5 or x = − 3 .
Why this step? A square root has two signs — the ± is the whole point of this twist. Two answers because B could be right of or left of A .
Verify: x = 5 : ( 5 − 1 ) 2 + 3 2 = 16 + 9 = 25 = 5 ✓. x = − 3 : ( − 3 − 1 ) 2 + 3 2 = 16 + 9 = 5 ✓. Both work.
Worked example Example 9 — Cell I: exam twist, prove a shape
Show that P ( 0 , 0 ) , Q ( 4 , 0 ) , R ( 4 , 3 ) , and the claim "P QR has a right angle at Q " — check by finding all three side lengths and testing Pythagoras.
Forecast: If P Q 2 + Q R 2 = P R 2 , the angle at Q is a right angle.
P Q = ( 4 − 0 ) 2 + ( 0 − 0 ) 2 = 16 = 4 .
Why this step? We need the length of side P Q ; the vertical gap is 0 , so this is a purely horizontal side.
QR = ( 4 − 4 ) 2 + ( 3 − 0 ) 2 = 9 = 3 .
Why this step? We need the length of side QR ; the horizontal gap is 0 , so this is a purely vertical side.
P R = ( 4 − 0 ) 2 + ( 3 − 0 ) 2 = 16 + 9 = 25 = 5 .
Why this step? This is the third side (the potential hypotenuse), needed to run the Pythagoras test.
Test: P Q 2 + Q R 2 = 16 + 9 = 25 = P R 2 . True ⇒ right angle at Q . ✓
Why this step? Pythagoras' converse: if the two shorter sides squared add to the longest side squared, the angle between them is 9 0 ∘ .
Verify: 4 2 + 3 2 = 25 = 5 2 . The equality holds exactly, confirming the right angle. This is exactly how the Equation of Circle and shape-proof problems use distance.
Instead of re-reading the table, look at the recap figure below: every cell (A–I plus the two extra same-quadrant cases) is shown with its answer pinned to its map location, so you can see at a glance which region of the plane each trap lives in.
Figure 6 — the completed scenario matrix as a visual recap: each example's short answer placed on the quadrant map. Alt-text: a coordinate grid with labelled tags showing d=5 (Q I), d=10 (across quadrants), d=√34 (Q III), d=√41 (Q II), d=10 (Q IV), d=7 (horizontal/vertical lines), d=0 (same point), and the reverse-problem x=5 or −3.
Recall Self-test: which example killed which trap?
Same-quadrant positive (Q I) ::: Example 1 — plain 3-4-5
Mixed quadrants, subtracting a negative ::: Example 2 — 8-6-10
Both in Q III (− , − ) ::: Example 3 — 34
Both in Q II (− , + ) ::: Example 3b — 41
Both in Q IV (+ , − ) ::: Example 3c — 10
One gap zero (horizontal/vertical line) ::: Example 4 — 7
Same point, distance 0 ::: Example 5
Irrational answer ::: Example 6 — 13
Word problem with units ::: Example 7 — 10 km
Given distance, solve for a coordinate (two answers) ::: Example 8 — x = 5 or − 3
Prove a right angle using three distances ::: Example 9
Mnemonic The reverse-problem reminder
When the distance is given and a coordinate is unknown (Cell H), always expect a ± — the point can lie on either side. Forgetting one answer loses marks.