ideal gas law
Ideal gas law
The ideal gas law, also called the general gas equation, is the equation of state of a hypothetical ideal gas (many randomly moving point particles that are not subject to intermolecular interactions). It is a good approximation of the behavior of many gases under many conditions, although it has several limitations.
Ideal gas properties
When call something an ideal gas, we assume that:
- Molecules of gas are identical small, hard spheres in continuous random motion
- All collisions are elastic and all motion is frictionless
- No reaction during collision
- The molecules do not have intermolecular forces
Derivation for \[PV=nRT\]
Let \[P\], \[V\] and \[T\] be the pressure, volume and temperature respectively, \[n\] as the number of moles and \[R\] as the ideal gas constant, \[R=8.314\text{ J K$^{-1}$ mol$^{-1}$}\].
The ideal gas law is based on the following empirical equations:
- Boyle's law: For a given amount of gas at a constant temperature, the pressure and volume are inversely proportional, \[P\propto \frac{1}{V}\]
- Charles' law: At constant pressure, the volume of a given amount of gas is directly proportional to its absolute temperature, \[V\propto T\]
- Gay-Lussac's law: For a given mass of gas at a constant volume, the pressure of the gas is directly proportional to its absolute temperature, \[P\propto T\]
- Avogadro's law: At a constant temperature and pressure, equal volumes of gases contain an equal number molecules, \[V\propto n\], where \[n\] is the number of moles of gas
By combining these four laws, \[V\propto \frac{nT}{P}\], or \[V=R \frac{nT}{P}\], where \[R\] is the proportionality constant, or more commonly known as the ideal gas constant. Thus by rearranging the equation, we get the ideal gas law \[PV=nRT\].
\[n\] can also be substituted by \[\frac{m}{M}\], where \[m\] is the mass of gas and \[M\] is the molar mass of said gas.
Or, if we have the density \[\rho\] of the gas, we can use \[\rho=\frac{m}{V}\],
Derivation for \[PV=Nk_{\text{B}}T\] (kinetic theory of gases)
Consider an ideal gas consisting of \[N\] identical gas molecules, each with mass \[m\], inside a container of volume \[V\] and pressure \[P\]. Define \[n=\frac{N}{V}\] as the molecules per unit volume and \[\rho=nm=\frac{Nm}{V}\] as the density of said gas. The collisions between molecules and the wall are assumed to be fully elastic. The pressure that the gas exerts on the container is due to the elastic collisions of the gas molecules with the walls of the container.

We begin by considering the collision of one molecule with one of the walls of the container. Suppose every molecule has the same mass \[m\] and moves with some velocity \[\mathbf{v}=v_{x}\hat{\mathbf{i}}+v_{y}\hat{\mathbf{j}}+v_{z}\hat{\mathbf{k}}\]. Because the collision with the wall is elastic, the force contact only acts in the normal direction (assuming that the normal of the container is also pointing in the \[\hat{\mathbf{i}}\] direction), then the y- and z-components of the velocity will remain unchanged while the x-component will change sign. This results in a change in momentum of the gas molecule, \[\Delta \mathbf{p}=\mathbf{p}_{f}-\mathbf{p}_{i}=-2mv_{x}\hat{\mathbf{i}}\], therefore the momentum transferred by each collision to the wall is \[2mv_{x}\hat{\mathbf{i}}\].

