# Community of Madrid

The Community of Madrid (Spanish: Comunidad de Madrid; ) is one of the seventeen autonomous communities and 50 provinces of Spain. It is located in the centre of the Iberian Peninsula, and of the Central Plateau (Meseta Central). Its capital and largest municipality is Madrid, which is also the capital of the country. The Community of Madrid is bounded to the south and east by Castilla–La Mancha and to the north and west by Castile and León. It was formally created in 1983, in order to address the particular status of the city of Madrid as the capital of the Spanish State and in urban hierarchy. Its boundaries are coextensive with those of the province of Madrid, which was until then conventionally included in the historical region of New Castile (Castilla la Nueva).
The Community of Madrid is the third most populous in Spain with 7,058,041 (2024) inhabitants, roughly a seventh of the national total, mostly concentrated in the metropolitan area of Madrid. It is also the most densely populated autonomous community. Madrid has both the largest nominal GDP, slightly ahead of that of Catalonia, and the highest GDP per capita in the country. Madrid's economy is highly tertiarised, having a leading role in Spain's logistics and transportation.
The Community of Madrid is almost entirely comprised in the Tagus Basin, from the Central System (Sistema Central) reliefs in the north and northwest to the Tagus River bed in the southern border. The climate is generally temperate, ranging from mediterranean to semi-arid, except in the Central System highlands. It contains four World Heritage Sites: the Monastery and Royal Site of El Escorial, the university and historic centre of Alcalá de Henares, the cultural landscape of Aranjuez and the Paseo del Prado and Buen Retiro park in Madrid City. In addition, the Montejo Beech Forest [es] is part of the transnational Ancient and Primeval Beech Forests of the Carpathians and Other Regions of Europe world heritage site.

## Geography

Despite the existence of a large urban area of nearly 7 million people, the Community of Madrid still retains some remarkably unspoiled and diverse habitats and landscapes. Madrid is home to mountain peaks rising above 2,000 m, holm oak dehesas and low-lying plains. The slopes of the Guadarrama mountain range are cloaked in dense forests of Scots pine and Pyrenean oak. The Lozoya Valley supports a large black (monk) vulture colony, and one of the last bastions of the Spanish imperial eagle in the world is found in the Park Regional del Suroeste in dehesa hills between the Gredos and Guadarrama ranges. The recent possible detection of the existence of Iberian lynx in the area between the Cofio and Alberche rivers is testament to the biodiversity of the area. Taking advantage of the orography, there are several reservoirs and local dams, with the Santillana reservoir being the largest.
The province of Madrid is shaped approximately like an equilateral triangle, with the city of Madrid located near its center. First, by the western side, it borders the "Sistema Central" (the Guadarrama mountain range), the southern border features a protrusion following the Tagus River in order to include the royal site of Aranjuez in the region; the eastern edge of the triangle comes from the rupture of the fluvial river basins. This autonomous community is located in the basin of the Tagus River. The Tagus passes through the southern border of the Autonomy in its path west toward the Atlantic Ocean, draining the waters of the Jarama River (collecting in turn the waters of the Lozoya, the Guadalix, the Manzanares, the Henares and the Tajuña), the Alberche and the Guadarrama in the Community.
This autonomous community also includes the exclave of Dehesa de la Cepeda (part of the municipality of Santa María de la Alameda), a mostly open-area geographically located between the provinces of Ávila and Segovia in the autonomous community of Castile and León.
The Province of Madrid occupies a surface area of approximately 8,028 km$^2$ (3,100 sq mi) (1.6% of all Spanish territory). More specifically, the exact position of Madrid is 3° 40' of longitude west of Greenwich, England, and 40° 23' north of the equator.
Most of the province lies between 600 and 1,000 m above sea level. However, there the altitude ranges from 2,428 metres of Peñalara to 430 metres at the Alberche river when it leaves Villa del Prado into the province of Toledo. Other considerable heights, as well as being famous, are the Bola del Mundo ("Ball of the World") in Navacerrada, at a height of 2,258 m, the Siete Picos ("Seven Peaks") in Cercedilla, at 2,138 m, and the Peña Cebollera (2,129 m) at the northernmost end of the province, a tripoint between the Madrid region and the provinces of Segovia and Guadalajara.

### Fauna

