Ionic Bonding
Ionic bonding is the process where atoms transfer electrons to form charged ions, which then attract each other through electrostatic forces. Understanding this type of bonding explains why compounds like table salt behave so differently from molecular substances like water.
Formation of Cations and Anions
Atoms form ions to achieve a stable electron configuration, typically a full outer shell of eight electrons (the octet rule). The way they get there depends on whether they're metals or nonmetals.
Cations form when metals lose valence electrons, giving them a positive charge. Metals on the left side of the periodic table (alkali metals, alkaline earth metals) do this readily because they have only one or two valence electrons to give up.
- loses one electron →
- loses two electrons →
Anions form when nonmetals gain electrons, giving them a negative charge. Nonmetals on the right side of the periodic table (halogens, chalcogens) do this because they need only one or two electrons to complete their valence shell.
- gains one electron →
- gains two electrons →
When a metal and a nonmetal react, the metal transfers its valence electrons to the nonmetal. Both atoms end up with full outer shells, and the resulting oppositely charged ions attract each other to form an ionic bond.

Charges of Common Ions
You can predict the charge of a main-group ion from its position on the periodic table. The group number tells you how many valence electrons an atom has, which tells you how many it will lose or gain.
- Group 1 (alkali metals): 1+ charge (lose 1 valence electron)
- , ,
- Group 2 (alkaline earth metals): 2+ charge (lose 2 valence electrons)
- , ,
- Group 16 (chalcogens): 2− charge (gain 2 electrons to complete octet)
- , ,
- Group 17 (halogens): 1− charge (gain 1 electron to complete octet)
- , ,
Transition metals are trickier because they can form ions with variable charges. Iron, for example, can lose two electrons to form (iron(II)) or three electrons to form (iron(III)). The Roman numeral in the name tells you the charge. Other examples include (copper(I)) and (copper(II)).

Electrical Neutrality in Ionic Compounds
Every ionic compound is electrically neutral overall. That means the total positive charge from all the cations exactly cancels the total negative charge from all the anions. This requirement determines the formula of the compound.
Here's how to figure out the formula:
- Identify the charges of the cation and anion.
- Find the smallest ratio of ions that makes the total charge equal zero.
- Write the formula using that ratio.
A few examples show how this works:
- : has a 1+ charge and has a 1− charge. One of each balances out: . The ratio is 1:1.
- : has a 2+ charge, but only has a 1− charge. You need two chloride ions to balance one magnesium ion: . The ratio is 1:2.
- : has a 3+ charge and has a 2− charge. You need two aluminum ions and three oxide ions: . The ratio is 2:3.
Ionic Bonding and Structure
The electrostatic attraction between oppositely charged ions is what holds an ionic compound together. This isn't a bond between just two atoms. In the solid state, ionic compounds arrange into a repeating three-dimensional pattern called an ionic lattice (sometimes called a crystal lattice).
In the lattice, each cation is surrounded by anions, and each anion is surrounded by cations. This arrangement maximizes the attractive forces between opposite charges while keeping like-charged ions as far apart as possible. The strength of these attractions throughout the lattice is why ionic compounds tend to have high melting points and are hard, brittle solids at room temperature.