The spatial patterns of urban activities are treated as the outcome of a balance between economic conditions that reward spatial concentration of employment activity on the one hand but favor spatial dispersion of residences on the other. The balance between these two sets of conditions is mediated by the cost of commuting. These three elements are formalized in terms of a mathematical-programming model that determines simultaneously the location patterns of employment, residential activity, and commuting. The solution conditions lead to a single-equation model which estimates the distances between zones in a city on the basis of their residential and employment densities. This version is fitted to data for four US cities. Estimates derived from the single-equation model can be resolved into two-dimensional maps of the zones by multidimensional scaling, and maps of the four cities, based on the estimated equations, are obtained and compared with the actual maps of the cities. The results indicate that the estimated parameters are congruent with the actual spatial arrangements of the cities.