For over a hundred thousand years, humans evolved in small, roving bands of a few dozen people. But then, about ten thousand years ago, we started living in cities that were far bigger than any tribe or band. Our minds had to change to cope with the population overload.

Still, it seems likely that one of the major factors that affects us in cities is overcrowding. Our brains just can't handle all the people that we deal with on a typical day in the city. But instead of running from cities screaming and clutching our heads, we cope by creating small communities within the metropolitan hive — and shutting out anyone who isn't part of them.

The Social Brain

In a famous 1998 study called "The Social Brain Hypothesis," evolutionary psychologist Robin Dunbar suggested that humans are capable of forming meaningful social connections with no more than 150 people. He based this claim on the size of Homo sapiens' frontal cortex, which we use in part to store information about the relationships between the people we know.

Dunbar's study got a lot of attention for putting an exact number, 150, on our friendship capacities. What often gets forgotten in the excitement over quantification is that Dunbar also explained why it is that our social networks are so much smaller than, say, our facial recognition capacities. If we can, as he asserts, recognize up to 2,000 unique individuals, why can't we be socially connected with those people too?

Because being connected to a social group requires a lot of brain processing power. When we count someone as a member of our social circle, we do it by striving to understand that person's relationship with others in the group — as well as our ability to interact with and even manipulate that person. That's why some have dubbed the "social brain" the "Machiavellian brain." For each person in your group, your frontal cortex is processing a huge amount of ever-changing information about where they stand relative to you and everybody else in the group. Basically our social networks are limited because we just can't keep track of the human soap opera when there are more than 150 characters involved.

A study of how people cope with living in overcrowded conditions adds weight to Dunbar's hypothesis. Psychology researchers tracking the lives of students in overcrowded dorms discovered that students eased their stress by engaging in "social withdrawal," basically ignoring the people around them. One of the main symptoms of social withdrawal was that students knew less about the relationships between the other people in their dorms. You might say they were placing their neighbors outside that network of 150, and were no longer storing data on their social positions. If you can't physically remove yourself from a group larger than 150, at least you can do it psychologically.

This is a hugely useful insight when it comes to understanding how people navigate cities with millions of people in them.

The Network in the City

Several recent studies of European cities have used anonymized mobile phone data to analyze social networks. In one study, researchers found that people's social networks remain roughly the same size, no matter how large the city where they live. Comparing calls made by people in the city of Lisbon to people in the rural town Lixa, they found that city dwellers (not surprisingly) had far more contacts with others on any given day than people in Lixa. But for both groups, about a quarter of the people they dealt with every day were in their social networks. (Social networks here were defined as groups whose members were connected with each other via multiple nodes.)

For the researchers, this was a stunning insight. No matter how many new people those urbanites in Lisbon met, they still associated with their familiar social networks a quarter of the time. They wrote, "The constant clustering is particularly noteworthy as it suggests that even in large cities we live in groups that are as tightly knit as those in small towns or 'villages'."

But are these cell phone social networks really a good proxy of real-life friendship networks? It's likely that they are. Another study of mobile phone networks revealed that 69% of people who call each other frequently are also in the same physical space at least once a month.

Taken together with Dunbar's social brain hypothesis, these studies reveal that even when we're in a vast social space like a city, we are still figuring out ways to create social networks of about 150 people or less. The mobile phone studies offer evidence that urbanites are not living in a constant blur of new faces and place. They tend to call and meet up with members of the same social network at least a quarter of the time.

This also explains why you find yourself running into the same people all the time at social events, even when you live in a city of five million or more.

The Importance of Neighborhoods

The physical structure of cities seems to reflect our minds' limitations: the larger a city is, the more neighborhoods it has. Are these neighborhoods another way that people break down the bewildering crowds of cities into manageable sizes? Yes and no.

Even in the early 1960s, the famous city planning philosopher Jane Jacobs commented that neighborhoods should not be treated like social networks. InThe Death and Life of Great American Cities, she points out that city people are "mobile," choosing "from the entire city" when it comes to friends, jobs, and entertainment. As if anticipating the mobile phone studies of the last few years, Jacobs argued that our social networks transcend neighborhood boundaries and draw members from all over the city — and maybe all over the world.

Still, Jacobs believes that neighborhoods are crucial for self-government. Even if one might not want to see a show with one's neighbors, she argues, one does want to be allied with them over how often the streets will be cleaned and whether to build a park on the corner. So neighborhoods may not be social networks in the same way our friendship circles are. But they still help us navigate the stresses of dealing with a city government geared toward meeting the needs of millions of people rather than our preferred 150.

Perhaps that's why one study found that unstable neighborhoods with constantly-changing populations created stress and depression in their inhabitants. Remember, the reason we like to keep our social networks small is that we use a lot of processing power to understand everyone's relationship with each other. If people keep entering and leaving our network, that's extremely taxing. Given that neighborhoods are political networks, it's not surprisingly that this study also found that unstable neighborhoods tended to be neglected by the city. Without a cohesive political network, it was hard for the neighborhood to get what it needed from city government.

To survive the crowds in a city, you need a small social network where you can find refuge with friends. And to survive the city's political bureaucracy, you need a neighborhood with strong self-governance. Obviously these rules have many exceptions, and sometimes you do see significant overlap in social networks and neighborhood networks — especially in ethnic and subculture enclaves.

But one thing is clear. Even when we live in vast cities, our minds carve them up into smaller networks. That's why living in a city will expand your list of contacts, but you'll always find yourself gravitating back to the same group of friends.