because heating a substance will cause molecules to speed up and spread further apart causing a larger volume that will result in decrease in density, now cooling a substance will cause molecules to slow down and get closer together causing a smaller volume that will increase in density!