INAIO Guide Stage 1 10Coordinate Geometry and Vectors
10.2 Euclidean and Manhattan distance
Compare straight-line Euclidean distance with grid-route Manhattan distance, and choose the metric that fits the question.
“Nearest” depends on how movement is allowed. A drone can travel almost straight to a point, while a robot confined to horizontal and vertical grid paths cannot. Euclidean and Manhattan distances model those two situations.
This is foundational to intermediate coordinate geometry. Learn the distance formula in OpenStax, then compare it with the simple grid-route sum below.
A basic idea: two ways to measure
From to , write and . Straight-line Euclidean distance uses the Pythagorean theorem. Manhattan distance counts horizontal plus vertical movement.
A quick tour of formulas
Both distances are nonnegative, symmetric, and zero only for identical points. For any two points, , with equality only when or . If you only need to compare Euclidean distances, compare their squares and skip square roots; squaring preserves their order because distances are nonnegative.
Application 1: a grid route
Move from to . The horizontal and vertical changes are and .
- A shortest grid route uses unit moves, so .
- A direct path has length .
- Use for a robot limited to axis-aligned moves and for a straight-line route.
Application 2: which candidate is closer?
From the origin, compare and . Euclidean distances are and , so is nearer by straight line. Manhattan distances are and , so is nearer on an axis-aligned grid. State the metric before selecting a nearest point.
Resources
| Source | Title | Why read it |
|---|---|---|
| OpenStax | The rectangular coordinate systems and graphs | Derive the straight-line distance formula. |
Finished this module? Mark it done.
Comments
Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.
Loading comments