The Distance Formula: One Equation for Every Distance
The Pythagorean theorem packaged into a single algebraic equation — and why squaring kills every sign you might worry about
AI Generation Prompt
Ultra-wide cinematic banner (16:5 ratio). A vast starry navy sky with a single elegant mathematical equation written in glowing golden light stretching horizontally across the upper third: d = √((x₂−x₁)² + (y₂−y₁)²). Below, a faint Cartesian coordinate plane stretches into the horizon, with many faint pairs of points scattered across it — each pair connected by a soft beam of light that flows up and into the equation, symbolising that this single formula contains every possible distance. Painterly cinematic illustration of mathematical wonder. Dark background. No text in foreground other than the equation itself.
On the previous page you found three distances , , — each by drawing a fresh right triangle and computing its hypotenuse. It worked, but it was a lot of separate steps for what feels like one operation: find the distance between two points.
Is there a single formula — one equation, applicable to any two points and — that gives the distance immediately?
Look back at the three calculations on Page 9. Each one had the same structure: . The legs were just and . Can you write this once for any pair?
From the Līlāvatī of Bhāskara II (1150 CE)
कोटिवर्गयुतेन भुजवर्गेण विभक्तेन
कर्णवर्गः समायाति इति शुल्बस्य निश्चयः॥
(koṭi-varga-yutena bhuja-vargeṇa vibhaktena / karṇa-vargaḥ samāyāti iti śulbasya niścayaḥ)
'भुजा का वर्ग और कोटि का वर्ग जोड़ने पर कर्ण का वर्ग बनता है — यही शुल्ब-शास्त्र का निश्चय है।'
'The square of the base added to the square of the perpendicular gives the square of the hypotenuse — this is the conclusion of the Śulba.'
Bhāskarāchārya, writing in 1150 CE, restated Baudhāyana's 800 BCE result in a single Sanskrit verse — and added that this is "niścaya", the settled conclusion. The distance formula on this page is exactly this verse, written in modern algebraic notation. The mathematics of distance has not changed for 2,800 years; only the symbols have.
From three triangles to one formula
On the previous page, finding , , each followed exactly the same recipe:
- Find the horizontal separation: .
- Find the vertical separation: .
- Apply Baudhāyana–Pythagoras: distance² = (horizontal)² + (vertical)².
- Take the square root.
Let me write this with general coordinates. Suppose the two points are and . Then:
- Horizontal separation:
- Vertical separation:
- Distance² =
- Distance =
This last line is the distance formula. Notice an important simplification: the absolute-value bars disappear when we square the differences, because for any real numbers. Squaring kills the sign. So we don't need to worry about which point we call and which one we call — the answer is the same.
AI Generation Prompt
Cartesian plane diagram on green graph paper over a dark background. Two points labelled A(x₁, y₁) at the upper-left and D(x₂, y₂) at the lower-right are connected by a thick green diagonal segment. A right triangle is constructed with two dashed thin legs: one horizontal from A's x-coordinate level to D, labelled '(x₂ − x₁)' below; one vertical from A down to the foot at (x₁, y₂), labelled '(y₂ − y₁)' to the side. A small right-angle marker (square) is shown at the corner where the legs meet. The diagonal hypotenuse is labelled in elegant text: '√((x₂ − x₁)² + (y₂ − y₁)²)'. Style: clean educational mathematics illustration, generic-coordinate notation. Dark background, orange accent labels, clean technical illustration style.
Re-deriving the Page-9 results from the formula
Loading simulator…
In the distance formula , suppose I swap and — i.e., I rename point 1 as point 2 and vice versa. Does the answer change?
The Distance Formula — Memorise This One Equation
For any two points and in the plane:
Special case — distance from the origin:
Properties to remember:
- always — distance is non-negative.
- if and only if .
- — distance is symmetric.
- The formula works in all four quadrants without modification — squaring handles all signs.
Practice Set — Twelve Problems for Drill
Cover the answers and solve each. Aim for accuracy first, speed second.
Find the distance between:
- and
- and
- and
- and
- and
- and
- and
- and
- and
- and
- and (same x)
- and
Answers: 1. 5 · 2. 5 · 3. 5 · 4. 25 · 5. 13 · 6. 10 · 7. 10 · 8. 2 · 9. 5 · 10. · 11. 10 (vertical segment) · 12. 13 (a 5-12-13 triangle in disguise).
Self-check rule: If your answer is negative, you've forgotten that distance is non-negative — recheck your squaring. If your answer is larger than the simple sum , it's wrong — the diagonal of a right triangle is always shorter than the sum of its legs.
Bridging Science and Society — Where the Distance Formula Lives Today
The distance formula is one of the most heavily-used pieces of mathematics in the modern world. Every minute, billions of computations of this exact formula happen on devices around the planet:
Ready to Go Beyond
Closely related formulas you'll meet later:
Q1.Find the distance between and .
AI Generation Prompt
Ultra-wide cinematic banner (16:5 ratio). A vast starry navy sky with a single elegant mathematical equation written in glowing golden light stretching horizontally across the upper third: d = √((x₂−x₁)² + (y₂−y₁)²). Below, a faint Cartesian coordinate plane stretches into the horizon, with many faint pairs of points scattered across it — each pair connected by a soft beam of light that flows up and into the equation, symbolising that this single formula contains every possible distance. Painterly cinematic illustration of mathematical wonder. Dark background. No text in foreground other than the equation itself.
On the previous page you found three distances , , — each by drawing a fresh right triangle and computing its hypotenuse. It worked, but it was a lot of separate steps for what feels like one operation: find the distance between two points.
Is there a single formula — one equation, applicable to any two points and — that gives the distance immediately?
Look back at the three calculations on Page 9. Each one had the same structure: . The legs were just and . Can you write this once for any pair?
From the Līlāvatī of Bhāskara II (1150 CE)
कोटिवर्गयुतेन भुजवर्गेण विभक्तेन
कर्णवर्गः समायाति इति शुल्बस्य निश्चयः॥
(koṭi-varga-yutena bhuja-vargeṇa vibhaktena / karṇa-vargaḥ samāyāti iti śulbasya niścayaḥ)
'भुजा का वर्ग और कोटि का वर्ग जोड़ने पर कर्ण का वर्ग बनता है — यही शुल्ब-शास्त्र का निश्चय है।'
'The square of the base added to the square of the perpendicular gives the square of the hypotenuse — this is the conclusion of the Śulba.'
Bhāskarāchārya, writing in 1150 CE, restated Baudhāyana's 800 BCE result in a single Sanskrit verse — and added that this is "niścaya", the settled conclusion. The distance formula on this page is exactly this verse, written in modern algebraic notation. The mathematics of distance has not changed for 2,800 years; only the symbols have.
From three triangles to one formula
On the previous page, finding , , each followed exactly the same recipe:
- Find the horizontal separation: .
- Find the vertical separation: .
- Apply Baudhāyana–Pythagoras: distance² = (horizontal)² + (vertical)².
- Take the square root.
Let me write this with general coordinates. Suppose the two points are and . Then:
- Horizontal separation:
- Vertical separation:
- Distance² =
- Distance =
This last line is the distance formula. Notice an important simplification: the absolute-value bars disappear when we square the differences, because for any real numbers. Squaring kills the sign. So we don't need to worry about which point we call and which one we call — the answer is the same.
AI Generation Prompt
Cartesian plane diagram on green graph paper over a dark background. Two points labelled A(x₁, y₁) at the upper-left and D(x₂, y₂) at the lower-right are connected by a thick green diagonal segment. A right triangle is constructed with two dashed thin legs: one horizontal from A's x-coordinate level to D, labelled '(x₂ − x₁)' below; one vertical from A down to the foot at (x₁, y₂), labelled '(y₂ − y₁)' to the side. A small right-angle marker (square) is shown at the corner where the legs meet. The diagonal hypotenuse is labelled in elegant text: '√((x₂ − x₁)² + (y₂ − y₁)²)'. Style: clean educational mathematics illustration, generic-coordinate notation. Dark background, orange accent labels, clean technical illustration style.
Re-deriving the Page-9 results from the formula
Loading simulator…
In the distance formula , suppose I swap and — i.e., I rename point 1 as point 2 and vice versa. Does the answer change?
Bridging Science and Society — Where the Distance Formula Lives Today
The distance formula is one of the most heavily-used pieces of mathematics in the modern world. Every minute, billions of computations of this exact formula happen on devices around the planet:
Ready to Go Beyond
Closely related formulas you'll meet later:
Q1.Find the distance between and .