When you shake salt onto your chips, are you sprinkling tiny NaCl molecules?
When you shake salt onto your chips, each grain looks like one tiny object. The formula NaCl has one symbol for sodium and one for chlorine. Does that mean the grain is made of separate pairs, or could those symbols be telling you something else?
A sodium atom starts with one outer electron, shown as a cross. A chlorine atom has seven, shown as dots. Sodium transfers its electron to chlorine. Losing one negative electron gives a sodium ion with a one plus charge. Gaining it gives a chloride ion with a one minus charge.
Follow the alternating sodium and chloride ions across and down the front layer. The dashed guides lead to the next layer, where the charges swap. Repeat this pattern in three dimensions to build a giant ionic lattice. Strong electrostatic attraction between oppositely charged ions acts in all directions.
Start at a sodium ion in the front layer of the lattice you just saw. Move one position straight back into the next layer. Which ion is there? Pick an answer.
Dot-and-cross shows where outer electrons came from, but leaves out the lattice. Space-filling shows how ions pack, but hides inner ions. A slice makes one layer easy to count, but leaves out other layers. Ball-and-stick shows neighbours in three dimensions, but can exaggerate gaps.
In that repeating block, count two sodium ions in each layer, so four in total. Next, count two chloride ions in each layer, also four. Divide both counts by four to get one to one. This simplest whole-number ratio gives you the empirical formula, sodium chloride, written N A C L.
A representative section of magnesium chloride contains six magnesium ions and twelve chloride ions. Put magnesium first in your ratio, then simplify both numbers. Pick the empirical formula that matches.
You might read the sticks as solid rods. They just show which ions are neighbours. Electrostatic attraction holds the crystal together. You might also read the formula as one molecule. It gives a one-to-one ratio across the lattice, with no separate sodium chloride molecules.
In a small molecule, covalent bonds join a few atoms. In a polymer, repeating units form a long molecule. In a giant covalent structure, covalent bonds extend through a network. In a metal, electrostatic attraction between positive ions and delocalised electrons holds the regular lattice together.