Los Angeles is the largest city in the state of California and the Western United States as well as second largest in the United States. Often abbreviated as L.A. and nicknamed The City of Angels, Los Angeles is rated an alpha world city, has an estimated population of 3.8 million and spans over 498.3 square miles (1,290.6 km2) in Southern California. Additionally, the Los Angeles metropolitan area is home to nearly 12.9 million residents, who hail from all over the globe and speak 224 different languages. Los Angeles is the seat of Los Angeles County, the most populated and one of the most diverse counties in the United States. Its inhabitants are known as "Angelenos."

Los Angeles was founded September 4, 1781, by Spanish governor Felipe de Neve as El Pueblo de Nuestra Señora la Reina de los Ángeles de la Porciúncula (The Village of Our Lady, the Queen of the Angels of Porziuncola). It became a part of Mexico in 1821, following its independence from Spain. In 1848, at the end of the Mexican-American War, Los Angeles and California were purchased as part of the Treaty of Guadalupe Hidalgo, thereby becoming part of the United States; Mexico retained the territory of Baja California. Los Angeles was incorporated as a municipality on April 4, 1850, five months before California achieved statehood.

Los Angeles is one of the world's centers of business, international trade, entertainment, culture, media, fashion, science, technology, and education. It is home to renowned institutions covering a broad range of professional and cultural fields, and is one of the most substantial economic engines within the United States. Los Angeles leads the world in producing popular entertainment — such as motion picture, television, and recorded music — which forms the base of its international fame and global status.

The Los Angeles coastal area was first settled by the Tongva (or Gabrieleños) and Chumash Native American tribes hundreds of years ago. The first Europeans arrived in 1542 under Juan Rodríguez Cabrillo, a Portuguese-born explorer who claimed the area as the City of God for the Spanish Empire. However, he continued with his voyage and did not establish a settlement. The next contact would not come until 227 years later, when Gaspar de Portola, along with Franciscan missionary Juan Crespí, reached the present site of Los Angeles on August 2, 1769. Crespí noted that the site had the potential to be developed into a large settlement.

In 1771, Franciscan friar Junípero Serra built the Mission San Gabriel Arcangel near Whittier Narrows, in what is now called San Gabriel Valley. In 1777, the new governor of California, Felipe de Neve, recommended to Antonio María de Bucareli y Ursúa, viceroy of New Spain that the site noted by Juan Crespí be developed into a pueblo. The town was officially founded on September 4, 1781, by a group of forty-four settlers known as "Los Pobladores." Tradition has it that on this day they were escorted by four Spanish colonial soldiers, two priests from the Mission and Governor de Neve. The town was named El Pueblo de Nuestra Señora la Reina de los Ángeles del Río de Porciúncula (The Town of Our Lady the Queen of the Angels on the Porciúncula River). These pueblo settlers came from the common Hispanic culture that had emerged in northern Mexico among a racially mixed society. Two-thirds of the settlers were mestizo or mulatto, and therefore, had African and Indian ancestry. More importantly, they were intermarrying. The settlement remained a small ranch town for decades, but by 1820 the population had increased to about 650 residents. Today, the pueblo is commemorated in the historic district of Los Angeles Pueblo Plaza and Olvera Street, the oldest part of Los Angeles.

New Spain achieved its independence from the Spanish Empire in 1821, and the pueblo continued as a part of Mexico. During Mexican rule, Governor Pío Pico, made Los Angeles Alta California's regional capital. Mexican rule ended during the Mexican–American War: Americans took control from the Californios after a series of battles, culminating with the signing of the Treaty of Cahuenga on January 13, 1847.

Los Angeles was incorporated as an American city on April 4, 1850. Some of the residents resisted the new Anglo powers by resorting to social banditry against the gringos. In 1856, Juan Flores threatened Southern California with a full-scale revolt. He was hanged in Los Angeles in front of 3,000 spectators. Tiburcio Vasquez, a legend in his own time among the Mexican-born population for his daring feats against the Anglos, was captured in what is believed to be present-day West Hollywood. He was found guilty of two counts of murder by a San Jose jury in 1874, and was hanged there in 1875.

The thriving Chinatown was the site of terrible violence in 1871. A tong war between rival gangs resulted in the accidental death of a white man. This enraged the white populace and a mob of 500 white men descended on Chinatown. They killed 19 Chinese men and boys, only one of whom had been involved in the original killing, as well as a white man who tried to protect them. Homes and businesses were looted. A grand jury investigation followed, but only one man ever served prison time. This was later referred to as the Chinese Massacre of 1871.

