Elements and compounds
An element is a substance made of only one kind of atom. Hydrogen, oxygen, chlorine, sodium and magnesium are elements, and so are about a hundred others: every atom of oxygen has eight protons, whatever it is part of. A compound is a substance made of atoms of two or more elements joined chemically, in a ratio that is always the same. Water is a compound of hydrogen and oxygen. Table salt is a compound of sodium and chlorine.
The tank starts with two elements side by side. In Water they are two gases, each made of two-atom molecules: white hydrogen, H₂, and red oxygen, O₂. They fly about, bounce off the walls and pass each other without combining. In Table salt the sodium is a lump of soft metal on the floor, and the gas around it is pale green chlorine, Cl₂.
Try it: drag Run the reaction slowly from Elements apart to Reaction over with Water chosen, and follow a single red oxygen atom from its O₂ molecule into a water molecule in the puddle.
A recipe that never changes
Around 1800 the French chemist Joseph Proust argued, against some of the most respected chemists of his day, that a compound always contains its elements in the same proportions by mass, however it is made. Water from a spring, water from a candle flame and water made in a laboratory all hold 11.2 % hydrogen and 88.8 % oxygen: about 1 gram of hydrogen to 7.94 grams of oxygen. This is the law of definite proportions.
John Dalton’s atomic theory explained it a few years later. If elements are made of atoms, and a compound is made of identical small groups of them, then every group carries the same atoms, and so the whole compound carries the same ratio. A water molecule is always two hydrogen atoms and one oxygen atom, written H₂O. An oxygen atom is about 16 times heavier than a hydrogen atom, so the oxygen in each molecule outweighs its two hydrogens by about 8 to 1, and the same is true of a glass of them.
The readings beside the Scene show both versions of the recipe for the compound you choose: the atoms in one unit, and the grams of the second element that one gram of the first takes up.
When one element runs out
The balanced equation beside the Scene counts whole molecules: two hydrogen molecules and one oxygen molecule make two water molecules, 2 H₂ + O₂ → 2 H₂O. The reaction goes on in steps like that until one of the two elements is used up. Whatever remains of the other is left exactly as it was.
Try it: slide Oxygen or chlorine supplied up to 2 × needed, run Run the reaction to the end, and count the red O₂ molecules still flying about above the water. Then slide it down to 0.5 × needed and find the spare hydrogen instead.
Extra oxygen never makes the water richer in oxygen. Every molecule in the puddle is still H₂O; the surplus is simply not part of the compound. The element that runs out first is called the limiting reactant, and it decides how much compound forms. That is why cooks, chemists and engineers measure out their ingredients: anything beyond the right proportion is waste.
Atoms are never created or destroyed in the process. Every atom in the tank at the end was there at the start, only joined to different partners. Antoine Lavoisier showed in the 1780s that a sealed vessel weighs the same before and after a reaction for exactly this reason.
New substance, new properties
A compound is not just its elements stirred together. Hydrogen is a gas that burns; oxygen is a gas that keeps things burning. Together they make water, a liquid that puts fires out. Sodium is a soft metal that fizzes and catches fire in water; chlorine is a poisonous yellow-green gas used as a weapon in the First World War. Together they make table salt, white crystals you sprinkle on food.
The properties change because the atoms are bonded differently. In water and hydrogen chloride, atoms share pairs of electrons in covalent bonds, and the compound is made of separate molecules. Sodium and magnesium instead hand electrons over to chlorine. A sodium atom gives up one electron and becomes a small positive ion, Na⁺; a chlorine atom takes one and becomes a larger negative ion, Cl⁻. In the scene the violet sodium atoms shrink and the green chlorine atoms swell as they swap partners. The ions stack into a crystal, a regular three-dimensional pattern with no separate molecules at all, so the formula NaCl means one sodium ion for every chloride ion.
Try it: switch between Table salt and Magnesium chloride and compare the recipes beside the Scene. A magnesium atom gives up two electrons, so each Mg²⁺ ion pairs with two Cl⁻ ions, and the formula becomes MgCl₂.
Compounds and mixtures
Before the reaction, the tank holds a mixture of hydrogen and oxygen. A mixture can have any proportions you like, each substance in it keeps its own properties, and it can be separated by physical means, such as cooling it until one gas condenses before the other. A compound can only be split by another chemical reaction: water comes apart into hydrogen and oxygen only when an electric current is passed through it, in electrolysis, and it gives back exactly the same ratio of the two.
Salt water is a mixture too: a compound, salt, dissolved in another compound, water, in whatever amount you choose. Boil the water away and the salt is left, unchanged.
What this model leaves out
The scene shows a few dozen atoms where a real tank holds hundreds of thousands of billions of billions. With so many, nothing is left over in practice unless the amounts are unbalanced, and the reaction takes a moment rather than a slow sequence of steps. Real hydrogen and oxygen do not react at room temperature until a spark sets them off, and then they explode; hydrogen and chlorine need light or heat; sodium burns in chlorine with a bright yellow flame. None of that energy is modelled beyond a flash.
The crystal grains are simplified. Real salt grows as a cubic lattice of millions of ions in every direction, and magnesium chloride’s layers are stacked in a more intricate pattern than the single sheet drawn here. The metal lumps are only eight atoms, so they cannot show the shine and softness that come from a metal’s shared sea of electrons.
The law of definite proportions itself has exceptions. Some solid compounds, such as one of the oxides of iron, FeO, have a few iron atoms missing from their crystals and so vary slightly in composition. And because elements come as isotopes of different masses, the ratio by mass depends on which isotopes are present: water made from heavy hydrogen is about 20 % hydrogen by mass instead of 11 %, though its atoms still combine two to one.
