Question: is mg oxidized or reduced?
Answer: When magnesium reacts with oxygen, the magnesium atoms donate electrons to O2 molecules and thereby reduce the oxygen. Magnesium therefore acts as a reducing agent in this reaction. The O2 molecules, on the other hand, gain electrons from magnesium atoms and thereby oxidize the magnesium.