What happens to a sample of matter when it's particles lose kinetic energy?