Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
How can I write the formula for magnesium sulfide?
Magnesium Sulfide has a formula of ##MgS##.
Magnesium is a metal cation with a charge of ##Mg^(+2)## Sulfur is a nonmetal anion with a charge of ##S^(-2)##
In order to bond ionically the charges must be equal and opposite. It will take one -2 sulfide ion to balance one +2 magnesium ion forming a magnesium sulfide molecule of ##MgS##.
I hope this was helpful. SMARTERTEACHER