What they actually are
Ruby and sapphire are the same mineral: corundum, an aluminium oxide (Al₂O₃). The only difference between them is the trace element that gives each its colour: chromium produces ruby's red, while titanium combined with iron produces sapphire's blue. Any corundum that is not red is called a sapphire, even if it is yellow, green, orange or pink.
Emerald, on the other hand, is a variety of beryl, an aluminium beryllium silicate. The characteristic green colour comes from chromium and, in some cases, vanadium. Beryl produces several other well-known varieties: aquamarine is blue beryl, morganite is pink beryl, heliodor is yellow beryl. Same mineral family, different colour depending on which trace elements were present during formation.
Mineralogy in one line
- Ruby: red corundum (chromium)
- Sapphire: corundum of any other colour (titanium, iron, or others)
- Emerald: green beryl (chromium, vanadium)