In general, matter expands with rising temperature, which leads to a fall in density. However, there are important exceptions, such as the case with water when it transforms from the solid to the liquid state. Its molecules contract, leading to both a fall in density and a rise in density.
The ideal gas law, PV = nRT, shows that for gases, volume increases with an increase in temperature, which means that density falls. "P" is pressure, "V" is volume, "n" is number of moles and "R" is a constant. The equation shows that if number of moles and pressure are kept constant, an increase in temperature leads to an increase in volume. On the other hand, the equation "density = mass/volume" shows that for other matter, such as pure liquids and solids, density still tends to fall with increasing volume, as most matter expands with a rise in temperature anyway. This shows that, bar a few exceptional cases, density falls with an increase in temperature.