In this model, the density of cities is determined endogenously, but the matching process becomes more efficient as density increases. As a result, workers become more selective in their matches, and this raises average productivity (the intensive margin). Despite being more selective, the search process is more rapid so that workers spend more time in productive matches (the extensive margin). The effect of an exogenous increase in land area on productivity depends on the sensitivity of the matching function and congestion costs to changes in density.