Ions in ionic compounds are primarily held together by the electrostatic forces between the charge distribution of these bodies, and in particular, the ionic bond resulting from the long-ranged Coulomb attraction between the net negative charge of the anions and net positive charge of the cations. There is also a small additional attractive force from van der Waals interactions which contributes only around 1–2% of the cohesive energy for small ions. When a pair of ions comes close enough for their outer electron shells (most simple ions have closed shells) to overlap, a short-ranged repulsive force occurs, due to the Pauli exclusion principle. The balance between these forces leads to a potential energy well with minimum energy when the nuclei are separated by a specific equilibrium distance.
If the electronic structure of the two interacting bodies is affected by the presence of one another, covalent interactions (non-ionic) also contribute to the overall energy of the compound formed. Ionic compounds are rarely purely ionic, i.e. held together only by electrostatic forces. The bonds between even the most electronegative/electropositive pairs such as those in caesium fluoride exhibit a small degree of covalency. Conversely, covalent bonds between unlike atoms often exhibit some charge separation and can be considered to have a partial ionic character. The circumstances under which a compound will have ionic or covalent character can typically be understood using Fajans' rules, which use only charges and the sizes of each ion. According to these rules, compounds with the most ionic character will have large positive ions with a low charge, bonded to a small negative ion with a high charge. More generally HSAB theory can be applied, whereby the compounds with the most ionic character are those consisting of hard acids and hard bases: small, highly charged ions with a high difference in electronegativities between the anion and cation. This difference in electronegativities means that the charge separation, and resulting dipole moment, is maintained even when the ions are in contact (the excess electrons on the anions are not transferred or polarized to neutralize the cations).
Although chemists classify idealized bond types as being ionic or covalent, the existence of additional types such as hydrogen bonds and metallic bonds, for example, has led some philosophers of science to suggest that alternative approaches to understanding bonding are required. This could be by applying quantum mechanics to calculate binding energies.