The equation density = mass ÷ volume can be rearranged. Mass = density × volume, and volume = mass ÷ density.
When a substance changes state, no particles are lost, so its mass is conserved. The mass before the change equals the mass after it. The particles are arranged differently, so the volume changes and the density changes. Because mass = density × volume, the density multiplied by the volume stays the same. If the volume increases, the density decreases.
Worked example: 500 kg of water has a density of 1000 kg/m3. Its volume is 500 ÷ 1000 = 0.5 m3. When the water freezes the mass is still 500 kg. Ice has a density of about 900 kg/m3, so the volume of the ice is 500 ÷ 900 = 0.56 m3 (to 2 significant figures). The ice takes up more volume and has a lower density than the water.