So far in this lesson, I have taught you the three types of bonding, and how to tell what type of bonding a given compound has. I have given you rules governing the various charges that different elements adopt when they form ions, and how to name them. But I have not really given you any details about what ionic bonding is or how it works. We will cover that information now.
The heart of ionic bonding is the transfer of electrons. As you should remember, ionic bonding requires a metal element and a non-metal element. Metals have a tendency to lose electrons, while non-metals have a tendency to gain them. So if you bring together a metal like sodium and a non-metal like chlorine, it's a match made in heaven. (Note: according to the secret laws of chemistry teachers, we are legally obligated to use these two elements as an example when we introduce ionic bonding 😉)
Naturally, when these elements meet, the sodium atom transfers an electron to the chlorine atom. This satisfies the octet rule for both atoms, forming a sodium ion (Na+) and a chloride ion (Cl-); a cation and an anion.
In this case, the metal and non-metal are well-matched in that one "wants" one electron and the other "wants" to lose one electron. However, this is not required for ionic bonding to occur, as atoms almost never meet each other alone. The diagrams below illustrate the numerous ways metals and non-metals can come together to form ions. As you can hopefully see, in each case, the ions end up with the appropriate charges based on the rules we just learned.
However many ions are formed, and whatever their charge may be, one thing is now true: we have formed positive cations and negative anions in close proximity to each other. And what do positive and negative things do? They attract each other! This attraction is very strong, and is called an ionic bond. It is what take the separate elements (Na and Cl, Mg and O, etc.) and knits them into a compound (NaCl, MgO, etc.).
The nature of ionic bonding is such that the ions attract one another from all directions with each positive ion surrounded by negative ions and each negative ion surrounded by positive ions in such a way that a regular, repeating, three-dimensional pattern of alternating positive and negative ions is set up. This pattern is called a crystal lattice, a type of network.
Different ionic compounds will have different features to their lattice. Some will be more cubic and others more hexagonal. Some will have neat ninety degree angles and some will be more oblique. The ratios of cations and anions will differ (more on that in the next section). But in all cases, what you end up with is a structure where there are no "molecules"; we do not form an NaCl molecule with just one Na and just one Cl. Rather, we always end up with a lattice that extends for millions and billions of atoms in every direction. In each of the images below, imagine the pattern of atoms repeating essentially infinitely.