Among the protected species of birds nesting in the region stand out the Spanish imperial eagle, the golden eagle, the Bonelli's eagle, the cinereous vulture, the peregrine falcon and the black stork.
Exotic invasive species of birds and mammals in the region include the red-eared slider, the monk parakeet, the common snapping turtle, the rose-ringed parakeet, the American mink and the raccoon. Species described as "out of place" and with an increasing population include the black-headed gull, the lesser black-backed gull, the great cormorant and Eurasian collared dove, while the emblematic iberian ibex is presented as a case of a species "gone out of control" in La Pedriza following its re-introduction in the region in 1990 after roughly a century disappeared from the Madrilenian mountains.
The mountain amphibians living at a high altitude include the fire salamander, the marbled newt, the alpine newt, the iberian frog, the European tree frog or the common midwife toad. At a middle elevation in the mountain reaches close to water streams there are species such as the Bosca's newt, the southern marbled newt, the mediterranean tree frog or the iberian midwife toad. The common parsley frog and the Alytes obstetricans pertinax dwell in the limestone lowlands near the Tagus in the south-east of the region. Among the all-around amphibians adaptable to different heights stand out the natterjack toad, the common toad and the iberian green frog. Other species with a wide distribution range (although in this case restricted by altitude) are the gallipato, the iberian spadefoot toad, the iberian painted frog, and the Spanish painted frog.
Regarding the reptiles, species such as the Cyren's rock lizard, the European wall lizard, the iberian emerald lizard, the deaf adder or snakes such as the smooth snake or the Vipera latastei dwell in the mountain heights. At the lower reaches of the mountains the European pond turtle and the Brediaga's skink can be found, while the western false smooth snake is restricted to areas in the south of the region. Among the species of all-around reptiles, adaptable to different biomes stand out the Spanish pond turtle, the salamanquesa, the western three-toed skink, the spiny-footed lizard, the ocellated lizard, the Algerian sand racer, Spanish psammodromus, the ubiquitous iberian wall lizard, the iberian worm lizard, the Coronella girondica, the Montpellier snake; grass snake and the viperine snake.
The fish species are affected by the high number of reservoirs in the region. Among the threatened species in the rivers stand out the European eel, the iberian barbel, the Squalius alburnoides, the Cobitis calderoni and, potentially, the Chondrostoma lemmingii. Conversely the set of invasive species of fish includes pike, black bullhead catfish, pumpkinseed, zander, common bleak and black-bass.

### Vegetation

In the vicinity of the mountain peaks, oromediterranean vegetation such as Agrostis truncatula, Armeria caespitosa [es], Festuca indigesta, Jasione crispa [es], Jurinea humilis [es], Minuartia recurva, Pilosella vahlii, Plantago holosteum and the Thymus praecox is common. Below the summit line, shrubby species such as the Cytisus oromediterraneus and the common juniper as well as the Scots pine take over. There are also masses of black pine and the pyrenean oak situated above the domain of the holm oak.
Eurosiberian flora is not common in the region, and species such as the moor birch and the silver birch are restricted to very specific humid valley areas with special climate conditions. The climax vegetation in the campiña is the holly oak. Some of the species that take over when the holly oak forest degrades are the "sticky shrub", the Retama sphaerocarpa, the French lavender, the Thymus mastichina and the Thymus zygis.
The lower reaches of Guadarrama Mountain Range are populated by species such as the Juniperus thurifera, the maritime pine, the Portuguese oak, the stone pine; only in the somewhat more humid westernmost end of the region, near the Alto del Mirlo [es], there are forests of chestnut trees.
54,4% of the surface of the region is soil categorised as forest areas of which the 51.4% (27.7% of the total of the region) it is already covered by forests, so there is room for tree re-population. The first modest efforts towards tree re-population were taken in the Lozoya Valley in the late 19th century intending to achieve a purer water from the river, that provided the capital with water for consumption. However, the bulk of the process took place after the Spanish Civil War, with a largely successful repopulation with several species of conifers.

## Climate

The Madrid region features a climate marked by dry summers, while average temperature varies with altitude, marking different climate subtypes. Most of the region (including the capital) has a climate intermediate between a hot-summer mediterranean climate (Köppen Csa) and a cold semi-arid climate (Köppen BSk), with a dry summer and a moderate to low amount of rain primarily distributed throughout the rest of the year (in the case of the capital, roughly an equinoctial pattern of precipitation maximums), as well as summer temperature averages over 22 °C (with daily maximums consistently surpassing 30 °C in July and August). The areas at a higher altitude close to the Sierra de Guadarrama feature a colder climate, also generally with more precipitation (particularly in the winter), with climate subtypes ranging from the Csa to the warm-summer mediterranean climate (Köppen: Csb) and the dry summer continental climate (Köppen: Dsb) on the peaks of the mountain range, with temperature averages below freezing point during January and February in the later case.

## History
### Prehistory

The territory of the Community of Madrid has been populated since the Lower Paleolithic, mainly in the valleys between the rivers of Manzanares, Jarama, and Henares, where several archaeological findings have been made.
Some notable discoveries of the region the bell-shaped vase of Ciempozuelos (between 1970 and 1470 BCE), from the Bell beaker culture.

### Romans and Visigoths

