# What is the formula for magnesium nitride?

$M {g}_{3} {N}_{2}$
Of course this is the ionic salt of $M {g}^{2 +}$ and ${N}^{3 -}$. Hydrolysis gives ammonia:
$M {g}_{3} {N}_{2} \left(s\right) + 6 {H}_{2} O \left(l\right) \rightarrow 3 M g {\left(O H\right)}_{2} \left(a q\right) + 2 N {H}_{3} \left(a q\right)$