From the same starting corner, A is six blocks east and B is four blocks east and four blocks north. B is closer in a straight line, but A is closer along the street grid. The answer changes because the two measurements allow different paths.

Use an imaginary grid with equal-length blocks and perpendicular streets. Every needed street is open in both directions, and grid routes permit horizontal and vertical steps only. Call the starting corner \(O=(0,0)\), with destinations \(A=(6,0)\) and \(B=(4,4)\).

From O at zero zero, A at six zero has straight-line and grid distances of six block lengths. B at four four has a dashed straight-line distance of four square root two, about 5.66, and an eight-block street route.
The dashed diagonal reaches B directly. Its street route needs four vertical blocks and four horizontal blocks.Credit: MathBlog

Measure the direct connections

A lies on the same horizontal line as O, so its straight-line distance is six block lengths. For B, the horizontal and vertical changes are both four. These form the legs of a right triangle, with the direct connection as its hypotenuse.

\[d(O,B)=\sqrt{4^2+4^2}=\sqrt{32}=4\sqrt{2}\approx5.66.\]

Since \(4\sqrt{2}<6\), B is closer by this measure. You can compare the squared distances without rounding: \(32<36\). Both distances are nonnegative, so their order agrees with the order of their squares.

The straight-line distance formula gives the same calculation from any two coordinates. Here, one coordinate unit represents one block length.

Count the required street blocks

Reaching A requires six horizontal blocks. Reaching B requires four horizontal blocks and four vertical blocks. No street-only route can use fewer: it must make up both coordinate changes.

\[d_{\mathrm{grid}}(O,A)=6,\qquad d_{\mathrm{grid}}(O,B)=4+4=8.\]

A route going four blocks north and then four east reaches B in eight blocks, so that lower bound can be achieved. Changing the order leaves the total unchanged, provided the required streets are available. Backtracking adds distance.

Two ways to measure the same destinations
Destination Straight-line distance, in block lengths Shortest grid route, in blocks
A: \((6,0)\) \(6\) \(6\)
B: \((4,4)\) \(4\sqrt{2}\approx5.66\) \(8\)

Use a distance that matches the allowed paths

For two corners \((x_1,y_1)\) and \((x_2,y_2)\), the grid distance is:

\[d_{\mathrm{grid}}=|x_2-x_1|+|y_2-y_1|.\]

The absolute values count how far the route must move in each direction. Going west contributes a positive length just as going east does. This distance is also called city-block or Manhattan distance.

The direct connection to B is shorter, yet it cuts diagonally across blocks. The street-only route must go around those blocks.

A diagonal footpath, a closed street, or unequal block lengths would change this model. Neither calculation alone accounts for signals, traffic, or walking speed. This drawing compares mathematical distances; it does not estimate a real journey’s travel time.

Further reading