Why the Bicycle Pump Gets Warm as You Pump
After you inflate a bicycle tire with a hand pump, touch the lower part of the pump. It feels warm. You did not plug it in or heat it, so where did the warmth come from? The answer shows how closely energy and heat are connected.
Air is a gas made of countless molecules zooming around and bumping into one another. They move faster when the air is hotter and slower when it is colder. When you push the pump handle down, you squeeze the air into a smaller space. The plunger meets the molecules as they bounce off it, and like a bat hitting a ball, it sends them away faster than they arrived.
As a result, the squeezed air has molecules with more energy, and its temperature goes up. The work your arms did has become heat. Part of the warmth also comes from the plunger rubbing against the inside of the pump, because friction always makes some heat.
The effect is small on a bicycle pump, but it matters in bigger machines. A diesel engine squeezes air so hard that the air becomes hot enough to ignite the fuel sprayed into it, with no spark needed. When squeezed air is allowed to spread out again, the opposite happens, and it cools down.