You’re thinking temperature, not heat. These are related but different.
The reason compression increases temperature is because the energy of the compressed gas is now more concentrated into a smaller volume, and thus the mean kinetic energy of the *volume* of the substance is higher because it occupies less volume with the same stuff.
Latest Answers