California is a state in the Pacific Region of the United States. With over 39.3 million residents across a total area of approximately 163,696 square miles (423,970 km2), it is the most populous U.S. state and the third-largest by area, as well as the world's thirty-fourth-most-populous subnational entity. California is also the most populated subnational entity in North America, and has its state capital in Sacramento. The Greater Los Angeles area and the San Francisco Bay Area are the nation's second- and fifth-most-populous urban regions, with more than 18.7 million and 9.6 million residents respectively. Los Angeles is California's most populous city, and the country's second-most-populous, after New York City. California also has the nation's most populous county, Los Angeles County, and its largest county by area, San Bernardino County. The City and County of San Francisco is both the country's second most densely populated major city after New York City and the fifth-most-densely populated county, behind only four of the five New York City boroughs.
California's economy, with a gross state product of $3.2 trillion as of 2019, is the largest sub-national economy in the world. If it were a country, California would be the fifth-largest economy in the world, and the 37th-most populous as of 2020. The Greater Los Angeles area and the San Francisco Bay Area are the nation's second- and third-largest urban economies ($1.3 trillion and $1.0 trillion respectively as of 2020), after the New York metropolitan area ($2.0 trillion). The San Francisco Bay Area Combined Statistical Area had the nation's highest gross domestic product per capita in 2018 ($106,757) among large primary statistical areas, and is home to four of the world's ten largest companies by market capitalization and four of the world's ten richest people.California is considered a global trendsetter in popular culture, communication, information, innovation, environmentalism, economics, politics, and entertainment. As a result of the state's diversity and migration, California integrates foods, languages, and traditions from other areas across the country and around the globe. It is considered the origin of the hippie counterculture, beach and car culture, the Internet, and the personal computer, among others. The San Francisco Bay Area and the Greater Los Angeles Area are widely seen as centers of the global technology and entertainment industries, respectively. California's economy is very diverse: 58% of it is based on finance, government, real estate services, technology, and professional, scientific, and technical business services. Although it accounts for only 1.5% of the state's economy, California's agriculture industry has the highest output of any U.S. state.California shares a border with Oregon to the north, Nevada and Arizona to the east, and the Mexican state of Baja California to the south. The state's diverse geography ranges from the Pacific Coast in the west to the Sierra Nevada mountain range in the east, and from the redwood and Douglas fir forests in the northwest to the Mojave Desert in the southeast. The Central Valley, a major agricultural area, dominates the state's center. Although California is well-known for its warm Mediterranean climate and monsoon seasonal weather, the large size of the state results in climates that vary from moist temperate rainforest in the north to arid desert in the interior, as well as snowy alpine in the mountains. All these factors lead to an enormous demand for water; in total numbers, California is the largest consumer of water in North America. Over time, drought and wildfires have become more frequent; further straining California's water security.What is now California was first settled by various Native Californian tribes before being explored by a number of Europeans during the 16th and 17th centuries. The Spanish Empire then claimed and colonized it. In 1804 it was included in Alta California province, within the Viceroyalty of New Spain. The area became a part of Mexico in 1821 following its successful war for independence but was ceded to the United States in 1848 after the Mexican–American War. The western portion of Alta California was then organized and admitted as the 31st state on September 9, 1850. The California Gold Rush starting in 1848 led to dramatic social and demographic changes, with large-scale emigration from the east and abroad with an accompanying economic boom.