Final answer:
The ionic equation for the reaction of magnesium with hydrochloric acid is Mg(s) + 2H+(aq) → Mg2+(aq) + H2(g).
Step-by-step explanation:
The ionic equation for the reaction of magnesium with hydrochloric acid is:
Mg(s) + 2H+(aq) → Mg2+(aq) + H2(g)
In this reaction, magnesium (Mg) reacts with hydrochloric acid (HCl) to produce magnesium ions (Mg2+) and hydrogen gas (H2).