Loading...
April 8, 2025 at 8:25
English

Taxicab Geometry Explained: Manhattan Distance, L1 Metric, and Why π Equals 4

What Is Taxicab Geometry?

Imagine you’re a cab driver on the streets of New York City. Your task is simple: get from point A to point B as fast as possible. Instinctively, you’d want to cut across diagonally — but in a city built on a rectangular grid, that’s not an option. You have to follow the blocks, moving strictly north and east.

This is the intuition behind taxicab geometry, also known as Manhattan geometry. Here, the shortest distance between points A(x₁, y₁) and B(x₂, y₂) is not a straight line — it’s the sum of the absolute differences of their coordinates:

d = |x₂ − x₁| + |y₂ − y₁|

The L1 Metric and Its Relationship to Euclidean Distance

This distance is also known as the L₁ metric, or Minkowski distance of order 1. Unlike the Euclidean metric — where distance is measured in a straight line, as in the Pythagorean theorem — the taxicab metric only accounts for permitted directions of movement. It’s as if you really are inside a city and turning off the grid simply isn’t allowed.

Key Properties of Taxicab Geometry

Manhattan distance behaves differently from what most of us learned in school. Here are its defining characteristics:

  • Depends on the rotation of the coordinate system (rotating the grid breaks everything)
  • Invariant under translations and reflections
  • Satisfies all of Hilbert’s axioms except the equality of angles
  • A circle becomes a rhombus, and π equals 4

Taxicab Geometry Example: Equal-Length Paths on a Grid

Consider all paths from (0, 0) to (6, 6) that follow the grid strictly — moving only along horizontal and vertical segments. Every such path has the same length: 12 units. And the number of distinct such paths is 924.

This is a clean illustration of why taxicab geometry is counterintuitive: there is no single shortest route, but a vast family of equally optimal ones.

Real-World Applications of the Manhattan Distance

Taxicab geometry is far from an abstract curiosity. It shows up across a surprising range of practical domains:

  • Navigation and logistics — including GPS routing algorithms
  • Data compression and machine learning — for example, in LASSO regression, which uses L₁ regularization
  • Image processing — where pixel distances are naturally grid-based
  • Chess — the king moves in exactly taxicab geometry, one step at a time in any of eight directions

History of Taxicab Geometry: Menger and Minkowski

The term “taxicab geometry” was first introduced by Karl Menger in 1952, in a booklet created for the exhibition “You Will Like Geometry” held in Chicago. The formal mathematical foundation, however, was laid by Hermann Minkowski — the same mathematician behind Minkowski space, which later became the geometric backbone of Einstein’s special theory of relativity.

Why π Equals 4 in Taxicab Geometry

In taxicab geometry, a “circle” — the set of all points equidistant from a center — is actually a square rotated 45 degrees. Its perimeter is 8r. Applying the standard definition of π as the ratio of circumference to diameter gives:

π = 8r / (2r) = 4

The diameter is no longer tied to a square root, but it remains central to how distance is defined. It’s the same concept, playing by entirely different rules.

Euclidean vs. Manhattan Distance: Who Benefits?

If the diagonal distance between two points is approximately 8.49 in Euclidean geometry, but always 12 in taxicab geometry — which world is easier to live in? For a pedestrian navigating a city grid, the Manhattan metric describes reality more faithfully. For a route-planning engineer trying to optimize paths, knowing which metric applies can be the difference between an efficient algorithm and a broken one.

Taxicab geometry is a reminder that distance is not an absolute truth — it’s a choice of metric, shaped by the constraints of the world you’re moving through.

keyboard_arrow_up