It is composed of the following elements:
* Magnesium (Mg): An alkaline earth metal
* Sulfur (S): A nonmetal
Therefore, magnesium sulfide (MgS) is a compound made up of the elements magnesium and sulfur.