Now consider the effect of a large number of randomly moving molecules. "Random" means that the distribution of velocity components is identical for every direction. Consider a small rectangle volume, \[\Delta V=A\cdot \Delta x\] of gas adjacent to one of the walls of the container. Since \[n\] is the molecules per unit volume, there will likely be about \[n\Delta V=nA\Delta x\] molecules to be found in that tiny rectangular volume.
We will now segregate the gas molecules into groups based on its velocity. Let \[n_{i}\] denote the number of gas molecules per unit volume in the \[i\]-th group with identical x-component velocities, \[v_{x,i}\]. Because the molecules are moving randomly, we assume that half of the gas molecules in each group will be moving in the direction towards the wall. Thus, within an interval of \[\Delta t_{i}=\frac{\Delta x}{v_{x,i}}\], there will be \[\frac{1}{2}n_{i}A\Delta x\] molecules from the \[i\]-th group colliding with the wall.
The number of molecules from the \[i\]-th group colliding with the wall per second is then given as \[\frac{\frac{1}{2}n_{i}A\Delta x}{\Delta t_{i}}=\frac{1}{2}n_{i}A \frac{\Delta x}{\Delta t_{i}}=\frac{1}{2}n_{i}Av_{x,i}\]. The momentum per second these amount of molecules would deliver would then be \[\frac{1}{2}n_{i}Av_{x,i}\cdot 2mv_{x,i}\hat{\mathbf{i}}=n_{i}Av_{x,i}^{2}m\hat{\mathbf{i}}\]. By Newton's second law, momentum per second is the average force exerted, thus \[\mathbf{F}_{i,\text{ave}}=n_{i}Av_{x,i}^{2}m\hat{\mathbf{i}}\]. With force we can calculate pressure, \[P_{i}=\frac{\left\lVert \mathbf{F}_{i,\text{ave}} \right\rVert}{A}=n_{i}v_{x,i}^{2}m\]. Let \[N_{g}\] be the number of groups, the total pressure exerted by all groups is then given as \[P=\sum_{i=1}^{N_{g}}P_{i}=m\sum_{i=1}^{N_{g}}n_{i}v_{x,i}^{2}\]. By definition \[\sum_{i=1}^{N_{g}}n_{i}=n\], thus we can say that the average of the square of the x-component of velocity across all the molecules is \[\left\langle v_{x}^{2} \right\rangle=\frac{1}{n}\sum_{i=1}^{N_{g}}n_{i}v_{x,i}^{2}\] (note that \[\left\langle v_{x}^{2} \right\rangle\], \[\overline{v^{2}_{x}}\] and \[\left( v_{x}^{2} \right)_{\text{ave}}\] represent the same thing). We can then rewrite \[P\] as \[P=m(n\cdot \left\langle v_{x}^{2} \right\rangle)=\rho \left\langle v_{x}^{2} \right\rangle\].
Since for any particle, the speed squared is sum of the squared Cartesian components, \[v^{2}=v_{x}^{2}+v_{y}^{2}+v_{z}^{2}\]. Then averaging over many molecules gives us \[\left\langle v^{2} \right\rangle=\left\langle v_{x}^{2} \right\rangle+\left\langle v_{y}^{2} \right\rangle+\left\langle v_{z}^{2} \right\rangle\], and assuming there's no preferred direction in an ideal gas, \[\left\langle v_{x}^{2} \right\rangle=\left\langle v_{y}^{2} \right\rangle=\left\langle v_{z}^{2} \right\rangle\implies \left\langle v^{2} \right\rangle=3 \left\langle v_{x}^{2} \right\rangle\]. \[P=\rho \frac{1}{3}\left\langle v^{2} \right\rangle\]. Note that \[\sqrt{\left\langle v^{2} \right\rangle}=v_{\text{rms}}\], i.e. the root-mean-square speed of the molecules. By equipartition theorem, the average kinetic energy of every gas molecule will be \[\frac{1}{2}m \left\langle v^{2} \right\rangle=\frac{3}{2}k_{\text{B}}T\], where \[k_{\text{B}}\] is the Boltzmann constant. Substituting \[\left\langle v^{2} \right\rangle=\frac{3k_{B}T}{m}\] and \[\rho=\frac{Nm}{V}\], we get \[P=\rho \frac{1}{3}\cdot \frac{3k_{B}T}{m}=\frac{Nk_{\text{B}}T}{V}\]. Rearranging this we get the familiar \[PV=Nk_{B}T\].
To get back \[PV=nRT\] (where \[n\] is moles of gas), since by definition \[k_{\text{B}}=\frac{R}{N_{A}}\], \[PV=\frac{NR}{N_{A}}T\], and \[\frac{N}{N_{A}}=n\], i.e. number of molecules divided by Avogadro constant equals to number of moles, \[Nk_{\text{B}}T=nRT\].