A city can be defined on the basis of the size of its population or area or as a legally defined governmental entity. Cities typically differ from towns, villages and neighborhoods on the basis of their own legal incorporation as a city, typically based on the community's legal status or historical existence.
Cities typically provide a variety of services to their inhabitants, including sanitation, roads, utilities, transportation and food distribution. However, when many people think of a large city such as Shanghai or Los Angeles, they often include the extended metropolitan environment surrounding the city, which may not legally be part of the city at all.
While definitions of a city tend to vary depending on culture and country, cities are held to have certain characteristics in common. They tend to have a denser population than the surrounding environment, with a population that does not grow its own food. They usually pay taxes, often to support the activities of the cities and the creation of public buildings. The creation of art, literature and science is often centered within cities. Finally, cities do not produce their own raw materials and rely on specialized craftsmen to build the city and keep it functioning. Over half the world's population lives in cities.