In chemistry, an ionic compound is a chemical compound in which ions are held together in a lattice structure by ionic bonds.

Ions can be single atoms, as in common table salt sodium chloride, or more complex groups such as calcium carbonate. But to be considered ions, they must carry a positive or negative charge due to an imbalance in the ratio of protons to electrons.

Thus, in an ionic bond, one 'bonder' must have a positive charge and the other a negative one. By sticking to each other, they resolve, or partially resolve, their separate charge imbalances. Positive to positive and negative to negative ionic bonds do not occur (for a real world analogy, experiment with a pair of bar magnets.)