How does temperature affect the formation of magma?
Magma is another name for molten rocks. Due to the heat of Earth's interior, rocks melt and rise to the surface. If there is an opening in the Earth's crust, the molten rocks flow over the surface and are known as lava. This is observed during volcanic eruptions.
The melting of rocks is a function of temperature. The higher the temperature, the more rock melts and the less viscous the magma is. It should be noted that there are a variety of rocks in the Earth's mantle and they melt at different temperatures. If the temperature is lower, only some rocks (generally the ones with more silicon content) will melt. Thus, at lower temperatures, we will observe magma with high silicon content. Temperature also affects the final magma composition and structure. For example, at lower temperatures, the magma crystallizes faster.
Hope this helps.