Answer: [tex]Mg[/tex] is being oxidized.
Explanation:
The chemical equation for magnesium metal reacts with hydrochloric acid to produce hydrogen gas and an aqueous solution of magnesium (II) chloride.
[tex]Mg(s)+2HCl\rightarrow MgCl_2(aq)+H_2(g)[/tex]
Oxidation reaction : When there is a loss of electrons and an increase in oxidation state number.
[tex]Mg\rightarrow Mg^{2+}+2e^-[/tex]
Reduction reaction : when there is gain of electrons and a decrease in oxidation state number.
[tex]2H^{+}+2e^-\rightarrow H_2[/tex]
Thus [tex]Mg[/tex] is being oxidized.