Density is the mass of any material per unit volume. Gases always have much lower density than the condensed phases. Most materials have a lower density of the liquid than the solid but this isn't always true. Water has a higher density in the liquid state than the solid, so ice cubes float.
Within a particular phase, how does the density depend on temperature?
Remember that temperature is related to the average kinetic energy of the atoms or molecules within the substance. We know that, for gases, the volume is directly proportional to temperature by the equation PV=nRT.
The density of liquid water is approximately 1.0 g/mL. The chart at right give the density in kg/m3. Divide by 103 to get the density in g/mL.
Let's look at the density of water at 25 deg C and compare that to a higher temperature, 80 deg C. The density decreases from 0.9970 g/mL to 0.9718 as it is heated. This makes sense because, as heat is added to the liquid water, there is greater kinetic energy of the molecules and there are also more vibrations of the water molecules. Together these mean that each H2O unit in liquid water takes up more space as the temperature increases.
We see the same trend in going from liquid water at 25 deg C (0.9970 g/mL) to liquid water at 4 deg C (0.99997 g/mL). Density increase as the temperature decreases.
Below 4 deg C, however, the density decreases again. How can we explain this?
Remember that liquid water and solid water have the same network of bonds. Liquid water at 25 deg is so rapidly breaking bonds between H2O units and reforming them that extra water molecules get trapped inside the water lattice. This is the reason why liquid water is more dense than solid water.
The bonds in water break more slowly as temperature decreases and the structure tend to trap fewer extra water molecules. At low temperature, more of the water has the same lattice as ice.
It is possible to have liquid water at temperatures well below 0 deg C. Molecules in this supercooled water are free to move. Bonds are made and broken. The long range structure is not perfect but the short range structure of supercooled water is very much like ice. Adding a crystal to supercooled water causes instantaneous ice formation.
Other Pure Liquids
Pure ethanol, CH3CH2OH, is another pure liquid. It is similar to water in that it is polar, with a permanent dipole moment, and forms hydrogen bonds with itself. It doesn't have the same type of 3-dimensional lattice that water has though.
The table at right has the density of ethanol from 3 deg to 40 deg C in g/mL. We can see that the density decreases with temperature through this range. Unlike the situation with water, there is no maximum density point.
Most other pure liquids are like ethanol in this respect.
Solutions show the typical behavior of the pure liquid with temperature but the density is also strongly affected by the quantity of dissolved material.