Everyone was great about answering my question relating temperature and compression of a gas. Here is ultimately the question I was trying to figure out: If a gas is compressed and work is done on the gas to compress it either by piston, centrifuge, or whatever, I understand that the work of compression adds to the kinetic energy of the gas molecules and increases the temperature. I may be wrong in this assumption, but I understand that a gas, such as oxygen, can be liquefied by pressure. If compressing a gas raises its temperature (average kinetic energy), how does it liquefy? I can imagine two answers: (1) with compression and squeezing of the gas molecules closer together, the intermolecular forces of attraction overcome the kinetic energy, despite the increase in kinetic energy, or (2) my assumption is wrong and that compression must be accompanied by a lowering of temperature or kinetic energy, in which case the forces of attraction still prevail. Or a third alternatuive is that I am flat wrong for some other reason. Any help?