Most of the rock now exposed in the park is granitic, having been formed 210 to 80 million years ago as igneous diapirs 6 miles (10 km) below the surface. Over time, most of the overlying rock was uplifted along with the rest of the Sierra Nevadas and was removed from the area by erosion. This exposed the granitic rock to much lower pressure, and it was also subjected to erosion in the forms of exfoliation and mass wasting.

Starting about 3 million years ago a series of glaciations further modified the area by accelerating the erosion. During that time large glaciers periodically filled the valleys and canyons. Landslides and river erosion have been the primary erosive forces since the end of the last glacial period, which ended in this area around 10,000 BC.

Formation of exposed rocks

Passive to active margin

The area of the park was astride a passive continental margin (similar to the east coast of present-day United States) during the Precambrian and early Paleozoic. Sediment was derived from continental sources and was deposited in shallow water. The limestones, sandstones, and shales thus created have since been metamorphosed into marble, quartzite, and slate. These rocks are now exposed on isolated pendants in the northern and central parts of the park (Snow Lake Pendant in the Emigrant Wilderness is a good example).

Starting in the mid-Paleozoic and lasting into the early Mesozoic, a Convergent Plate Boundary transported many of the above-mentioned seabed sediments into the area of the park (possibly during the Antler orogeny). Heat generated from the subduction led to the creation of an island arc of volcanoes on the west coast of Laurentia (proto-North America) between the late Devonian and Permian periods. These rocks were incorporated into proto-North America by the middle of the Triassic, some of them finding their way to the area of the park. Most of these igneous and sedimentary rocks have since been heavily metamorphosed, uplifted and eroded away. Outcrops of the resulting Shoo Fly Complex (made of schists and gneisses) and younger Calaveras Complex (a mélange of shale, siltstone, and chert with mafic inclusions) are now found in the western side of the park.

Later volcanism in the Jurassic intruded and covered these rocks in what may have been magmatic activity associated with the early stages of the creation of the Sierra Nevada Batholith. 95% of these rocks were eventually removed by uplifted-accelerated erosion. Most of the remaining rocks are exposed as 'roof pendents' in the eastern metamorphic zone. Mount Dana and Mount Gibbs are made of these metavolcanic rocks. Only 5% of the rocks exposed in Yosemite National Park are metamorphic. (Geology of U.S. Parklands, page 218)

Pluton emplacement

The first phase of regional plutonism started 210 million years ago in the late Triassic and continued throughout the Jurassic to about 150 million years BP. Also starting 150 million years ago was an increase in the westward drift rate of the North American Plate. The resulting orogeny (mountain-building event) is called the Nevadan orogeny by geologists. The resulting Nevadan mountain range (also called the Ancestral Sierra Nevada) was 15,000 feet (4500 m) high and was made of sections of seafloor and mélange.

These rocks were later metamorphosed and today can be seen in the gold-bearing metamorphic belt of California's Mother Lode country. In the area of the park these rocks are exposed along the Merced River and State Route 140. This was directly part of the creation of the Sierra Nevada Batholith, and the resulting rocks were mostly granitic in composition and emplaced about 6 miles (10 km) below the surface.

The second, major pluton emplacement phase lasted from about 120 million to 80 million years ago during the Cretaceous. This was part of the Sevier orogeny. All told there have been more than 50 plutons found in the park. A few miles (several km) of material was eroded away, leaving the Nevadan mountains as a long series of hills a few hundred feet (tens of meters) high by 25 million years ago.

Cenozoic activity

Volcanism

Starting 20 million years ago and lasting until 5 million years ago a now-extinct extension of Cascade Range volcanos erupted, bringing large amounts of igneous material in the area. These igneous deposits blanketed the region north of the Yosemite area. Some lava associated with this activity poured into the Grand Canyon of the Tuolumne and formed Little Devils Postpile (a smaller but much older version of the columnar basalt palisades in nearby Devils Postpile National Monument).

In the late Cenozoic, extensive volcanism occurred east of the park area. Within the Yosemite region, andesitic lava flows and lahars flowed north of the Grand Canyon of the Tuolumne and volcanic dikes and plugs developed from faults on the flanks of Mount Dana. There is also evidence for a great deal of rhyolitic ash covering the northern part of the Yosemite region 30 million years ago. This and later ash deposits have been almost completely eroded away (especially during the ice ages).

Uplift and erosion

10 million years ago, vertical movement along the Sierra fault started to uplift the Sierra Nevada. Subsequent tilting of the Sierra block and the resulting accelerated uplift of the Sierra Nevada increased the gradient of western-flowing streams. The streams consequently ran faster and thus cut their valleys more quickly. Tributary streams ran more-or-less in line with the Sierras, therefore not having their gradients increased. Thus their rate of valley cutting was not significantly affected. The results were hanging valleys and cascading waterfalls where the tributaries met the main streams. Additional uplift occurred when major faults developed to the east, especially the creation of Owens Valley from Basin and Range-associated extensional forces. Uplift of the Sierra accelerated again about two million years ago during the Pleistocene. However, Yosemite valley was not created by streams or fault lines (to create a graben valley), such was suggested by geologist Josiah Whitney. Glaciers shaped the Yosemite Valley, and can easily be confused with a graben valley. (Example of a graben valley is Death Valley in California)

The uplifting and increased erosion exposed granitic rocks in the area to surface pressures, resulting in exfoliation (responsible for the rounded shape of the many granite domes in the park) and mass wasting following the numerous fracture joint planes (cracks; especially vertical ones) in the now solidified plutons. Pleistocene glaciers further accelerated this process and the larger ones transported the resulting talus and till from valley floors.

