Dry ice is solid carbon dioxide. Its \mathrm{CO_2} molecules sit at the corners and the face centres of a cubic unit cell, so each cell holds 8 × 1/8 + 6 × 1/2 = 4 molecules.
Inside each molecule the atoms are joined by strong covalent bonds, but the molecules are held to one another only by weak intermolecular forces.
Little energy is needed to pull the molecules apart, so dry ice is soft and sublimes at about -79 °C, turning straight from a solid into a gas.
Iodine forms dark violet crystals made of \mathrm{I_2} molecules. When the crystals are warmed gently, they sublime into a violet vapour without melting first.
If a flask of cold water is placed over the vapour, iodine crystals form again on the cold glass. The molecules leave the crystal and join a crystal again whole, and no covalent bond breaks.
Sublimation is used to purify iodine, because impurities that do not sublime are left behind.
In ice, each water molecule forms hydrogen bonds with 4 neighbouring molecules: two through its hydrogen atoms and two through the lone pairs of its oxygen atom.
The 4 hydrogen bonds point to the corners of a tetrahedron, so the molecules are held apart in an open structure with a lot of empty space, instead of being packed as closely as possible.
When ice melts, some of the hydrogen bonds break and the open structure partly collapses, so the molecules can move closer together. This is why liquid water is denser than ice.
Ice has a density of 0.917 g/cm³, less than that of liquid water, so ice floats. Most substances are denser as solids than as liquids, so water is unusual.
As cold water warms from 0 °C, more of the open structure collapses and the density rises. Above about 4 °C, the faster movement of the molecules takes over, and the density falls again.
Water is therefore densest at about 4 °C. In winter the water at the bottom of a lake stays near 4 °C while ice forms on the surface, so fish can live through the winter below the ice.
Diamond and dry ice both contain carbon, but they are held together in very different ways. In diamond, every carbon atom is joined to 4 others by covalent bonds, so the whole crystal is one giant structure.
Breaking a piece of diamond means breaking covalent bonds, which is why diamond is the hardest natural substance. In dry ice, separating the molecules only means overcoming weak intermolecular forces.
A molecular crystal is held together by forces between molecules, while a covalent network crystal is held together by bonds between atoms. This difference explains why their properties are so far apart.