Most magma comprises solutions of silicates melted at temperatures from 700-1600 °C depending upon the environment in which the parent rock melted. Unusual black lava carbonates (natrocarbonatite) of the intracontinental volcano Oldoinyo Lengai are molten at temperatures as low as 600 °C.
The melting of rock is determined by temperature, pressure, and composition and occurs in association with mantle plumes or tectonic processes. The composition of magma can alter after melting of the parent rock by processed that include contamination, fractional crystallization, and mixing of magma with other molten rock.
Rocks melt at a range of temperatures, depending upon pressure and the presence of water and gases. Greater temperatures are required to melt a given dry rock at greater pressures, whereas wet rocks initially melt at decreasing temperatures with increasing pressure and then transition to requiring greater temperatures with further increase in pressure. (above left -dry rock with partial melts of liquid and crystals; above right - wet rock with partial melts comprising liquid, crystals, and vapor).
Burial of rock exposes the minerals to heating along the geothermal gradient, which is elevated by convection within the asthenosphere, bringing the rock to temperatures high enough for partial melting.
The geothermal gradient is defined as the rate of change of temperature (ΔT) with depth (ΔZ), in the Earth. At depths down to about 60 m, temperature is constant at about 11°C. Between 60 and 120 m, the geothermal gradient is variable because it is affected by atmospheric changes and circulating ground water. Below 120 m, temperature almost invariably increases with depth, though the rate of increase with depth varies with both tectonic setting and the thermal properties of the rock.
High gradients (up to 200°C/km) are observed along oceanic spreading centers and along island arcs due to magma rising to the surface. Low gradients are observed in tectonic subduction zones because of cold, water-filled sediments thrusting beneath the existing crust. Tectonically stable shield areas and sedimentary basins have average gradients that typically vary from 15–30°C/km.