* Sodium (Na) is a metal and tends to lose one electron to achieve a stable electron configuration. This makes it a cation with a +1 charge (Na+).
* Sulfur (S) is a nonmetal and tends to gain two electrons to achieve a stable electron configuration. This makes it an anion with a -2 charge (S²⁻).
When sodium and sulfur react, sodium atoms lose electrons to become Na+ ions, and sulfur atoms gain those electrons to become S²⁻ ions. The opposite charges attract each other, forming an electrostatic attraction known as an ionic bond. This results in the formation of sodium sulfide (Na₂S).