During the Roman Empire, the region was part of the Citerior Tarraconese province, except for the south-west portion of it, which belonged to Lusitania. It was crossed by two important Roman roads, the via xxiv-xxix (joining Astorga to Laminium and via xxv (which joined Emerita Augusta and Caesaraugusta), and contained some important conurbations. The city of Complutum (today Alcalá de Henares) became an important metropolis, whereas Titulcia and Miaccum were important crossroad communities.
During the period of the Visigothic Kingdom, the region lost its importance. The population was scattered amongst several small towns. Complutum was designated the bishopric seat in the 5th century by orders of Asturio, archbishop of Toledo, but this event was not enough to bring back the lost splendor of the city.

### Al-Andalus

The centre of the peninsula (the Middle Mark of Al-Andalus or aṯ-Ṯaḡr al-Awsaṭ) became a strategic military post in the 11th century. The Muslim rulers created a defensive system of fortresses and towers all across the region with which they tried to stop the advance of the Christian kingdoms of the north.
The fortress of Mayrit (Madrid) was built somewhere between 860 and 880 AD, as a walled precinct where a military and religious community lived, and which constituted the foundation of the city. It soon became the most strategic fortress in defense of the city of Toledo above the fortresses of Talamanca and Qal'-at'-Abd-Al-Salam (Alcalá de Henares). In 1083 (or 1085) Alfonso VI took the city of Madrid in the context of his wider campaign to conquer Toledo. Alcalá de Henares fell in 1118 in a new period of Castilian annexation.

### Christian repopulation

The recently conquered lands by the Christian kingdoms were desegregated into several constituencies, as a consequence of a long process of repopulation that took place over the course of four centuries. The feudal and ecclesiastical lords came into constant conflict with the different councils that had been granted the authority to repopulate.
In the 13th century, Madrid was the only town of the current-day region that preserved its own juridical personality, at first with the Old Fuero (Charter) and later with the Royal Fuero, granted by Alfonso X of Castile in 1262 and ratified by Alfonso XI in 1339. On the other hand, the town of Buitrago del Lozoya, Alcalá de Henares and Talamanca de Jarama, which were rapidly repopulated until that century, were under the dominion of the feudal or ecclesiastical lords. Specifically, Alcalá de Henares was under the hands of the archbishopric of Toledo and remained so until the 19th century.
Around the town of Madrid, an administrative territory was created known as Tierra de Madrid (Land of Madrid), the origin of the province that included the areas of the current municipalities of San Sebastián de los Reyes, Cobeña, Las Rozas de Madrid, Rivas-Vaciamadrid, Torrejón de Velasco, Alcorcón, San Fernando de Henares, and Griñón.
Madrid was in constant strife with the powerful council of Segovia, whose jurisdiction extended south of the Guadarrama Mountains; they both fought for the control of the Real de Manzanares, a large comarca (shire) that was finally given to the House of Mendoza.
Castilian monarchs showed a predilection for the center of the peninsula, with abundant forests and game. El Pardo was a region visited frequently by kings since the time of Henry III, in the 14th century. The Catholic Monarchs started the construction of the Royal Palace of Aranjuez. In the 16th century, San Lorenzo de El Escorial was built and became another royal site of the province.

### Early modern period

The town of Madrid, which was one of the eighteen cities with the right to vote in the Cortes of Castile, was seat of the Courts themselves on several occasions and was the residence of several monarchs, amongst them the emperor Charles I who reformed and expanded the Alcázar or Castle of the city. Alcalá de Henares grew in importance as cultural center since the foundation by the Cardinal Cisneros of its university.
In 1561, King Philip II made Madrid the capital of the Hispanic Monarchy. The surrounding territories became economically subordinated to the town itself, even beyond the present day limits of the Community of Madrid. But it was not a unified region as several lords and churches had jurisdiction over their own autonomous territories.
During the 18th century, the fragmented administration of the region was not solved despite several attempts. During the reign of Philip V, the intendencia was created as a political and administrative division. Nonetheless, the intendencia of Madrid did not fully solve the problem, and the region was still fragmented into several small dominions even though some processes were centralized. This territorial dispersion had a negative effect on its economic growth; while the town of Madrid received economic resources from the entire country as the capital, the surrounding territories—in hands of noblemen or the clergy—became impoverished.
During the eighteenth century, the town of Madrid was transformed through several grandiose buildings and monuments as well as through the creation of many social, economic, and cultural institutions, some of which are still operating. Madrid grew to a population of 156,672 inhabitants by the end of the eighteenth century.

### Province

The current territory of the region was roughly defined with the 1833 reorganization of Spain into provinces promoted by Javier de Burgos, in which the province of Madrid was classified in the region of New Castile (lacking the later any sort of administrative institution at the regional level nonetheless). The government institution at the provincial level was the deputation (diputación). In addition to the former body, another provincial political authority was the civil governor discretionarily designated by the central government. Two modest changes to the 1833 provincial boundaries that concerned Madrid took place shortly before 1845, when Aranjuez (187 km$^2$) left the province of Toledo and joined that of Marid, and in 1850, when the small municipality of Valdeavero (19 km$^2$), until then part of the province of Guadalajara, joined the province of Madrid.
One of the limits so far for the growth of the capital, water supply, experienced a substantial change in 1858 following the arrival to the city of Madrid of water from the Lozoya River with the inauguration of the bringing of the Canal de Isabel II.
In decadence since the middle 18th century, the city of Alcalá de Henares, experienced a relative demographic and economic upturn in the second half of the 19th century, based on its newly acquired condition of military outpost, to which an embryonic industrial nucleus was also added.
During the reign of Ferdinand VII the south of the province was made up of small agricultural settlements of limited population. Among them, Getafe stood out in population, and became the seat of a judicial district in 1834, with the main economic activity of the former jurisdiction still being non-irrigated agriculture. Rail transport arrived in 1851, with the Strawberry train, the railway connecting Madrid and Aranjuez.
During the Spanish Civil War (1936–1939), the territory was divided by the battlefront, with the southwest of the province controlled by the rebel faction, and the capital as well as a great part of the rest of the province by the side loyal to the Republic. The city of Madrid was target of many bombings during the conflict, becoming the first big city in Europe to suffer such systematic and massive air attacks.
Since the 1970s, a process of a population transfer from the capital to the rest of municipalities of the metropolitan area emerged. This process accelerated when the autonomous community was founded, and it took place along a strong decrease of birth rates.

### Autonomous community

The creation of the contemporary Community of Madrid was preceded by an intense political debate. Autonomous communities were to be created by one or more provinces with a distinct regional identity. Since the 1833 provincial organization, Madrid was part of the historical region of New Castile along with the provinces of Guadalajara, Toledo, Cuenca and Ciudad Real. Thus, it was first planned that the province of Madrid would be part of the future community of Castile–La Mancha (which was roughly similar to New Castile, with the addition of Albacete) but with some special considerations as the home of the national capital. The other provinces that were to become part of Castile–La Mancha expressed fears of inequality if Madrid were associated with them. These provinces opposed such a special status, and after considering other options for Madrid—like its inclusion in the community of Castile and León or its constitution as an entity similar to a federal district—it was decided that the province of Madrid would become a single-province autonomous community by virtue of Article 144 of the Constitution, which empowers the Cortes to create an autonomous community in the "nation's interest" even if it did not satisfy the requirement of having a distinct historical identity. Thus, in 1983, the Community of Madrid was constituted and a Statute of Autonomy was approved taking over all the competences of the old "Diputación Provincial" and the new ones the Statute considered.
During the first 25 years of the "autonomic" period, this autonomous community accounted for the biggest economic growth in Spain, becoming a platform for the internationalisation of the Spanish economy, featuring a marked preponderance of the service sector. By the turn of the 21st century, a strong boost to the construction sub-sector also took place. During this period the Community of Madrid stood out due to its role as centre for welcoming immigration, due to its condition as transport node vis-à-vis the Spanish geography, and due to its condition as scientific and cultural centre of the country.

## Government and politics
### Autonomous institutions of government

Like the rest of autonomous communities, the Community of Madrid is organized politically within a parliamentary system; that is, the head of government—known as the "president"—is dependent on the direct support from the autonomous legislature, whose members elect him by a majority.
The Statute of Autonomy of the Madrid Autonomous Community is the fundamental organic law in conjunction with (and subordinated to) the Spanish constitution. The Statute of Autonomy establishes that the powers through which the self-government of the autonomous community is exercised are the following institutions:
* The Assembly of Madrid, a directly elected body, represents the people of Madrid and exercises the legislative power of the community in approving and supervising the budget and in coordinating and controlling the actions of the government. The seat of the Assembly is located in Madrid, in the district of Puente de Vallecas. The members of the legislature (currently 132) are elected through proportional representation with closed-party lists and a 5% electoral threshold in a single region-wide constituency. The last election took place on 26 May 2019.
* The President of the Community of Madrid is the supreme representative of the autonomous community and the ordinary representation of the State. It presides and heads the activities of the Madrilenian autonomous government, designates and dismisses the vice-presidents and the ministers (consejeros) which conform an executive cabinet. The investiture of the regional president, who is nominated as candidate by the Speaker of the Assembly among its members after holding consultations, is voted by a qualified majority of the plenary of the legislature (or, failing to achieve the former, a simple majority of 'yes' votes in a second round voting 48 hours later) and then formally appointed by the King through a Royal Decree. The seat of the Presidency is the Real Casa de Correos located at the Puerta del Sol at the center of Madrid. Since 2019, the president is Isabel Díaz Ayuso, of the People's Party (PP).
* The Government of the Community of Madrid is the collegiate body that heads the politics and the executive and administrative powers of the community. The incumbent Council of Government comprises the President, the vice-president (assuming additional competences) and twelve more ministers.

### Delegation of the Central Government

Since the creation of autonomous communities, the Government of Spain appoints a special representative to each autonomous community, the Government Delegate, part of the Peripheral State Administration. Unlike other single-province autonomous communities, the Government also appoints the Government Sub-delegate, the successor office to the provincial civil governor. The seats of both the delegation and the subdelegation are located at the Borghetto Palace [es] in Madrid.

### Administrative divisions

The Community of Madrid, following the long-standing form of local government in Spain, is divided administratively into 179 municipalities (featuring 801 towns and entities). Its municipalities comprise 2.2% of the Spanish territory (8,110). It is ranked 23rd amongst Spanish provinces in number of municipalities, which is slightly above average. The average is 165 municipalities by province. The ayuntamiento, presided by its alcalde (Mayor) is the formal institution charged with the government and administration of most municipalities. The municipal councillors forming the deliberative assembly of the ayuntamiento are directly elected through proportional representation with closed party lists and a 5% electoral threshold. In turn, the councillors are charged with electing from among themselves (by default candidates are the head of each electoral list) the Mayor presiding over the ayuntamiento.
There are twenty judicial districts (partidos judiciales), whose seats correspond to the municipalities of Alcalá de Henares, Alcobendas, Alcorcón, Aranjuez, Arganda del Rey, Collado Villalba, Colmenar Viejo, Coslada, Fuenlabrada, Getafe, Leganés, Madrid, Majadahonda, Móstoles, Navalcarnero, Parla, San Lorenzo de El Escorial, Torrejón de Ardoz, Torrelaguna, Valdemoro, and Valdaracete (the historical judicial district of San Martín de Valdeiglesias is no longer a judicial district as of 1985). These jurisdictions relate to the judicial administration, with their seat having at least one court of first instance.

## Economy

Madrid is the autonomous community with the highest income per capita in Spain, at €38,435 in 2022 – significantly above the national average and ahead of the Basque Country, with €35,832, Navarra, €33,798, and Catalonia, €32,550. In that year, the GDP per capita growth was 8.6%. Madrid has a GDP of €230.8 billion ($281 billion) as of 2018; making it the largest economy of Spain, ahead of Catalonia, where regional GDP amounted to €228.7 billion and the most populated Spanish region, Andalusia (€160.6 billion).
In 2005, the Community of Madrid was the main receptor of foreign investment in the country, at 34.3% of the total. The community ranks 34th amongst all European regions (evaluated in 2002), and 50th amongst the most competitive cities-regions worldwide, ahead of Barcelona and Valencia, the other two largest metropolitan areas of Spain. The strengths of the economy of the community are its low unemployment rate, its high investment in research, its high development, and the added-value services therein performed. Its weaknesses include the low penetration of broadband and new technologies of information and an unequal male to female occupation.
The service, construction, and industry sectors are prominent in Madrid's commercial productive structure. According to the Directorio Central de Empresas (Central Companies Directory of the INE), Madrid's active businesses stand in third place nationally in terms of numbers as at 1 January 2006. The branches of activity with most active businesses are other business activities, retail trade, construction, wholesale trade, hospitality, property activities, land transport, and pipeline transport.
Madrid's levels of industrial activity set it at fourth place in Spain. The following areas predominate in terms of business numbers: publishing and graphic arts, manufacture of metal products (except machinery and equipment), manufacture of furniture and other manufacturing industries, wearing apparel and fur industry, and food product industry. The province also boasts a higher concentration of high and medium technology activities and services than the rest of Spain. This is the case in the following areas: manufacture of office machinery and IT equipment; manufacture of electronic products, manufacture of radio equipment, and devices; manufacture of medical and surgical, precision, optical and timekeeping equipment and instruments; post and telecommunications; IT activities; and research and development.
Regional authorities have put a notable effort in the development of logistics infrastructures in both the region of Madrid and the city proper. These include the Coslada Dry Port, the freight zone of the Madrid-Barajas Airport, Mercamadrid, the Madrid-Abroñigal [es] logistics centre, the Villaverde's Logistics Centre and the Vicálvaro's Logistics Centre to name a few. Overall, logistics companies has greatly developed along the A-2 highway (Coslada, San Fernando de Henares, Torrejón de Ardoz) in the eastern part of the region, the so-called "Henares Corridor" to become what has come to be termed as the "golden mile" of logistics and e-commerce in Spain.
The unemployment rate stood at 10% in 2019 and was lower than the national average.
Unemployment rate (December data) (%) :
| 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 |
| 6.5% | 6.4% | 10.0% | 14.5% | 15.5% | 18.0% | 19.3% | 20.5% | 18.0% | 16.5% | 14.6% | 13.8% | 11.5% | 10.0% |

## Demographics

   Population density by municipality according to the Institute for Statistics of the Community of Madrid (2017):
As of 1 January 2024, the Community of Madrid has a registered population of 7,001,715 inhabitants, and it is the most populated province and third most populated autonomous community in Spain. Population density is 829.62 hab/km$^2$, much higher than the national average of 93.8 hab/km$^2$. Population density varies with the community itself; the municipality of Madrid has a density of 5,300 hab/km$^2$, whereas the Sierra Norte has a population density of less than 10 hab/km$^2$. The vast majority of the population lives in the capital and its metropolitan area, which is the most populated in Spain.
Madrid also has the greatest population density in Spain. Its inhabitants are mainly concentrated in the capital (which is the Spanish city with the highest resident population) and in a series of municipalities (Móstoles, Alcalá de Henares, Fuenlabrada, Leganés, Alcorcón, Getafe, Torrejón de Ardoz, and Alcobendas), as opposed to in rural areas with low population density. Its citizens have diverse origins, and Madrid is the province with the highest number of residents born outside its territory and with the largest foreign population (13.32%). It is a focus of attraction for those migrating for reasons of employment. Population growth in Madrid is mainly due to the arrival of foreigners.
As of 1 January 2024, the region's population included 1,038,671 people born in Spanish-speaking countries from the Americas, up from 81,552 in 1999.
The Community of Madrid is the EU-Region with the highest average life expectancy at birth. The average life expectancy was 82.2 years for males and 87.8 for females in 2016.
Largest municipalities in the Community of Madrid INE (1 January 2023) :
| | Rank | | Pop. | Rank | | Pop. | |
| Madrid Móstoles | 1 | Madrid | 3,331,035 | 11 | Rivas Vaciamadrid | 100,275 | Alcalá de Henares Leganés |
| Madrid Móstoles | 2 | Móstoles | 211,265 | 12 | Las Rozas | 98,086 | Alcalá de Henares Leganés |
| Madrid Móstoles | 3 | Alcalá de Henares | 199,184 | 13 | San Sebastián de los Reyes | 92,734 | Alcalá de Henares Leganés |
| Madrid Móstoles | 4 | Leganés | 191,114 | 14 | Pozuelo de Alarcón | 88,784 | Alcalá de Henares Leganés |
| Madrid Móstoles | 5 | Fuenlabrada | 188,376 | 15 | Valdemoro | 81,394 | Alcalá de Henares Leganés |
| Madrid Móstoles | 6 | Getafe | 185,899 | 16 | Coslada | 80,171 | Alcalá de Henares Leganés |
| Madrid Móstoles | 7 | Alcorcón | 171,772 | 17 | Majadahonda | 72,548 | Alcalá de Henares Leganés |
| Madrid Móstoles | 8 | Torrejón de Ardoz | 137,711 | 18 | Collado Villalba | 65,657 | Alcalá de Henares Leganés |
| Madrid Móstoles | 9 | Parla | 133,004 | 19 | Boadilla del Monte | 64,742 | Alcalá de Henares Leganés |
| Madrid Móstoles | 10 | Alcobendas | 119,416 | 20 | Aranjuez | 60,668 | Alcalá de Henares Leganés |

### Foreign population

As of 2022, the region had a foreign-born population of 949,969. The largest groups of foreigners were those of Romanian, Moroccan, Chinese, Colombian, Ecuadorian, Venezuelan and Italian citizenship.
Foreign population by country of citizenship (2018) :
| Nationality | Population |
| Romania | 163,730 |
| Morocco | 76,697 |
| China | 59,757 |
| Colombia | 39,523 |
| Ecuador | 37,517 |
| Venezuela | 29,017 |
| Italy | 28,787 |
| Peru | 27,826 |
| Dominican Republic | 25,312 |
| Paraguay | 24,928 |
| Other | 313,362 |

## Education

State Education in Spain is free and compulsory from six to sixteen years of age. The current education system is called LOMLOE (Ley Orgánica 3/2020, de 29 de diciembre, por la que se modifica la Ley Orgánica 2/2006, de 3 de mayo, de Educación).

### Levels

* From three to six years – Educación Infantil (Preparatory School)
* From six to twelve years – Educación Primaria (Primary School), years first through sixth
* From twelve to sixteen years – Educación Secundaria Obligatoria (Compulsory Secondary School), years first through fourth
* From sixteen to seventeen years – Bachillerato (Post-Compulsory School), years first and second
Children from three to five years old in Spain have the option of attending the pre-school stage, which is non-compulsory and free for all students. It is regarded as an integral part of the education system with infantil classes in almost every primary school. There are some separate Colegios Infantiles or nursery schools.
Spanish students aged six to sixteen undergo primary and secondary school education, which are compulsory and free of charge. Successful students are awarded a Secondary Education Certificate, which is necessary for entering further (optional) education as is Bachillerato for their University or Formación Profesional (vocational studies). Once students have finished their Bachillerato, they can take their University Entrance Exam (Pruebas de Acceso a la Universidad, popularly called Selectividad) which differs greatly from region to region.
The secondary stage of education is normally referred to by its initials, e. g., ESO or Educación Secundaria Obligatoria for secondary education.
EducaMadrid is the educational platform that offers teachers and students in these and other non-university studies (professional studies, arts, languages, adult education and others) a virtual environment with all the necessary Internet services, in compliance with GDPR. It is safe, free, sustainable and based on Open source software.

### Universities

Madrid is home to a large number of public and private universities.
The Complutense University of Madrid is one of the most prestigious, and the largest, university in Spain and one of the oldest universities in the world. It has 10,000 staff members and a student population of 117,000. Nearly all academic staff are Spanish. It is located on two campuses, in the university quarter Ciudad Universitaria at Moncloa in Madrid, and in Somosaguas. The Complutense University of Madrid was founded in Alcalá de Henares, old Complutum, by Cardinal Cisneros in 1499. Nevertherless, its real origin dates back from 1293, when King Sancho IV of Castile built the General Schools of Alcalá, which would give rise to Cisnero's Complutense University. During the course of 1509-1510 five schools were already operative: Artes y Filosofía (Arts & Philosophy), Teología (Theology), Derecho Canónico (Canonical Laws), Letras (Liberal Arts) and Medicina (Medicine). In 1836, during the reign of Isabel II, the university was moved to Madrid, where it took the name of Central University and was located at San Bernardo Street. Subsequently, in 1927, a new University City ("Ciudad Universitaria") was planned to be built in the district of Moncloa-Aravaca. The Spanish Civil War turned the University City into a war zone, with several faculties sustaining severe damage during the conflict. By 1943 the Central University started to be known as the University of Madrid.
In 1970 the University of Madrid was renamed to Complutense University of Madrid. It was then when the new campus at Somosaguas was created in order to house the new School of Social Sciences. The old Alcalá campus was reopened as the independent University of Alcalá in 1977.
Another important university is the Autonoma, perhaps Spain's best university for research along with the Complutense, was instituted under the leadership of the famous physicist, Nicolás Cabrera. The Autonoma is widely recognised for its research strengths in theoretical physics. Known simply as la Autónoma in Madrid, its main site is the Cantoblanco Campus, situated 15 kilometers to the north of the capital (M-607) and close to the municipal areas of Madrid, namely Alcobendas, San Sebastián de los Reyes, Tres Cantos and Colmenar Viejo. Located on the main site are the Rectorate building and the Faculties of Science, Philosophy and Fine Arts, Law, Economic Science and Business Studies, Psychology, Higher School of Computing Science and Engineering, and the Faculty of Teacher Training and Education. The Medical School is located outside the main site and beside the Hospital Universitario La Paz.
Other local universities, among many others, are the Technical University of Madrid, as the result of merging the different Technical Schools of Engineering; the Universidad de Alcalá de Henares, founded in 1499; the Carlos III, whose philosophy is to create responsible free-thinking people with a sensitivity to social problems and an involvement in the concept of progress based on freedom, justice and tolerance and the Universidad Pontificia Comillas, involved in a number of academic exchange programmes, work practice schemes and international projects with over 200 Higher Education Institutions in Europe, South America, North America, and Asia.
Other universities in Madrid: Rey Juan Carlos University (public), Alfonso X El Sabio University, Universidad Antonio de Nebrija, Universidad Camilo José Cela, Universidad Francisco de Vitoria, Universidad Europea de Madrid, and Universidad San Pablo (all of them private).
Madrid is also home to the Escuela Superior de Música Reina Sofía, the Real Conservatorio Superior de Música de Madrid, and many other private educational institutions.

## Transportation
### Air

Madrid is served by Barajas International Airport. Barajas is the main hub of Iberia Airlines and consequently serves as the main gateway to the Iberian peninsula from Europe, the Americas, and the rest of the world. Current passenger volumes range upwards of 52 million passengers per year, putting it in the top 10 busiest airports in the world. Given annual increases close to 10%, a new fourth terminal has been constructed. It has significantly reduced delays and doubled the capacity of the airport to more than 70 million passengers per year. Two additional runways have also been constructed, making Barajas a fully operational four-runway airport.

### Commuter rail

Cercanías Madrid is the commuter rail service that serves Madrid, the capital of Spain, and its metropolitan area. It is operated by Cercanías, the commuter rail division of Renfe, the former monopoly of rail services in Spain. The system is infamous for being the target of 11 March 2004 Madrid train bombings. The attacks triggered a small reduction in the ridership of the system, but it is still the most used and most profitable (by 2004) of the commuter rail services in Spain. The total length spans 339.1 km (210.7 mi).
Spain's railway system, the Red Nacional de Ferrocarriles Españoles (Renfe), operates the vast majority of Spain's railways. In Madrid, the main rail terminals are Atocha in the south and Chamartín in the north.

### High-speed rail

The crown jewel of Spain's next decade of infrastructure construction is the Spanish high-speed rail network, Alta Velocidad Española AVE. Currently, an ambitious plan includes the construction of a 7,000-kilometre (4,300 mi) network, centered on Madrid. The overall goal is to have all important provincial cities be no more than four hours away from Madrid and no more than six hours away from Barcelona. As of 2008, AVE high-speed trains link Madrid-Atocha station to Seville, Málaga, and Toledo in the south, Valencia, Albacete, Cuenca and Alicante in the east, and to Zaragoza, Tarragona, Girona, Leida, Huesca and Barcelona in the north-east. AVE trains also arrive to Segovia, Valladolid, Zamora and León.
Already connected by tunnels used by conventional rail lines, a tunnel link connecting the Atocha and Chamartín stations with high-speed rail services is finished but, as of August 2019, yet to be inaugurated.

### Metro

Serving the city's population of some six million, the Madrid Metro is one of the most extensive and fastest-growing metro networks in the world. With the addition of a loop serving suburbs to Madrid's south-west "Metrosur", it is now the second largest metro system in Western Europe, second only to London's Underground. In 2007, Madrid's metro system was expanded, and it currently runs over 322 kilometers (200 mi) of line. The province of Madrid is also served by an extensive commuter rail network called Cercanías.
Metro fees are regulated by the Consorcio Regional de Transportes de Madrid (CRTM) jointly with fees for commuter rail, bus transport and light-rail.

## Culture
### Symbols

The flag, coat of arms and hymn of the Community of Madrid were set through the regional Law 2/1983 published in the official regional gazette on 24 December 1983:

#### Flag

The flag is described as follows: "the flag of the Community of Madrid is crimson red, with seven silver five-pointed stars, arranged 4 and 3 on the centre of the canvas". According to the law, the flag should wave both at the outdoors (occupying a preferential place next to the flag of Spain) and at the indoors of every public building of the autonomous administration as well as every public building of the municipal administrations located within the territory of the autonomous community.

#### Coat of arms

The arms are described as follows: "The coat of arms of the Community of Madrid features just one partition gules, and on it, two paired, embattled, turreted, castles or, with port and windows tinctured azure, masoned sable, surmounted by seven five-pointed stars argent arranged four and three on chief." The crest describes the heraldic representation of the royal crown of Spain.

#### Hymn

The official anthem was defined along the flag and coat of arms. However it has very limited institutional use, and thus, it is barely known.

### Cuisine

Although the region does not produce enough food to be self-sufficient, the varied territory of the region outside the urbanised centre provides enough food commodities to create its own cuisine: cheese of Campo Real, vine with Vinos de Madrid DO, strawberries and aspargus from Aranjuez, melons from Villaconejos, artichokes from Ciempozuelos, judiones from Montejo de la Sierra, garlic from Chinchón, chickpeas from Navalcarnero, lentils from Colmenar de Oreja, cauliflower from Griñón or a number of vegetables from the Alberche Valley.
In addition, due to the rich restaurant business in the region, "all the regional cuisines of Spain are represented in Madrid" according to José del Corral Raya [es]. As the madrilenian cuisine has absorbed much from the rest of regional cuisines of Spain, there is ambiguity when it comes to define the former; however, dishes such as the cocido madrileño, the potaje de garbanzos, the callos a la madrileña [es], the sopa de ajo or the tortilla de patatas are considered part of the madrilenian cuisine regardless of their geographical specificity. By April 2011 the region had over 40,000 bars, 2,700 coffee shops and nearly 10,000 restaurants.

### Religion

The majority of the religious population is Catholic, Roman Catholicism is, by far, the largest religion in Community of Madrid. According to a 2019 CIS poll, 18.9% of the surveyed people in the region identified as practising Catholic and 43.0% as non-practising Catholic. The most important religious minorities are evangelicals, Jews and Muslims.
Among the evangelical denominations the following denominations stand out: Spanish Evangelical Church (IEE), several Presbiterian or Reformed Churches, the Spanish Reformed Episcopal Church (IERE), Baptist and Free churches (Unión Evangélica Bautista Española, Federación de las Iglesias Evangélicas Independientes de España), the Asambleas de Hermanos), Pentecostal Churches (Asambleas de Dios, Iglesia de la Biblia Abierta, Iglesia Filadelfia, Iglesia Cuadrangular), Charismatic churches (Iglesias de Buenas Noticias, Asamblea Cristiana, Asamblea para la Evangelización Mundial para Cristo), minor churches such as The Salvation Army, Mennonite Churches and Hermanos en Cristo), non-grouped evangelical churches, and adventist churches. Pentecostal churches have lately experienced a notable growth due to the arrival of immigrants from Latin-America. Evangelicals also have a notable following among the Romani population. The Muslim population includes the first contemporary Muslims in Spain (who came from Middle East and had middle class university background), converts (chiefly sunni Muslims) and representatives of a second arrival of Muslim economic migrants (with more of an economic migrant profile than the first wave).
Since the second half of the 20th century the Jewish population in the region grew due to both Sephardi Jews that came from the MENA, as well as exiles from Latin America (mostly Argentinians) primordially Ashkenazim.
There are also Greek, Romanian and Russian orthodox Christians, Jehovah Witnesses (15,031 according to 2001 estimations) and Mormons (6,700 according to 2007 estimations). There are some buddhists (the majority of which have Spanish citizenship and are from the middle to upper middle class), and small minorities of believers of religions of vedic origin: hinduism (primordially Sindhis), sikhism, Hare Krishna and Brahma Kumaris. There are a scarce amount of believers of the Baháʼí Faith. Other confessions, often derided as "cults" (sectas) in the country, such as the Unification movement and Scientology, have a marginal presence.

