* Sodium (Na) is a metal and tends to lose one electron to achieve a stable electron configuration. It becomes a positively charged ion (Na⁺).
* Sulfur (S) is a nonmetal and tends to gain two electrons to achieve a stable electron configuration. It becomes a negatively charged ion (S²⁻).
The opposite charges of the sodium and sulfide ions attract each other electrostatically, forming an ionic bond. This strong electrostatic attraction holds the ions together in a crystal lattice structure.