Ions are atoms or molecules bearing an electrical charge. A cation (a positive ion) forms when a neutral atom loses one or more electrons from its valence shell, and an anion (a negative ion) forms when a neutral atom gains one or more electrons in its valence shell. Compounds composed of ions are called ionic compounds (or salts), and their constituent ions are held together by ionic bonds: electrostatic forces of attraction between oppositely charged cations and anions.
The properties of ionic compounds shed some light on the nature of ionic bonds.
Many metallic elements have relatively low ionization potentials and lose electrons easily. These elements lie to the left in a period or near the bottom of a group on the periodic table. Nonmetal atoms have relatively high electron affinities and thus readily gain electrons lost by metal atoms, thereby filling their valence shells. Nonmetallic elements are found in the upper-right corner of the periodic table.
As all substances must be electrically neutral, the total number of positive charges on the cations of an ionic compound must equal the total number of negative charges on its anions. The formula of an ionic compound represents the simplest ratio of the numbers of ions necessary to give identical numbers of positive and negative charges.
It is important to note, however, that the formula for an ionic compound does not represent the physical arrangement of its ions. It is incorrect to refer to sodium chloride (NaCl) “molecule” because there is not a single ionic bond, per se, between any specific pair of sodium and chloride ions. The attractive forces between ions are isotropic — the same in all directions — meaning that any particular ion is equally attracted to all of the nearby ions of opposite charge. This results in the ions arranging themselves into a tightly bound, three-dimensional lattice structure. Sodium chloride, for example, consists of a regular arrangement of equal numbers of Na+ cations and Cl– anions. The strong electrostatic attraction between Na+ and Cl– ions holds them tightly together in solid NaCl. It requires 769 kJ of energy to dissociate one mole of solid NaCl into separate gaseous Na+ and Cl– ions.
When forming a cation, an atom of the main group element tends to lose all of its valence electrons, thus assuming the electronic structure of the noble gas that precedes it in the periodic table.
Most monatomic anions form when a neutral nonmetal atom gains enough electrons to completely fill its outer s and p orbitals, thereby reaching the electron configuration of the next noble gas. Thus, it is simple to determine the charge on such a negative ion: The charge is equal to the number of electrons that must be gained to fill the s and p orbitals of the parent atom. Oxygen, for example, has the electron configuration 1s22s22p4, whereas the oxygen anion has the electron configuration of the noble gas neon (Ne), 1s22s22p6. The two additional electrons required to fill the valence orbitals give the oxide ion the charge of 2– (O2–).
This text is adapted from Openstax, Chemistry 2e, Section 7.3: Ionic Bonding.