A particular system can be described by its state variables. For example, consider a gas is in a cylinder. We can measure the mass \(m\) of the gas and also find the number of moles \(n\), pressure \(P\), volume \(V\) and temperature \(T\) of the gas. All of these quantities such as \(n\), \(P\), \(V\) and \(T\) which describe the sate of the system of gas in the cylinder are state variables.

The state variables are related to one another that is, increasing \(n\) increases the volume at constant pressure and temperature and so on. Here we focus on the relationship between the state variables of a system of an ideal gas.

Figure 1 Ideal gas in a container.

But before going directly into ideal gas we describe what ideal gas means. You can see a cylinder containing a gas in Figure 1. The molecules of the gas are in random motion. In ideal gas the volume occupied by each molecule is zero that is the molecules act as point particles and the intermolecular forces of attraction between the molecules is zero. That's the reason why we call ideal gas! In real gas the molecules of the gas occupy some volume of the container and the intermolecular forces of attraction between the molecules is not zero.

The relationship between state variables for a system of an ideal gas(ideal gas equation) is ideal gas law. Increasing the number of moles \(n\) of an ideal gas at constant pressure \(P\) and temperature \(T\) increases the volume \(V\) of the gas; it means the volume of the gas is directly proportional to the number of moles \(n\) that is, \(V \propto n\). Increasing the volume of the gas at constant \(n\) and \(T\) decreases the pressure so the volume \(V\) is inversely proportional to the pressure \(p\) of the gas that, is \(V \propto 1/p\).

Pressure and temperature are directly related to each other; increasing the pressure increases the temperature at constant \(n\) and \(V\) that is, \(p \propto T\). So combining the relationships between state variables of the system of an ideal gas, we get the ideal gas equation:

\[pV = nRT \tag{1} \label{1}\]

where \(R\) is the constant called universal gas constant. Its value is \(8.31{\rm{J/mol}} \cdot {\rm{K}}\) within three significant figures. The above equation Eq. \eqref{1} is called ideal gas equation or ideal gas law. When \(n\) and \(T\) are constants in the above ideal gas equation, the product \(pV\) is constant ( \(pV\) = constant) that is doubling the pressure decreases the volume by one half. The value of \(R\) is the same for all gases and therefore called universal gas constant.

The ideal behaviour of real gas can be acieved by decreasing the pressure and increasing the temperature. At very low pressure the molecules are far apart and at very high temperature the molecules show random and rapid motion. Both low pressure and high temperature conditions increase the possibility of point particles (occupying negligible space of the container) and negligible forces of attraction.

Even the real gas molecules can sometimes be referred to as point particles occupying negligible volume and having negligible forces of attraction between molecules. This ideal nature of all real gases can be further increased at the conditions of low pressure and high temperature. So, the ideal gas equation is valid closely for real gases. But the ideal gas equation is no longer valid for real gases at high pressure and low temperature conditions.

The ideal gas equation Eq. \eqref{1} can also be expressed in terms of total number of molecules \(N\) and another constant \(k\) called Boltzmann's constant. If \(N_A\) is the Avogrado's number, the number of moles \(n\) is \(n = N/N_A\) (because in one mole there are \(N_A\) number of molecules). The above ideal gas equation can be written as

\[pV = \frac{N}{{{N_A}}}RT = N\frac{R}{{{N_A}}}T = NkT \tag{2} \label{2}\]

where \(k = R/N_A\). The value of Boltzmann's constant is \({\rm{1}}{\rm{.38}} \times {\rm{1}}{{\rm{0}}^{ - 23}}{\rm{J/K}}\) in three significant figures. Note that Boltzmann's constant \(k\) is on "per moleule" basis not on "per mole" basis.