Here's why:
* Sodium (Na) is in Group 1 of the periodic table, making it a +1 cation (Na⁺).
* Iodine (I) is in Group 17 of the periodic table, making it a -1 anion (I⁻).
To form a neutral compound, one sodium ion (Na⁺) combines with one iodide ion (I⁻), resulting in the formula NaI.