Every map app answers two questions in a second or two: how far is it, and how long will it take. Behind those answers is high school math worth understanding, because it explains why the route never matches a ruler laid on the map and why the mental math for average speed usually comes out wrong. Let’s redo those calculations by hand, using round, hypothetical numbers.
Two ways to measure distance
Place the map on a coordinate plane, with the -axis pointing east and the -axis pointing north, measured in miles. A starting point and a destination give two displacements: horizontally and vertically.
If you could fly in a straight line, your path would be the hypotenuse of a right triangle whose legs are those displacements. That is the Euclidean distance, which is exactly what the Pythagorean theorem computes.
In a city laid out on a grid, like much of Manhattan or Chicago, you can’t cut diagonally through blocks. You have to cover the entire east-west gap and the entire north-south gap. The shortest street route has a length equal to the sum of the absolute displacements. That is taxicab distance, also called Manhattan distance or the metric.
Both are genuine distances in the mathematical sense: positive between distinct points, symmetric, and they satisfy the triangle inequality. But they measure different things. It is always true that . The left side is an equality when the destination is on the same street (one displacement is zero); the right side, when the east-west and north-south displacements are equal. In other words, driving on a grid costs at most about 41% more than the straight line.
Map scale: from paper to the ground
A paper map states its scale as a ratio. A classic US example is 1:63,360, which means 1 inch on the map equals 63,360 inches on the ground, and 63,360 inches is exactly 1 mile. Because it is a direct proportion, one multiplication does the job: real distance = map distance × scale denominator. The catch is converting units before you compare. Mixing inches, feet and miles is the most common slip.
Average speed and estimated time
Travel time estimates rely on the definition of average speed: , so . Simple enough, but there is a classic trap. When a trip has legs driven at different speeds, the average speed for the whole trip is not the average of the speeds. It is total distance divided by total time. When the legs cover equal distances, that works out to the harmonic mean.
Intuition: you spend more time on the slow leg. Since the average is weighted by time, the slow leg counts more, and the result lands below the arithmetic mean. By the inequality of means, the harmonic mean never exceeds the arithmetic mean, and they are equal only when .
Worked example
A hypothetical setup. Your apartment is at and the library at , in miles, in a neighborhood with a grid of streets. We want the straight-line distance, the shortest street route, the length of the segment on a 1:63,360 map, and then the average speed of a round trip to another town.
- Find the displacements: $\Delta x=3-0=3$ mi and $\Delta y=4-0=4$ mi.
- Straight-line distance from the Pythagorean theorem.
- Taxicab distance: add the absolute displacements.
- Compare: 7 divided by 5 is 1.4. The street route is 40% longer than the straight line, just under the roughly 41% ceiling.
- On a 1:63,360 map, convert 5 miles to inches (316,800 in) and divide by the denominator.
- Now a hypothetical drive: 60 miles to another town at 60 mph, and the same 60 miles back at 40 mph because of road work. Times: 1 hour out and 1.5 hours back.
- Average speed for the whole trip: total distance over total time.
- Check with the harmonic mean formula: same answer, and below the 50 mph arithmetic mean.
Final check: confirms the 5; 3 + 4 = 7; 5 in × 63,360 = 316,800 in = 5 miles; and 48 mph × 2.5 h = 120 miles, exactly the distance driven.
Common mistakes
- Measuring the route with a ruler. A ruler gives Euclidean distance; your car drives on streets. Taxicab distance is a more realistic lower bound in grid cities, and real routes run longer still because of one-way streets and detours.
- Averaging the speeds. Going 60 and coming back at 40 does not give 50 mph. Add times, not speeds.
- Skipping the unit conversion on the scale. 1 inch at 1:63,360 is 1 mile, not 63,360 feet.
- Subtracting without absolute values. In taxicab distance, negative displacements (heading west or south) count as positive.
- Treating average speed as a given. Apps factor in traffic and lights; the estimate is only as good as the average speed you assume.
Frequently asked questions
Why is the app's route longer than the straight line?
Because cars follow streets, not the hypotenuse. On a grid, the minimum is the sum of the east-west and north-south displacements, and in practice one-way streets and obstacles add more.
Can taxicab distance be shorter than the Euclidean distance?
No. By the triangle inequality, the straight line is always the shortest path. The two are equal only when both points lie on the same street.
When is the arithmetic mean of speeds correct?
When each leg lasts the same amount of time. Then the legs are weighted equally and the arithmetic mean works. For equal distances, use the harmonic mean.
The Earth is curved. Does Pythagoras still apply?
For distances across a city, yes: the error is negligible. Between distant cities, maps use spherical geometry, with separate formulas for great-circle arcs.