Both extrusive and intrusive igneous rocks are derived from magmas. The temperature and pressure conditions in the crust and upper mantle influence the melting temperatures of the minerals in the rocks.
Temperature and pressure increase with depth from the surface and eventually reach a point at which rocks melt. The geothermal gradient is the rate at which temperature increases with depth. In the upper crust, the geothermal gradient is about 2.5 degrees centigrade for every 100 meters (330 feet). Geothermal gradients are higher in volcanic regions. Mantle plumes are “hot spots” in the crust where mantle material has ascended along deep penetrating cracks in the crust and contributes heat for higher‐level melting. Country rock can also be melted from the heat of adjacent intrusions.
Friction is a source of heat in areas where large rock masses are grinding against one another—for example, during mountain‐building and plate tectonic activity. Heat is also released through the radioactive decay of elements such as uranium, a less important process that only marginally raises the geothermal gradient.
Because of higher pressures, temperatures, changes in density, and gases in solution, magmas tend to rise toward the surface through deep cracks and faults. Being more viscous, felsic magmas rise more slowly than mafic magmas. As magma moves upward it begins to cool, and minerals begin to differentiate.
A very hot magma assimilates the country rock it is moving through—that is, the country rock in contact with the magma melts and becomes part of the magma. If a magma assimilates a large amount of country rock, the chemistry of the magma changes. Different extrusive and intrusive rock types form from magmas according to the chemistry of the magma and the differentiation reactions that precipitate the various minerals that make up the igneous rock.
Partial melting is the process by which a portion of the magma that is forming from a melting mass of rock separates and rises as a distinct magma. As a rock is being heated, the first liquid that forms contains a high proportion of the minerals that have lower melting temperatures. A good example is basaltic magma, which is thought to be the result of partial melting in the mantle; the remaining magma in the mantle is then ultramafic in composition. If the entire rock melts, and no magmatic phases escape, the earlier‐forming and later‐forming liquids mix to form a magma that has the same composition as the original rock.