Numerous vertical joint planes controlled where and how fast erosion took place. Most of these long, linear and very deep cracks trend northeast or northwest and form parallel, often regularly-spaced sets. They were created by uplift-associated pressure release and by the unloading of overlying rock via erosion. The great majority of Yosemite Valley's widening, for example, was due to joint-controlled rockfall. In fact, only 10% of its widening and 12% of its excavation are thought to be the result of glaciation (Yosemite: A Visitors Companion, pgs 75-76). Large, relatively unjointed volumes of granite form domes such as Half Dome and monoliths like the 3604 feet (1098 m) high El Capitan. Closely-spaced joints lead to the creation of columns, pillers, and pinnacles such as Washington Column, Cathedral Spires, and Split Pinnacle.

Glaciations

Starting about 2 to 3 million years ago a series of glaciations further modified the area by accelerating mass wasting through ice-wedging, glacial plucking, scouring/abrasion and the release of pressure after the retreat of each glaciation. Severe glaciations formed very large glaciers that tended to strip and transport top soil and talus piles far down glacial valleys, while less-severe glaciations deposited a great deal of glacial till further up in the valleys.

At least 4 major glaciations have occurred in the Sierra Nevada; locally called the Sherwin (also called the pre-Tahoe), Tahoe, Tenaya, and Tioga. The Sherwin glaciers were the largest, filling Yosemite and other valleys, while later stages produced much smaller glaciers. The Sherwin may have lasted almost 300 thousand years and ended about 1 million years ago. A Sherwin-age glacier was almost surely responsible for the major excavation and shaping of Yosemite Valley and other canyons in the area.

The Tahoe, Tenaya, and Tioga stages were part of the Wisconsinan glaciation. The Tahoe glacial stage is thought to have reached its maximum extent around 70,000 to 130,000 years ago; little is known about the more recent Tenaya. Evidence also suggests that the most recent local glacial stage, the Tioga, started about 28,000 cal (calibrated ) years ago, reached its maximum extent 20,000 to 25,000 cal yr ago, and ended by ~15,000 cal yr ago. Glaciers reformed in the highest cirques during a minor late-glacial readvance, the Recess Peak event,, between about 14,200 and 13,100 yr ago.

After that, glaciers appear to have been absent from the range until about 3200 cal yr ago, when small glaciers reappeared in the highest cirques. This readvance records the onset of Neoglaciation in the Sierra Nevada. Neoglaciation in the range culminated during the "Little Ice Age," a term originally coined by Francois Matthes in the Sierra Nevada, but now widely accepted as referring to a period of global glacial expansion between about AD 1250 to 1900. Moraines in the Sierra Nevada related to the Little Ice Age event are termed Matthes deposits. They are common in north-facing cirques and below modern glaciers in the High Sierra and are typically fresh, unstable, and often ice-cored. Good examples of Matthes moraines can be found below the Palisade Glacier (the largest glacier in the range), Lyell and Maclure glaciers in southern Yosemite N.P., and the smaller glaciers below Mount Dana, Kuna Peak, Mount Conness, and Matterhorn Peak.

Glacial systems reached depths of up to 4000 feet (1200 m) and left their marks in the Yosemite area. The longest glacier in the Yosemite area ran down the Grand Canyon of the Tuolumne River for 60 miles (95 km), passing well beyond Hetch Hetchy Valley. Merced Glacier flowed out of Yosemite Valley and into the Merced River Gorge. Lee Vining Glacier carved Lee Vining Canyon and emptied into Lake Russell (the much enlarged ice age version of Mono Lake). Only the highest peaks, such as Mount Dana and Mount Conness, were not covered by glaciers. Retreating glaciers often left recessional moraines that impounded lakes such as Lake Yosemite (a shallow lake that periodically covered much of the floor of Yosemite Valley).

Some domes in the park were covered by glaciers and modified into roche moutonnées, which are characterized by having a smooth, rounded side and a steep face. The rounded side was where the glacier flowed over the dome and the steep side is where the glacier flowed away from it. The steepness is caused by glacial plucking of rock along fracture joints. Good examples in the park are Liberty Cap, Lembert Dome, and Mount Broderick. Half Dome was created by a different process, but erosion acting on jointing planes was still the major factor.

Controversy

The origin of the geological landscapes of the park have been under debate since 1865. At that time, Josiah Whitney, then chief geologist of California, proposed that Yosemite Valley is a graben: a downdropped block of land surrounded by faults. John Muir proposed that Yosemite Valley and Hetch Hetchy Valley were formed purely by glacial action. In 1930, Francois Matthes proposed a hybrid hypothesis, where most of the depth of the valley was gouged by water erosion, the rest by glacial action. The glacial action also claimed to have widened the valley.

More recently, the debate has been reopened by Jeffrey Schaffer, who suggests that the role of glaciers and other erosion processes has been dramatically overstated. Schaffer states that Yosemite Valley above 5600 feet (1700 m), for example, has changed relatively little in the past 30 million years. Other than being slightly larger, if one could look back in time and see them, the major features would be recognizable to the modern eye. Schaffer believes that the numerous joint planes have had the greatest impact on the geomorphology of the Park's major features. This is in contradiction to the consensus view that huge highly-abrasive glaciers acting on joint planes combined with a great deal of uplift over just the past couple million years was the primary shaping force of the features (such rapid uplift would have greatly accelerated all types of erosion).