When magnesium ribbon is heated in air, it reacts with oxygen to form magnesium oxide. The chemical equation for the reaction is:
\[2Mg + O_2 \rightarrow 2MgO\]
The white ash produced is magnesium oxide (\(MgO\)).
The type of chemical reaction is a combustion reaction. In a combustion reaction, a substance reacts with oxygen to produce a new compound, releasing energy in the form of heat and light. In this case, magnesium reacts with oxygen from the air to produce magnesium oxide.