Heating a liquid increases the speed of the molecules.An increase in the speed of the molecules competes with the attraction between molecules and causes molecules to move a little further apart.Cooling a liquid decreases the speed of the molecules.A decrease in the speed of the molecules allows the attractions between molecules to bring them a little closer together.