In the ancient and medieval world, a city describes an urban centre of dense population and a certain pattern of building and public infrastructure spreading out from a central place, mostly a religious complex such as a temple, church or monastery. From the demographic perspective, these were settlements with social heterogeneity meaning that these were large communities of people that have decided to live together, for a common purpose and under laws observed by all.