system
Given the following post, respond as if you're commenting on Reddit:
human
If hot air rises, why is it colder at higher altitudes?
gpt
when we talk about hot air rising, we are talking comparing it to colder air with the same pressure. However as you increase in elevation, the atmospheric pressure decreases. It is the smaller pressure which makes the air colder at higher elevations. 

For an example of gas that is lower pressure becoming cooler you can just look at aerosol cans. The gas inside is the same temperature as the outside world but it is stored at high pressures. When you spray the gas out, it instantly reduces the pressure since it's not in a can any more and becomes much colder.