exupero's blog

# Point-line distance in taxicab geometry

In the previous post I showed how ellipses are octagonal under taxicab geometry and how they degenerate into hexagons and "circular" diamonds. However, before we can talk about other shapes in taxicab geometry, we need to understand how to measure distance between a point and a line.

In the above example, the point is 4 units from the line horizontally, 3 units from the line vertically, and the closest point by Euclidean distance (perpendicular to the line) is somewhere between 3 and 4 units. The distance between the point and the line, then—the shortest distance—is 3 units. In general in taxicab geometry, the distance between a point and a line is always along the horizontal or vertical, and to see why, consider a circle growing from the given point:

The first point of the growing circle to touch the line is one of the corners, and the corners are always on the horizontal or vertical. (The exception, of course, is if the line is at a 45° angle to the axes, in which case an entire side of the circle will touch the line, but the shortest distance between the point and line will still be found at a corner touching the line.)

The illustration above is the start of a visual proof. If you want something more numerical, consider how the distance from a point to a line changes under the Manhattan distance as you slide along the rise and run of a line's slope. What I like about the visual proof is that it works for either taxicab or Euclidean geometry. A Euclidean circle grown from a point will also first touch a line at the spot closest to the circle's center. The shapes are different between Euclidean and taxicab geometry, but the visual logic is the same. I haven't worked out a rigorous numerical proof, but I suspect the logic needed for the taxicab geometry proof differs from the Euclidean proof. If you have suggestions for such a proof, or evidence that they're not really so different, feel free to email me.