Here's why:
* Sodium (Na) is a metal and tends to lose one electron to achieve a stable electron configuration. This creates a positively charged sodium ion (Na+).
* Chlorine (Cl) is a nonmetal and tends to gain one electron to achieve a stable electron configuration. This creates a negatively charged chloride ion (Cl-).
Ionic bonding occurs when a metal atom loses electrons to form a positive ion (cation), and a nonmetal atom gains electrons to form a negative ion (anion). The opposite charges of the ions attract each other, forming a strong electrostatic attraction.
Therefore, the chemical formula for sodium chloride is NaCl, representing the 1:1 ratio of sodium ions (Na+) to chloride ions (Cl-) in the compound.