There are several laws known to sociologists that seem to govern, in unnervingly accurate fashion, how we live in cities here on Earth. One is Zipf’s law, which states the rank of a city is inversely proportional to the number of people who live in the city. So the biggest city in a country has 10 million people, then the second-biggest city is 10 million divided by two, the next by three, and so on.

While most of these scaling laws, such as Zipf’s law or ones that determine the spread of sexually-transmitted diseases, have been observed to be true in the wild, we don’t have any real sense of where they come from or why they work.

Scientists now think they have found the source for these scaling laws out in space. Henry Lin and Abraham Loeb at the Harvard-Smithsonian Centre for Astrophysics have used models for showing how galaxies evolve based on matter density to propose a unifying theory for scaling laws of human populations.

“We treat the population density as the fundamental quantity, thinking of cities as objects that form when the population density exceeds a critical threshold,” Lin and Loeb wrote in their 13-page research paper (pdf). ”The situation is therefore conceptually and mathematically analogous to the formation of galaxies in the universe.”

Using cosmological models governing the spread of galaxies, the astrophysicists used public data to show that this approach works for other scaling laws that govern urban sociology, such as an inverse-rank law that says the probability that one person will be friends with another in a large city is inversely proportional to the number of people who live closer to the first person than the second.

They then simplified it to see how far their law would stretch—and the answer was pretty far. ”We derive a simple statistical model that explains all of these scaling laws based on a single unifying principle involving the random spatial growth of clusters of people on all scales,” they said.

All of which suggests that the underlying laws that govern some fairly complex human behaviours are the same as those that determined the formation of the very galaxy we live in. Which is slightly mind-blowing.