Straight-line distance between Point A and Point B
Distance Squared25
Manhattan Distance7
Delta x (x2 - x1)3
Delta y (y2 - y1)4
Euclidean Distance5
Manhattan Distance7
▸
Euclidean distance: 5.000000
The Manhattan distance (7.0000) is 1.40x the Euclidean distance - the straight-line path is always shorter than or equal to the city-block path.
The squared distance (25.0000) is useful when you only need to compare distances, since it avoids the cost of a square root.
In 2D space, the Euclidean distance is the length of the straight line segment connecting the two points, following the generalized Pythagorean theorem.
Next stepUse the squared distance when ranking or comparing multiple pairs of points - it avoids the square root and gives the same ordering.