In the 1870s, Los Angeles was still little more than a village of 5,000. By 1900, there were over 100,000 occupants of the city. Several men actively promoted Los Angeles, working to develop it into a great city and to make themselves rich. Angelenos set out to remake their geography in order to challenge San Francisco with its port facilities, railway terminal, banks and factories. The Farmers and Merchants Bank was the first incorporated bank in Los Angeles, founded in 1871 by John G. Downey and Isaias W. Hellman.

The first railroad in what is today Los Angeles was inaugurated in October 1869 and ran on a 21-mile stretch between the City of San Pedro and Los Angeles. But the town continued to grow at a moderate pace until it attained railway connection with the Central Pacific and San Francisco in 1876, and with the East by the Santa Fe system (through its subsidiary California Southern Railroad) in 1885. The completion of the latter line precipitated one of the most extraordinary of American railway wars and land booms, which resulted in giving southern California a great stimulus.

Phineas Banning excavated a channel out of the mud flats of San Pedro Bay leading to Wilmington in 1871. Banning had already laid track and shipped in locomotives to connect the port to the city. Harrison Gray Otis, founder and owner of the Los Angeles Times, and a number of business colleagues embarked on reshaping southern California by expanding that into a harbor at San Pedro using federal dollars.

This put them at loggerheads with Collis P. Huntington, president of the Southern Pacific Railroad Company and one of California's "Big Four" investors in the Central Pacific and Southern Pacific. (The "Big Four" are sometimes numbered among the "robber barons" of the Gilded Age). The line reached Los Angeles in 1876 and Huntington directed it to a port at Santa Monica, where the Long Wharf was built.

The San Pedro forces eventually prevailed (though it required Banning to turn his railroad over to the Southern Pacific) and work on the San Pedro breakwater began in 1899 and was finished in 1910. Otis Chandler and his allies secured a change in state law in 1909 that allowed Los Angeles to absorb San Pedro and Wilmington, using a long, narrow corridor of land to connect them with the rest of the city.

