Mg2+ And S2- Formula

The chemical formula for the compound formed between magnesium cations (Mg2+) and sulfide anions (S2-) is MgS. This compound is an ionic solid, with positively charged magnesium ions attracting negatively charged sulfide ions through electrostatic forces. The ratio of magnesium to sulfide ions in the compound is 1:1, thus leading to the simple formula MgS.