# Ideal gas law, pressure increase and temperature

If I had a container, full with air, and I suddenly decreased the volume of the container, forcing the air into a smaller volume, will it be considered as compression, will it result in an increase in temperature, and why?

P.S: the container is strong enough to bear high pressure and not to explode.

-
 Possible duplicate: physics.stackexchange.com/q/17948/2451 – Qmechanic♦ Sep 15 '12 at 9:58

If there's no heat exchange between the gas and the container (or the environment), we call it an adiabatic process. For an adiabatic process involving an ideal gas (which is a very good approximation for most common gases), $pV^\gamma$ is constant where $\gamma$ is an exponent such as $5/3$. Because the temperature is equal to $T=pV/nR$ and $pV/pV^\gamma=V^{1-\gamma}$ is a decreasing function of $V$, the temperature will increase when the volume decreases.
Macroscopically, the heating is inevitable because one needs to perform work $p\,|dV|$ to do the compression, the energy has to be preserved, and the only place where it can go is the interior of the gas given by a formula similar to $(3/2)nRT$.