Menu

The Mathematics of Cities

Cities are not just random collections of buildings and people; they follow surprising mathematical regularities. From the distribution of city sizes to the pace of innovation, equations can describe the pulse of urban life.

Zipf’s Law and City Sizes

One of the most famous empirical regularities in urban science is Zipf’s Law. It states that the population of the nn-th largest city is proportional to 1/n1/n of the largest city’s population.

Mathematically, if PrP_r is the population of the city with rank rr, then:

Pr=P1rP_r = \frac{P_1}{r}

Where:

  • P1P_1 is the population of the largest city.
  • rr is the rank of the city.

This power-law distribution implies a scale-invariant hierarchy in urban systems.

Urban Scaling Laws

Cities also exhibit allometric scaling. Many urban indicators YY (like GDP, road surface area, or crime) scale with population PP according to a power law:

Y=Y0PβY = Y_0 P^\beta

Taking the logarithm of both sides, we get a linear relationship:

ln(Y)=ln(Y0)+βln(P)\ln(Y) = \ln(Y_0) + \beta \ln(P)

The exponent β\beta reveals the nature of the scaling:

  • β=1\beta = 1 (Linear): Household water consumption typically scales linearly with population.
  • β<1\beta < 1 (Sublinear): Infrastructure (roads, cables) often scales sublinearly (e.g., β0.85\beta \approx 0.85), indicating economies of scale. A city twice as large needs less than twice the infrastructure.
  • β>1\beta > 1 (Superlinear): Socio-economic outputs (wealth, patents, crime) often scale superlinearly (e.g., β1.15\beta \approx 1.15), indicating increasing returns to scale. A city twice as large produces more than twice the wealth.

The Gravity Model of Trade

Modeled after Newton’s law of gravitation, the interaction IijI_{ij} (e.g., trade, migration, commuting) between two cities ii and jj is proportional to their populations and inversely proportional to the distance between them:

Iij=KPiPjdijαI_{ij} = K \frac{P_i P_j}{d_{ij}^\alpha}

Where:

  • Pi,PjP_i, P_j are the populations of the two cities.
  • dijd_{ij} is the distance between them.
  • KK is a constant.
  • α\alpha is a distance decay parameter (often close to 2).

Modeling Traffic Flow

Traffic flow qq (vehicles per hour) is related to density kk (vehicles per km) and speed vv (km/h) by the fundamental equation:

q=kvq = k \cdot v

A simple linear model for speed (Greenshields’ model) assumes speed decreases linearly with density:

v=vf(1kkj)v = v_f \left( 1 - \frac{k}{k_j} \right)

Where:

  • vfv_f is the free-flow speed.
  • kjk_j is the jam density.

Substituting this back into the flow equation gives a parabolic relationship:

q=kvf(1kkj)=vfkvfkjk2q = k \cdot v_f \left( 1 - \frac{k}{k_j} \right) = v_f k - \frac{v_f}{k_j} k^2

This helps urban engineers determine the optimal density for maximum traffic flow.

Conclusion

Mathematics provides a powerful language to decode the complexity of our cities. By understanding these underlying laws, we can design more efficient, resilient, and equitable urban environments.