the density of ice(solid) is less than that of water(liquid) and density of mercury(liquid) is more than that of many solids. thinking about it, it seemed natural to me that the more closely are the atoms or molecules packed the greater will be their density. but on packing them closely, isnt the state also going to be more solid-like? so what determines a substances density and what determines its state? what keeps the H20 molecules in place in ice but not as tightly packed as in liquid water so that its density is reduced? and why is mercury a liquid even though its atoms are (obviously?) closely packed?