### Feasts

The regional day is the 2 May, commemorating the Dos de Mayo Uprising of the citizens of Madrid against the French occupation in 1808 that triggered the wave of insurrections marking the beginning of the Peninsular War. It is a public holiday in the Community of Madrid since 1984, when it was approved by the regional legislature and sanctioned as law.
A floral tribute is traditionally offered to the fallen "heroes" by the regional authorities. The ceremony of presentation of commemorative medals to stand out individuals also take place on this day in the Royal House of the Post Office.

### Sports

According to a 2010 study by the National Sports Council (CSD), madrilenians led the country in terms of grassroots sports practice.
Roughly a 52% of the regional population between 15 and 75 years old practised one sports modality, while a 10% of the population between 15 and 75 years old practised two or more sports. The most practised sports modalities were: fitness gymnastics (43.6%), football (22.1%), swimming (20.7%), cycling (19.6%), jogging/running (16.2%), padel (9.9%), athletics (8.3%), basketball (6.9%), other football modalities (6.6%), hiking (6.1%), martial arts (4.5%), body-building (3.5%), shooting/hunting (0.9%), and recreational fishing (0.2%).
Association football is the most popular sport in Spain in terms of passive following. The Madrid Football Federation is the governing body of the sport of football in region. The Community of Madrid has its own autonomous team, the Madrid autonomous football team, taking part in friendly fixtures. It currently has 2 top flight men's football teams: Real Madrid and Atlético Madrid. The first of them, Real Madrid, has become one of the most valuable sports teams in the planet.
The regional administration had its own big track and field stadium, "La Peineta", inaugurated in 1994. It was later transferred to the Madrid City Council, becoming the center of two unsuccessful bids of the city of Madrid to the Summer Olympics.

## International relations
### Twinning

* Beijing, China (2005)