Oil was discovered by Edward L. Doheny in 1892, near the present location of Dodger Stadium. Los Angeles became a center of oil production in the early 20th century (by 1923 the region was producing one-quarter of the world's total supply, and it is still a significant producer).

In order to sustain future growth, the city needed new sources of water. The only local water in Los Angeles was the intermittent Los Angeles River and groundwater replenished by the area's minimal rain. Legitimate concerns about water supply were exploited to gain backing for a huge engineering and legal effort to bring more water to the city and allow more development. 250 miles (400 km) northeast of Los Angeles in Inyo County, near the Nevada state line, a long slender desert region known as the Owens Valley had the Owens River, a permanent stream of fresh water fed by the melted snows of the eastern Sierra Nevada that collected in the shallow, saline Owens Lake, where it evaporated.

Sometime between 1899 and 1903, Harrison Gray Otis and his son-in-law successor, Harry Chandler, engaged in successful efforts at buying up cheap land on the northern outskirts of Los Angeles in the San Fernando Valley. At the same time, they enlisted the help of William Mulholland, chief engineer of the Los Angeles Water Department (later the Los Angeles Department of Water and Power or LADWP), and J.B. Lippencott, of the United States Reclamation Service. Lippencott performed water surveys in the Owens Valley for the Service while secretly receiving a salary from the City of Los Angeles. He succeeded in persuading Owens Valley farmers and mutual water companies to pool their interests and surrender the water rights to 200,000 acres (800 km²) of land to Fred Eaton, Lippencott's agent and a former mayor of Los Angeles. Lippencott then resigned from the Reclamation Service, took a job with the Los Angeles Water Department as assistant to Mulholland, and turned over the Reclamation Service maps, field surveys and stream measurements to the city. Those studies served as the basis for designing the longest aqueduct in the world.

By July 1905, the Times began to warn the voters of Los Angeles that the county would soon dry up unless they voted bonds for building the aqueduct. Artificial drought conditions were created when water was run into the sewers to decrease the supply in the reservoirs and residents were forbidden to water their lawns and gardens. On election day, the people of Los Angeles voted for $22.5 million worth of bonds to build an aqueduct from the Owens River and to defray other expenses of the project. With this money, and with a special Act of Congress allowing cities to own property outside their boundaries, the City acquired the land that Eaton had acquired from the Owens Valley farmers and started to build the aqueduct. On the occasion of the opening of the Los Angeles Aqueduct on November 5, 1913 Mullholland's entire speech was five words: "There it is. Take it."

The growth of Los Angeles in this period, and the initial establishment of suburbs, transportation corridors and commuting patterns, was influenced to a great extent by the Pacific Electric Railway, the electrically powered passenger and freight railway established by Collis P. Huntington's nephew, Henry Huntington, in 1901. The Pacific Electric was the largest electrically operated railway in the world at its peak, with over 1,000 miles of trackage, and passengers could take interurban trains from locations as far afield as San Fernando, Santa Monica, San Bernardino, Long Beach, and Newport Beach to central Los Angeles, with destinations over three counties.

The first round-the-world trip by airplane began on March 17, 1924 in adjoining Santa Monica. Four open cockpit planes built by Douglas Aircraft Company took 175 days to travel more than 26,000 miles before returning (one was destroyed in a crash, but the crew survived). Another round-the-world attempt also began locally, but ended in tragedy. On May 21, 1937 Amelia Earhart began her final, fatal trip at nearby Burbank Airport.

Los Angeles hosted the 1932 Summer Olympics. The Los Angeles Memorial Coliseum, which had opened in May, 1923 with a seating capacity of 76,000, was enlarged to accommodate over 100,000 spectators for Olympic events. It is still in use by the USC Trojans football team. Olympic Boulevard, a major thoroughfare, honors the occasion.

The City of Los Angeles mostly remained within its original 28 square-mile (73 km²) landgrant until the 1890s. The original city limits are visible even today in the layout of streets that changes from a north-south pattern outside of the original land grant to a pattern that is shifted roughly 15 degrees east of the longitude. The first large additions to the city were the districts of Highland Park and Garvanza to the north, and the South Los Angeles area. In 1906, the approval of the Port of Los Angeles and a change in state law allowed the city to annex the Shoestring, or Harbor Gateway, a narrow and crooked strip of land leading from Los Angeles south towards the port. The port cities of San Pedro and Wilmington were added in 1909 and the city of Hollywood was added in 1910, bringing the city up to 90 square miles (233 km²) and giving it a vertical "barbell" shape. Also added that year was Colegrove, a suburb west northwest of the city near Hollywood; Cahuenga, a township northwest of the former city limits; and a part of Los Feliz were annexed to the city.

The opening of the Los Angeles Aqueduct provided the city with four times as much water as it required, and the offer of water service became a powerful lure for neighboring communities. The city, saddled with a large bond and excess water, locked in customers through annexation by refusing to supply other communities. Harry Chandler, a major investor in San Fernando Valley real estate, used his Los Angeles Times to promote development near the aqueduct's outlet. By referendum of the residents, 170 square miles (440 km²) of the San Fernando Valley, along with the Palms district, were added to the city in 1915, almost tripling its area, mostly towards the northwest. Over the next seventeen years dozens of additional annexations brought the city's area to 450 square miles (1,165 km²) in 1932. Numerous other smaller annexations brought the total area area of the city up to 469 square miles (1,215 km²) as of 2004.

Most of the annexed communities were unincorporated towns but ten incorporated cities were consolidated into Los Angeles: Wilmington (1909), San Pedro (1909), Hollywood (1910), Sawtelle (1922), Hyde Park (1923), Eagle Rock (1923), Venice (1925), Watts (1926), Barnes City (1927), and Tujunga (1932).

During World War II, Los Angeles grew as a center for production of aircraft, war supplies and ammunitions. Thousands of African Americans and European American Southerners migrated to the area to fill factory jobs.

By 1950, Los Angeles was an industrial and financial giant created by war production and migration. Los Angeles assembled more cars than any city other than Detroit, made more tires than any city but Akron, made more furniture than Grand Rapids, and stitched more clothes than any city except New York. In addition, it was the national capital for the production of motion pictures, radio programs and, within a few years, television shows. Construction boomed as tract houses were built in ever expanding suburban communities financed by the largess of the Federal Housing Administration.

Los Angeles continued to spread out, particularly with the development of the San Fernando Valley and the building of the freeways launched in the 1940s. When the local street car system went out of business, Los Angeles became a city built around the automobile, with all of the social, health and political problems that this dependence produces.

The famed urban sprawl of Los Angeles became a notable feature of the town, and the pace of the growth accelerated in the first decades of the 20th century. The San Fernando Valley, sometimes called "America's Suburb," became a favorite site of developers, and the city began growing past its roots downtown toward the ocean and towards the east.

This is also the time when General Motors persuaded most urban regions in North America to shut down their light rail street car systems and replace them for more flexible, but polluting and inefficient, bus systems. This drastically changed growth and travel patterns in the city in subsequent years and contributed to the severe air pollution events that Los Angeles became famous for.

Beginning November 6, 1961, Los Angeles suffered three days of destructive brush fires. The Bel-Air—Brentwood and Santa Ynez fires destroyed 484 expensive homes and 21 other buildings along with 15,810 acres (64 km²) of brush in the Bel-Air, Brentwood, and Topanga Canyon neighborhoods. Most of the homes destroyed had wooden shake roofs, which not only led to their own loss but also sent firebrands up to three miles away. Despite this, few changes were made to the building codes to prevent future losses.

The repeal of a law limiting building height and the controversial redevelopment of Bunker Hill, which destroyed a picturesque though decrepit neighborhood, ushered in the construction of a new generation of sky scrapers. Bunker Hill's 62-floor First Interstate Building (later named Aon Center) was the highest in Los Angeles when it was completed in 1973. It was surpassed by the Library Tower (now called the U.S. Bank Tower) a few blocks to the north in 1990, a 310 m (1,018 ft) building that is the tallest west of the Mississippi. Outside of Downtown, the Wilshire Corridor is lined with tall buildings, particularly in the vicinity of Westwood. Century City, developed on the former 20th Century Fox back lot, has become another center of high-rise construction on the Westside.

During the latter decades of the 20th century, the city saw an increase in gang warfare. At the same time, crack cocaine became wildly available during the 1980s. Since the early 1990s, the city saw a decrease in crime and gang violence through the process of gentrification and urban development in many neighborhoods.

A subway system, developed and built through the 1980s as a major goal of mayor Tom Bradley, stretches from North Hollywood to Union Station and connects to light rail lines that extend to the neighboring cities of Long Beach, Norwalk, and Pasadena, among others. Also, a commuter rail system, Metrolink, has been added that stretches from nearby Ventura and Simi Valley to San Bernardino, Orange County, and Riverside. The funding of the Los Angeles County Metropolitan Transportation Authority project is funded by a half cent tax increase added in the mid 1980s, which yields $400 million every month. Although the regional transit system is growing, subway expansion was halted in the 1990s over methane gas concerns, political conflict, and construction and financing problems during Red Line Subway project, which culminated in a massive sinkhole on Hollywood Boulevard. As a result, the original subway plans have been delayed for decades as light rail systems, dedicated busways, and limited-stop "Rapid" bus routes have become the preferred means of mass transit in LA's expanding series of gridlocked, congested corridors.

The 1995 murder of Stephanie Kuhen in Los Angeles led to condemnation from President Bill Clinton and a crackdown on Los Angeles-area gangs.

In the last fifty years, Los Angeles has lost much of the industry it developed earlier in the 20th century. The last of the automobile factories shut down in the 1990s; the tire factories and steel mills left earlier. Most of the agricultural and dairy operations that were still prospering in the 1950s have moved to outlying counties while the furniture industry has relocated to Mexico and other low-wage nations. Aerospace production has dropped significantly since the end of the Cold War or moved to states with better tax conditions, and the entertainment industry has found cheaper areas to produce films, television programs and commercials elsewhere in the United States and Canada. However, many studios still operate in Los Angeles, such as CBS Television City at the corner of Fairfax Avenue and Beverly Boulevard, 20th Century Fox in Century City, NBC-Universal and Disney in Burbank, Universal Studios in Universal City, and Burbank Studios on Olive Avenue in Burbank, as well as other films that use Los Angeles for certain parts. While Los Angeles remains a major center for garment production, it has become far more dependent on the service sector.

Those macroeconomic changes have brought major social changes with them. While unemployment dropped in Los Angeles in the 1990s, the newly created jobs tended to be low-wage jobs filled by recent immigrants and other exploitable populations; by one calculation, the number of poor families increased from 36% to 43% of the population of Los Angeles County during this time. At the same time, the number of immigrants from Mexico, Central America and Latin America has made Los Angeles a "majority minority" city that will soon be majority Latino. The unemployment rate dropped from 6.9% to 6.8% in 2002.

The desire for residential housing in the downtown area has been noticed, and several historical buildings have been renovated as condos (while maintaining the original outside design), and many new apartment and condominium towers and complexes are being built.

On 10 November 2004, the Daily News reported plans to turn the north-east San Fernando Valley into an industrial powerhouse, which would provide new and more jobs.

Many communities in Los Angeles have changed their ethnic character over time. Before the 1980s, the city was predominantly white, but had became increasingly diverse in recent decades. Watts, which started out as an Italian community but then became predominantly black, is now mainly Latino. Compton, which lies outside of the City of Los Angeles, but within the County of Los Angeles, and which has gained a certain notoriety through rap music from N.W.A. and other groups, is also increasingly Latino. While the Latino community within the City of Los Angeles was once centered on the Eastside, it now extends throughout the city. The San Fernando Valley, which represented a bastion of white flight in the 1960s and provided the votes that allowed Sam Yorty to defeat the first election run by Tom Bradley, is now as ethnically diverse as the rest of the city on the other side of the Hollywood Hills.

By the end of the 20th century, some of the annexed areas began to feel cut off from the political process of the megalopolis, leading to a particularly strong secession movement in the San Fernando Valley and weaker ones in San Pedro and Hollywood. The referendums to split the city were rejected by voters in November 2002.