2.3.2Coordinate Geometry

Distance formula — derivation using Pythagoras

1,953 words9 min readdifficulty · medium6 backlinks

What Is the Distance Formula?

WHY this formula? Because the shortest path between two points is a straight line, and that line is the hypotenuse of a right triangle whose legs lie along grid lines.

Derivation from First Principles

WHAT we're doing: Constructing a right triangle from coordinate differences, then applying Pythagoras' theorem.

Step-by-Step Construction

Figure — Distance formula — derivation using Pythagoras
  1. Plot the two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2).

  2. Draw horizontal and vertical lines from PP and QQ to form a right triangle:

    • From PP, draw a horizontal line (parallel to xx-axis)
    • From QQ, draw a vertical line (parallel to yy-axis)
    • These meet at point R(x2,y1)R(x_2, y_1)
  3. Find the leg lengths:

    • Horizontal leg PRPR: The yy-coordinate stays at y1y_1, only xx changes from x1x_1 to x2x_2 PR=x2x1PR = |x_2 - x_1| WHY absolute value? Distance is always positive, but x2x1x_2 - x_1 could be negative.

    • Vertical leg QRQR: The xx-coordinate stays at x2x_2, only yy changes from y1y_1 to y2y_2 QR=y2y1QR = |y_2 - y_1|

  4. Apply Pythagoras' Theorem to the right triangle PQRPQR: PQ2=PR2+QR2PQ^2 = PR^2 + QR^2 WHY? In any right triangle, (hypotenuse)² = (leg₁)² + (leg₂)²

  5. Substitute the leg lengths: d2=(x2x1)2+(y2y1)2d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2 WHY no absolute value signs now? Because squaring makes any number positive: (a)2=a2(-a)^2 = a^2

  6. Take the square root: d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} WHY only positive root? Distance cannot be negative.

Worked Examples

Common Mistakes & How to Fix Them

Why This Matters

The distance formula is the foundation of:

  • Analytical geometry (circles, ellipses, hyperbolas all use distance)
  • 3D distance (just add (z2z1)2(z_2 - z_1)^2 under the square root)
  • Optimization problems (finding closest points)
  • Physics (displacement magnitude, distance-time calculations)
Recall Explain It to a 12-Year-Old

Imagine you're at one corner of a rectangular field, and your friend is at the opposite corner. You could walk along the edges (going right, then up), but that's the long way. If you could walk straight across the grass, how far would you go? The answer is the hypotenuse of the rectangle. To find it, you measure how far across (horizontal) and how far up (vertical), then use Pythagoras: square both, add them, take the square root. That's the distance formula! It works even if your friend is in a weird direction (like southwest) because we use coordinate differences that automatically handle direction.

Connections

  • Pythagoras Theorem — the foundation of this derivation
  • Cartesian Coordinate System — the framework where points live
  • Section Formula — uses distance to divide line segments
  • Equation of Circle — defined as all points at fixed distance from center
  • Distance Formula in3D — natural extension to three dimensions
  • Midpoint Formula — related to distance, finds the center point

#flashcards/maths

What is the distance formula for points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2)? :: d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Which theorem is used to derive the distance formula?
Pythagoras' Theorem applied to a right triangle formed by coordinate differences
Why do we square the coordinate differences in the distance formula?
To apply Pythagoras' theorem (hypotenuse² = leg₁² + leg₂²) and to eliminate the need for absolute values (since squaring makes any number positive)
What shape is formed when deriving the distance formula?
A right triangle with horizontal leg (x2x1)(x_2 - x_1), vertical leg (y2y1)(y_2 - y_1), and hypotenuse equal to the distance

Find the distance between (1,2)(1, 2) and (4,6)(4, 6) :: d=(41)2+(62)2=9+16=25=5d = \sqrt{(4-1)^2 + (6-2)^2} = \sqrt{9+16} = \sqrt{25} = 5

True or False: a2+b2=a+b\sqrt{a^2 + b^2} = a + b :: False. You cannot split a square root over addition. This is a common mistake!

If x1=3x_1 = -3 and x2=5x_2 = 5, what is x2x1x_2 - x_1?
5(3)=5+3=85 - (-3) = 5 + 3 = 8 (subtracting a negative equals addition)
Why is the distance formula symmetric?
Swapping the two points gives (x1x2)2+(y1y2)2(x_1 - x_2)^2 + (y_1 - y_2)^2, which equals (x2x1)2+(y2y1)2(x_2 - x_1)^2 + (y_2 - y_1)^2 because squaring eliminates sign changes

What is the distance from origin (0,0)(0, 0) to (3,4)(3, 4)? :: d=32+42=9+16=5d = \sqrt{3^2 + 4^2} = \sqrt{9+16} = 5 (This is a3-4-5 Pythagorean triple)

Why do we only take the positive square root in the distance formula?
Distance is always non-negative; a negative distance has no physical meaning

Concept Map

construct

gives

gives

combined by

combined by

squaring removes abs value

invert with

yields

property

Two points P and Q

Right triangle PQR

Horizontal leg |x2-x1|

Vertical leg |y2-y1|

Pythagoras theorem

Square coordinate differences

Take positive square root

Distance formula d

Symmetric in P and Q

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Distance formula ko samajhne ke liye ek simple visual socho: agar tumhe ek point se dosre point tak jana hai plane pe, toh seedha rasta kya hoga? Yeh straight line jo dono points ko connect karti hai, wohi distance hai. Ab yeh distance nikalne ke liye hum ek clever trick use karte hain — right triangle bana lete hain!

Socho tumhare pas do points hain: P aur Q. Ab tumne P se ek horizontal line draw ki (x-axis ke parallel) aur Q se ek vertical line (y-axis ke parallel). Dono lines jahan milti hain, woh third point R ban jata hai. Ab dekho — PQR ek right triangle hai! PR wali horizontal line ki length hai x2 - x1 (kyunki sirf x-coordinate changehua), aur QR wali vertical line ki length hai y2 - y1. Ab Pythagoras Theorem yad karo: right triangle mein hypotenuse ka square equal hota hai dono sides ke squares ke sum ke. Toh PQ (yani distance d) nikalne ke liye: d² = (x2-x1)² + (y2-y1)². Dono taraf square root lene pe final formula mil jata hai!

Yeh formula bahut powerful hai kyunki yeh har tarah ke points ke liye kaam karta hai — positive, negative, decimals, kuch bhi ho. Aur sabse badi baat, yeh symmetrical hai — matlab P se Q ka distance same hai Q se P ke distance ke. Engineering, physics, computer graphics — sabhi jagah yeh formula use hota hai. Ek baar samajh gaye toh coordinate geometry mein age bahut kuch easy ho jayega!

Go deeper — visual, from zero

Test yourself — Coordinate Geometry

Connections