Answer:
Chemical formula = MgS
Step-by-step explanation:
Magnesium (Mg) belongs to group 2 i.e. the alkaline earth metals. The atomic number for Mg = 12.
Valence electron configuration = 3s²
Sulfur (S) belongs to group 16 in the periodic table. The atomic number for S = 16.
Valence electron configuration = 3s²3p⁴
Now, Mg is an metal and shows a strong tendency to lose electrons i.e it is electropositive. Sulfur, in contrast is electronegative i.e. it has a strong tendency to accept electrons. The valence electron configuration of S is such that it needs only 2 more electrons to complete its octet of 8 electrons.
Therefore, when Mg and S combine, Mg will lose its outer 2 electrons to S. Mg will become Mg²⁺ and S becomes S²⁻. Thus, the combination of Mg²⁺ S²⁻ gives a neutral compound with a chemical formula MgS.