system
Given the following post, respond as if you're commenting on Reddit:
human
So we call it magma while underground and lava after it erupted. But why make the distinction in the first place? Is there anything materially different between magma and lava or is it just tradition to use the two different names for the same thing?
gpt
The rocks that they form are different. Magma cools slowly to form plutonic/intrusive rocks; lava cools rapidly to form volcanic/extrusive rocks. The rate of cooling is an important factor that determines the mineralogy of igneous rocks. Furthermore, magma composition could evolve as fractional crystallization occurs(minerals with different melting points crystalize sequentually); this often results in a final extrusive melt that is compositionally distinct from the magma whence it came.