Answer: magnesium and sulfur
Step-by-step explanation: Ionic compound is formed by the transference of electrons from metal to non metal.
Magnesium is a metal with atomic number of 12.
Electronic configuration of sodium:
Magnesium atom will loose two electrons to gain noble gas configuration and form magnesium cation with +2 charge.
Sulphur is a non metal with atomic number of 16.
Electronic configuration of sulfur:
Sulfur atom will gain two electrons to gain noble gas configuration and form sulphide ion with -2 charge.
In Magnesium sulfide
, electrons are transferred from magnesium to sulfur.