Net ionic equation of magnesium forming H2 gas

The net ionic equation for the reaction of magnesium (Mg) forming hydrogen gas (H2) can be written as:

Mg(s) + 2H+(aq) -> Mg2+(aq) + H2(g)

In this reaction, magnesium reacts with hydrogen ions (H+) in an acidic solution to form magnesium ions (Mg2+) and hydrogen gas.