Thermodynamics is the branch of physics that deals with heat, work and the conversion of one into the other. Unlike kinetic theory, which looks at individual molecules, thermodynamics describes a system using a few large-scale measurable quantities. A thermodynamic system is the definite quantity of matter (often a gas) chosen for study; everything outside it is the surroundings, and the two are separated by a real or imaginary boundary.
The state of a system is fixed by its state variables — pressure $P$, volume $V$, temperature $T$ and amount of substance $n$. These describe the condition of the gas, not how it got there. For an ideal gas they are linked by the equation of state $PV=nRT$.
- Thermal equilibrium: two systems in contact are in thermal equilibrium when there is no net flow of heat between them, i.e. they are at the same temperature.
- Zeroth law of thermodynamics: if system A is in thermal equilibrium with system C, and B is also in equilibrium with C, then A and B are in equilibrium with each other. This law defines temperature as the property that decides the direction of heat flow and lets a thermometer (C) compare two bodies.
Internal energy ($U$) is the total energy stored inside a system — the sum of the kinetic and potential energies of all its molecules. For an ideal gas it depends only on temperature, so $U$ rises when $T$ rises. Internal energy is a state function: its change $\Delta U$ depends only on the initial and final states, not on the path taken.
Heat ($\Delta Q$) is energy transferred because of a temperature difference, and work ($\Delta W$) is energy transferred by a force moving through a distance. Both are path-dependent (not state functions). When a gas expands by a small volume $dV$ against pressure $P$, the work done by the gas is $dW=P\,dV$, so over a finite change:
- $W=\int_{V_1}^{V_2} P\,dV$ — equal to the area under the $P$–$V$ curve.
- Work done by the gas (expansion) is positive; work done on the gas (compression) is negative.
The first law of thermodynamics is simply the law of conservation of energy applied to heat: the heat supplied to a system goes partly to raise its internal energy and partly to do external work:
- $\Delta Q=\Delta U+\Delta W$.
- Sign convention: $\Delta Q$ is positive when heat is added to the system; $\Delta W$ is positive when work is done by the system; $\Delta U$ is positive when the temperature rises.
The first law tells us energy cannot be created or destroyed, but it does not say in which direction a process will go — that is the job of the second law.