The chemical equation for the reaction between Mg and HCl is Mg + 2 HCl ? MgCl2 + H2. In this equation, one molecule of magnesium reacts with two molecules of hydrochloric acid to produce one molecule each of magnesium chloride and hydrogen.
The reaction between magnesium and hydrochloric acid is a general reaction where an acid and a metal react to form a salt and hydrogen. This type of reaction is generally written as metal + acid ? salt + hydrogen. The number 2 in front of the HCl in the equation is a coefficient used to balance the equation and provide an equal number of atoms on both the left and right sides of the equation.