Atoms with fewer than 4 valence electrons usually give them away; atoms with more than 4 usually gain or share to complete an octet.
Sodium (atomic number 11: 2, 8, 1) loses its 1 valence electron. Now it has 11 protons and 10 electrons, so it carries +1: a sodium cation, Na⁺ (2, 8).
Chlorine (2, 8, 7) gains 1 electron: 17 protons, 18 electrons, charge −1: a chloride anion, Cl⁻ (2, 8, 8).
Cations and anions are ions.
The electrostatic attraction between oppositely charged ions is an ionic bond. Na + Cl → Na⁺ + Cl⁻ → NaCl
Ionic compounds don't form single units: they build 3-D crystals. In sodium chloride each Na⁺ is surrounded by six Cl⁻ ions and each Cl⁻ by six Na⁺ ions, in a regular repeating crystal structure, often drawn as a crystal lattice of points.
Sulfur (2, 8, 6) gains two electrons to form S²⁻. Oxygen (2, 6) also gains two: O²⁻. Magnesium (2, 8, 2) loses two to form Mg²⁺; one Mg²⁺ and two Cl⁻ give magnesium chloride.
Check: a species with 11 protons, 12 neutrons and 10 electrons has atomic number 11, mass number 23, and is the sodium ion Na⁺.
Tap the diagram to enlarge it
- Na → Na⁺ + e⁻
- Cl + e⁻ → Cl⁻
- Each ion has 6 neighbours in NaCl