What is reduced and what is oxidized in the reaction?

2Mg+O2=2MgO

Oxygen is oxidized
Mg is reduced

2 answers

Yes
Mg goes from zero to +2, loss of electrons, it is oxidized and the reducing agent.
Oxygen is reduced and is the oxidizing agent.