Thermodynamic work done by or on a gas is equal to $-P_{\rm{out}}\cdot{\rm\Delta}V$.

Work (
Work is measured in joules (J), which is equivalent to newton meters (N·m). Work is a change in energy.
Consider a gas in a piston, assuming the mass of the piston and friction are both negligible. Under normal conditions, the air outside the system applies force on the piston, pushing it down. At the same time, the gas inside applies force on the piston, pushing it up. These forces balance each other, and there is no net force on the piston. In this condition, the magnitude of the pressure of the gas inside (

If the gas is heated, its particles will move faster, which increases the pressure in a fixed-volume container. Heating the gas causes the piston to rise. The pressure inside (
At the same time, $\Delta d$ is the distance the piston rises. It can be written as $\Delta h$.
Note that the term $A\Delta h$ is the surface area multiplied by the change in height. Area multiplied by height equals volume. Area multiplied by change in height is equal to the change in volume, or $\Delta V$.
Traditionally, the work done by a piston is written in terms of the pressure the piston works against. Therefore, the term
In this sign convention, when $\Delta V$ is positive,

*w*) is the force (*F*) acting on a body multiplied by distance ($\Delta d$) along which that force is applied.$w=F\cdot\Delta d$

*P*_{g}) is equal to the magnitude of the air pressure outside (*P*_{out}).*P*_{g}and*P*_{out}have the same magnitude, but they have opposite directions. Therefore, $P_{\rm{g}}=-P_{\rm{out}}$.#### Pressure-Volume Work

*P*_{g}) remains equal to the pressure outside (*P*_{out}). Consider the initial equation for work, $w=F\cdot{\rm\Delta} d$. In this case, the pressure of the expanding gas is applying a force on the surface area (*A*) of the piston.*F*is equal to*P*_{g}multiplied by*A*.$w=P_{g}A\Delta d$

$w=P_{g}A\Delta h$

$w=P_{g}\Delta V$

*P*_{g}is replaced by*P*_{out}, giving an equation that relates work and outside pressure.$w=-P_{\rm{out}}\Delta V$

*w*is negative. This means that as the gas does work on its surroundings, it loses energy. The gas is doing work by pushing the piston and is losing energy in doing so. If $\Delta V$ is negative,*w*is positive. This means that if the surroundings do work on the gas, the gas gains energy. The gas is being compressed by the surroundings and is gaining energy while being compressed.