Along an axis, or a segment parallel to one, distance is easy:
- between (x₁, y) and (x₂, y): |x₂ − x₁|
- between (x, y₁) and (x, y₂): |y₂ − y₁|
For a slanting segment, use the Baudhāyana–Pythagoras theorem.
Triangle ADM: A (3, 4), D (7, 1), M (9, 6), an acute-angled triangle in Quadrant I.
Moving from A to D: along the x-axis CD = 7 − 3 = 4; along the y-axis AC = 4 − 1 = 3, where C (3, 1) makes a right angle. So
AD = √(4² + 3²) = √25 = 5 units.
Similarly DM = √(2² + 5²) = √29 and MA = √(6² + 2²) = √40 units.
📌
Distance formula: the distance between (x₁, y₁) and (x₂, y₂) is √[(x₂ − x₁)² + (y₂ − y₁)²].
It doesn't matter whether x₂ − x₁ or y₂ − y₁ is positive or negative: we square them.
Tap the diagram to enlarge it
📌 Remember these
- AD = 5
- DM = √29, MA = √40
- Square the differences