Taxicab Geometry
Measure distance the way a taxi drives it, block by block along the streets, and watch circles turn into diamonds
This concept builds on Pythagorean Theorem — Built from Squares, Combinatorics — The Art of Counting Possibilities. Consider exploring them first for the best experience.
One Block Is the Unit
Start with the smallest part: one city block. The yellow taxi at the green corner A can only drive along the streets, one block at a time, east, west, north or south. It cannot cut through the grey buildings. So in this city, distance is not measured with a ruler but by counting blocks. Watch the taxi drive to the pink corner B: the 'Taxicab distance' readout is simply the number of blocks it passes, 11 at the start.
Add the Two Directions
The trip splits into two separate parts: 7 blocks east and 4 blocks north, shown in the 'Moves from A to B' readout. Every east move and every north move must happen somewhere along the way, and nothing else is needed, so the taxicab distance is the east–west gap plus the north–south gap: 7 + 4 = 11. Drag B to another corner and check that the two readouts always add up this way.
Many Routes, One Length
Press 'New route'. The taxi takes a different path, turning at different corners, yet the length never changes. Every shortest route uses exactly the same moves, 7 east and 4 north, just in a different order. A route is only longer if it doubles back, for example a block west that must later be undone by an extra block east. The 'Shortest routes' readout counts how many different orders there are: 330 for this trip.
Worked Example: Counting Routes
Drag B so it sits 4 blocks east and 2 blocks north of A. The taxicab distance is 4 + 2 = 6 blocks. A shortest route is any order of those 6 moves, and choosing which 2 of the 6 are north fixes the route, so there are 6 × 5 ÷ 2 = 15 routes. The straight line is √(16 + 4) = √20 ≈ 4.47 blocks, so the streets are 6 ÷ 4.47 ≈ 1.34 times longer.
Pascal's Triangle in the Streets
Choose 'Count the routes' in the 'Show' menu. Every corner between A and B now shows how many shortest routes reach it from A. The last move into a corner comes either along the east–west street or along the north–south street, so each number is the sum of the two neighbours on the A side. Corners along A's own streets show 1. Tilt your head so A is on top and the numbers are the rows of Pascal's triangle.
Streets Against the Straight Line
Watch the 'Streets ÷ straight line' readout as you drag B. Put B on the same street as A and it is exactly 1: no detour at all. Put B on a perfect diagonal, 3 blocks east and 3 north, and it reaches 6 ÷ 4.24 ≈ 1.41, which is √2. That is the largest it can ever be, so a street trip is never more than about 41% longer than the straight line.
A Circle Shaped Like a Square
Choose 'Taxicab circle' in the 'Show' menu. A circle is every point the same distance from a centre. By street distance, the corners exactly 2 blocks from A line up into a diamond, a square turned 45°, beside the dashed ordinary circle. Move the 'Radius' slider: radius r always gives 4r corners. Measured in blocks the diamond's perimeter is 8r and its diameter 2r, so in this geometry π equals 4.
How It Works — Step by Step
-
1
One Block Is the Unit
Start with the smallest part: one city block. The yellow taxi at the green corner A can only drive along the streets, one block at a time, east, west, north or south. It cannot cut through the grey buildings. So in this city, distance is not measured with a ruler but by counting blocks. Watch the taxi drive to the pink corner B: the 'Taxicab distance' readout is simply the number of blocks it passes, 11 at the start.
-
2
Add the Two Directions
The trip splits into two separate parts: 7 blocks east and 4 blocks north, shown in the 'Moves from A to B' readout. Every east move and every north move must happen somewhere along the way, and nothing else is needed, so the taxicab distance is the east–west gap plus the north–south gap: 7 + 4 = 11. Drag B to another corner and check that the two readouts always add up this way.
-
3
Many Routes, One Length
Press 'New route'. The taxi takes a different path, turning at different corners, yet the length never changes. Every shortest route uses exactly the same moves, 7 east and 4 north, just in a different order. A route is only longer if it doubles back, for example a block west that must later be undone by an extra block east. The 'Shortest routes' readout counts how many different orders there are: 330 for this trip.
-
4
Worked Example: Counting Routes
Drag B so it sits 4 blocks east and 2 blocks north of A. The taxicab distance is 4 + 2 = 6 blocks. A shortest route is any order of those 6 moves, and choosing which 2 of the 6 are north fixes the route, so there are 6 × 5 ÷ 2 = 15 routes. The straight line is √(16 + 4) = √20 ≈ 4.47 blocks, so the streets are 6 ÷ 4.47 ≈ 1.34 times longer.
-
5
Pascal's Triangle in the Streets
Choose 'Count the routes' in the 'Show' menu. Every corner between A and B now shows how many shortest routes reach it from A. The last move into a corner comes either along the east–west street or along the north–south street, so each number is the sum of the two neighbours on the A side. Corners along A's own streets show 1. Tilt your head so A is on top and the numbers are the rows of Pascal's triangle.
-
6
Streets Against the Straight Line
Watch the 'Streets ÷ straight line' readout as you drag B. Put B on the same street as A and it is exactly 1: no detour at all. Put B on a perfect diagonal, 3 blocks east and 3 north, and it reaches 6 ÷ 4.24 ≈ 1.41, which is √2. That is the largest it can ever be, so a street trip is never more than about 41% longer than the straight line.
-
7
A Circle Shaped Like a Square
Choose 'Taxicab circle' in the 'Show' menu. A circle is every point the same distance from a centre. By street distance, the corners exactly 2 blocks from A line up into a diamond, a square turned 45°, beside the dashed ordinary circle. Move the 'Radius' slider: radius r always gives 4r corners. Measured in blocks the diamond's perimeter is 8r and its diameter 2r, so in this geometry π equals 4.
Key Takeaways
Distance is a sum of blocks
Moving only along a grid, the distance between two corners is the east–west gap plus the north–south gap.
Shortest routes are orderings
Every shortest route uses the same moves in a different order, so counting routes is choosing which moves go north: n choose k.
Streets are at most √2 times longer
The street distance equals the straight line along one street and is about 1.41 times longer on a perfect diagonal.
Change the distance, change the shapes
With street distance, a circle becomes a diamond with 4r corners and a perimeter of 8r, so π comes out as 4.
Connected Concepts
Pythagorean Theorem
The dashed straight line is the hypotenuse; the taxi drives the two legs instead, so its trip is a + b rather than √(a² + b²).
Pascal's Triangle
Label each street corner with its number of shortest routes and the rows of Pascal's triangle appear diagonally across the grid.
Combinatorics
A shortest route is a choice of which moves go north; counting those choices is n choose k.
Voronoi Diagrams
Split a city by nearest taxi rank using street distance and the borders bend into right angles and 45° steps.
Dijkstra's Algorithm
On a real street map with one-way streets and traffic, Dijkstra's algorithm finds the shortest route that this simple formula cannot.
Unit Circle
The ordinary unit circle is all points 1 away by a ruler; measured by streets the same definition draws a diamond.