Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
University Physics Volume 2

2.1 Molecular Model of an Ideal Gas

University Physics Volume 22.1 Molecular Model of an Ideal Gas

Learning Objectives

By the end of this section, you will be able to:

  • Apply the ideal gas law to situations involving the pressure, volume, temperature, and the number of molecules of a gas
  • Use the unit of moles in relation to numbers of molecules, and molecular and macroscopic masses
  • Explain the ideal gas law in terms of moles rather than numbers of molecules
  • Apply the van der Waals gas law to situations where the ideal gas law is inadequate

In this section, we explore the thermal behavior of gases. Our word “gas” comes from the Flemish word meaning “chaos,” first used for vapors by the seventeenth-century chemist J. B. van Helmont. The term was more appropriate than he knew, because gases consist of molecules moving and colliding with each other at random. This randomness makes the connection between the microscopic and macroscopic domains simpler for gases than for liquids or solids.

How do gases differ from solids and liquids? Under ordinary conditions, such as those of the air around us, the difference is that the molecules of gases are much farther apart than those of solids and liquids. Because the typical distances between molecules are large compared to the size of a molecule, as illustrated in Figure 2.2, the forces between them are considered negligible, except when they come into contact with each other during collisions. Also, at temperatures well above the boiling temperature, the motion of molecules is fast, and the gases expand rapidly to occupy all of the accessible volume. In contrast, in liquids and solids, molecules are closer together, and the behavior of molecules in liquids and solids is highly constrained by the molecules’ interactions with one another. The macroscopic properties of such substances depend strongly on the forces between the molecules, and since many molecules are interacting, the resulting “many-body problems” can be extremely complicated (see Condensed Matter Physics).

This figure illustrates the motion of atoms in a gas. The atoms are illustrated as small spheres, widely separated from each other. Their velocities are represented by arrows. The various velocity have different, random directions and have different lengths.
Figure 2.2 Atoms and molecules in a gas are typically widely separated. Because the forces between them are quite weak at these distances, the properties of a gas depend more on the number of atoms per unit volume and on temperature than on the type of atom.

The Gas Laws

In the previous chapter, we saw one consequence of the large intermolecular spacing in gases: Gases are easily compressed. Table 1.2 shows that gases have larger coefficients of volume expansion than either solids or liquids. These large coefficients mean that gases expand and contract very rapidly with temperature changes. We also saw (in the section on thermal expansion) that most gases expand at the same rate or have the same coefficient of volume expansion, ββ. This raises a question: Why do all gases act in nearly the same way, when all the various liquids and solids have widely varying expansion rates?

To study how the pressure, temperature, and volume of a gas relate to one another, consider what happens when you pump air into a deflated car tire. The tire’s volume first increases in direct proportion to the amount of air injected, without much increase in the tire pressure. Once the tire has expanded to nearly its full size, the tire’s walls limit its volume expansion. If we continue to pump air into the tire, the pressure increases. When the car is driven and the tires flex, their temperature increases, and therefore the pressure increases even further (Figure 2.3).

The figure has three parts, each part showing a tire connected to a pressure gauge at the start and at the end of a stage of inflating the tire, showing pressures P and P prime respectively. In part a, the tire pressure is initially zero. After some air is added, represented by an arrow labeled Add air, the pressure rises to slightly above zero. In part b, the tire pressure is initially at the half-way mark. After some air is added, represented by an arrow labeled Add air, the pressure rises to the three-fourths mark. In part c, the tire pressure is initially at the three-fourths mark. After the temperature is raised, represented by an arrow labeled Increase temperature, the pressure rises to nearly the full mark.
Figure 2.3 (a) When air is pumped into a deflated tire, its volume first increases without much increase in pressure. (b) When the tire is filled to a certain point, the tire walls resist further expansion, and the pressure increases with more air. (c) Once the tire is inflated, its pressure increases with temperature.

Figure 2.4 shows data from the experiments of Robert Boyle (1627–1691), illustrating what is now called Boyle’s law: At constant temperature and number of molecules, the absolute pressure of a gas and its volume are inversely proportional. (Recall from Fluid Mechanics that the absolute pressure is the true pressure and the gauge pressure is the absolute pressure minus the ambient pressure, typically atmospheric pressure.) The graph in Figure 2.4 displays this relationship as an inverse proportionality of volume to pressure.

This figure is a graph of the volume (in arbitrary units) on the vertical axis as a function of one over the pressure (in inverse inches of mercury) on the horizontal axis. The horizontal scale runs from 0 to 0.04. The vertical scale runs from 0 to 60. The graph shows data points that appear to lie on a straight line, starting inverse pressure of about 0.008 inverse inches of mercury and volume of about 11, and ending at an inverse pressure of just under 0.035 inverse inches of mercury and volume of just under 50. The data points are closely spaced at the lower end and get farther apart as the inverse pressure and volume increase.
Figure 2.4 Robert Boyle and his assistant found that volume and pressure are inversely proportional. Here their data are plotted as V versus 1/p; the linearity of the graph shows the inverse proportionality. The number shown as the volume is actually the height in inches of air in a cylindrical glass tube. The actual volume was that height multiplied by the cross-sectional area of the tube, which Boyle did not publish. The data are from Boyle’s book A Defence of the Doctrine Touching the Spring and Weight of the Air…, p. 60.1

Figure 2.5 shows experimental data illustrating what is called Charles’s law, after Jacques Charles (1746–1823). Charles’s law states that at constant pressure and number of molecules, the volume of a gas is proportional to its absolute temperature.

This figure is a graph of the volume (in arbitrary units) on the vertical axis as a function of temperature (in Kelvin) on the horizontal axis. The horizontal scale runs from 0 to 350 K and the vertical scale from 0 to 140. Nine data points are shown. The data points lie on a straight line and are evenly spaced. The data extends from 273 K and volume of 108 to 313 K and volume of 123. A line labeled Extrapolated line of best fit is drawn through the data and back to 0 K. The hits the vertical axis just above the origin.
Figure 2.5 Experimental data showing that at constant pressure, volume is approximately proportional to temperature. The best-fit line passes approximately through the origin.2

Similar is Amonton’s or Gay-Lussac’s law, which states that at constant volume and number of molecules, the pressure is proportional to the temperature. That law is the basis of the constant-volume gas thermometer, discussed in the previous chapter. (The histories of these laws and the appropriate credit for them are more complicated than can be discussed here.)

It is known experimentally that for gases at low density (such that their molecules occupy a negligible fraction of the total volume) and at temperatures well above the boiling point, these proportionalities hold to a good approximation. Not surprisingly, with the other quantities held constant, either pressure or volume is proportional to the number of molecules. More surprisingly, when the proportionalities are combined into a single equation, the constant of proportionality is independent of the composition of the gas. The resulting equation for all gases applies in the limit of low density and high temperature; it’s the same for oxygen as for helium or uranium hexafluoride. A gas at that limit is called an ideal gas; it obeys the ideal gas law, which is also called the equation of state of an ideal gas.

Ideal Gas Law

The ideal gas law states that


where p is the absolute pressure of a gas, V is the volume it occupies, N is the number of molecules in the gas, and T is its absolute temperature.

The constant kBkB is called the Boltzmann constant in honor of the Austrian physicist Ludwig Boltzmann (1844–1906) and has the value


The ideal gas law describes the behavior of any real gas when its density is low enough or its temperature high enough that it is far from liquefaction. This encompasses many practical situations. In the next section, we’ll see why it’s independent of the type of gas.

In many situations, the ideal gas law is applied to a sample of gas with a constant number of molecules; for instance, the gas may be in a sealed container. If N is constant, then solving for N shows that pV /T is constant. We can write that fact in a convenient form:


where the subscripts 1 and 2 refer to any two states of the gas at different times. Again, the temperature must be expressed in kelvin and the pressure must be absolute pressure, which is the sum of gauge pressure and atmospheric pressure.

Example 2.1

Calculating Pressure Changes Due to Temperature Changes

Suppose your bicycle tire is fully inflated, with an absolute pressure of 7.00×105Pa7.00×105Pa (a gauge pressure of just under 90.0lb/in.290.0lb/in.2) at a temperature of 18.0°C.18.0°C. What is the pressure after its temperature has risen to 35.0°C35.0°C on a hot day? Assume there are no appreciable leaks or changes in volume.


The pressure in the tire is changing only because of changes in temperature. We know the initial pressure p0=7.00×105Pa,p0=7.00×105Pa, the initial temperature T0=18.0°C,T0=18.0°C, and the final temperature Tf=35.0°C.Tf=35.0°C. We must find the final pressure Since the number of molecules is constant, we can use the equation

Since the volume is constant, VfVf and V0V0 are the same and they divide out. Therefore,


We can then rearrange this to solve for pf:pf:


where the temperature must be in kelvin.


  1. Convert temperatures from degrees Celsius to kelvin
  2. Substitute the known values into the equation,


The final temperature is about 6%6% greater than the original temperature, so the final pressure is about 6%6% greater as well. Note that absolute pressure (see Fluid Mechanics) and absolute temperature (see Temperature and Heat) must be used in the ideal gas law.

Example 2.2

Calculating the Number of Molecules in a Cubic Meter of Gas

How many molecules are in a typical object, such as gas in a tire or water in a glass? This calculation can give us an idea of how large N typically is. Let’s calculate the number of molecules in the air that a typical healthy young adult inhales in one breath, with a volume of 500 mL, at standard temperature and pressure (STP), which is defined as 0ºC0ºC and atmospheric pressure. (Our young adult is apparently outside in winter.)


Because pressure, volume, and temperature are all specified, we can use the ideal gas law, pV=NkBT,pV=NkBT, to find N.


  1. Identify the knowns.
  2. Substitute the known values into the equation and solve for N.


N is huge, even in small volumes. For example, 1cm31cm3 of a gas at STP contains 2.68×10192.68×1019 molecules. Once again, note that our result for N is the same for all types of gases, including mixtures.

As we observed in the chapter on fluid mechanics, pascals are N/m2N/m2, so Pa·m3=N·m=J.Pa·m3=N·m=J. Thus, our result for N is dimensionless, a pure number that could be obtained by counting (in principle) rather than measuring. As it is the number of molecules, we put “molecules” after the number, keeping in mind that it is an aid to communication rather than a unit.

Moles and Avogadro’s Number

It is often convenient to measure the amount of substance with a unit on a more human scale than molecules. The SI unit for this purpose was developed by the Italian scientist Amedeo Avogadro (1776–1856). (He worked from the hypothesis that equal volumes of gas at equal pressure and temperature contain equal numbers of molecules, independent of the type of gas. As mentioned above, this hypothesis has been confirmed when the ideal gas approximation applies.) A mole (abbreviated mol) is defined as the amount of any substance that contains as many molecules as there are atoms. (Technically, we should say “formula units,” not “molecules,” but this distinction is irrelevant for our purposes.) The number of molecules in one mole is called Avogadro’s number (NA),(NA), and the value of Avogadro’s number is now known to be


We can now write N=NAnN=NAn, where n represents the number of moles of a substance.

Avogadro’s number relates the mass of an amount of substance in grams to the number of protons and neutrons in an atom or molecule (12 for a carbon-12 atom), which roughly determine its mass. It’s natural to define a unit of mass such that the mass of an atom is approximately equal to its number of neutrons and protons. The unit of that kind accepted for use with the SI is the unified atomic mass unit (u), also called the dalton. Specifically, a carbon-12 atom has a mass of exactly 12 u, so that its molar mass M in grams per mole is numerically equal to the mass of one carbon-12 atom in u. That equality holds for any substance. In other words, NANA is not only the conversion from numbers of molecules to moles, but it is also the conversion from u to grams: 6.02×1023u=1g.6.02×1023u=1g. See Figure 2.6.

The illustration shows relatively flat land with a solitary mountain, labeled “Mt. Everest for scale”, and blue sky well above the mountain top. A double-headed vertical arrow, labeled “table tennis balls”, stretches between the land and the sky.
Figure 2.6 How big is a mole? On a macroscopic level, Avogadro’s number of table tennis balls would cover Earth to a depth of about 40 km.

Now letting msms stand for the mass of a sample of a substance, we have Letting m stand for the mass of a molecule, we have M=NAm.M=NAm.

Check Your Understanding 2.1

The recommended daily amount of vitamin B3B3 or niacin, C6NH5O2,C6NH5O2, for women who are not pregnant or nursing, is 14 mg. Find the number of molecules of niacin in that amount.

Check Your Understanding 2.2

The density of air in a classroom (p=1.00atm(p=1.00atm and T=20°C)T=20°C) is 1.28kg/m31.28kg/m3. At what pressure is the density 0.600kg/m30.600kg/m3 if the temperature is kept constant?

The Ideal Gas Law Restated using Moles

A very common expression of the ideal gas law uses the number of moles in a sample, n, rather than the number of molecules, N. We start from the ideal gas law,


and multiply and divide the right-hand side of the equation by Avogadro’s number NA.NA. This gives us


Note that n=N/NAn=N/NA is the number of moles. We define the universal gas constant as R=NAkB,R=NAkB, and obtain the ideal gas law in terms of moles.

Ideal Gas Law (in terms of moles)

In terms of number of moles n, the ideal gas law is written as


In SI units,


In other units,


You can use whichever value of R is most convenient for a particular problem.

Example 2.3

Density of Air at STP and in a Hot Air Balloon

Calculate the density of dry air (a) under standard conditions and (b) in a hot air balloon at a temperature of 120ºC120ºC. Dry air is approximately 78%N2,21%O2,78%N2,21%O2, and 1%Ar1%Ar.

Strategy and Solution

  1. We are asked to find the density, or mass per cubic meter. We can begin by finding the molar mass. If we have a hundred molecules, of which 78 are nitrogen, 21 are oxygen, and 1 is argon, the average molecular mass is 78mN2+21mO2+mAr10078mN2+21mO2+mAr100, or the mass of each constituent multiplied by its percentage. The same applies to the molar mass, which therefore is
    Now we can find the number of moles per cubic meter. We use the ideal gas law in terms of moles, pV=nRT,pV=nRT, with p=1.00atmp=1.00atm, T=273KT=273K, V=1m3V=1m3, and R=8.31J/mol·KR=8.31J/mol·K. The most convenient choice for R in this case is R=8.31J/mol·KR=8.31J/mol·K because the known quantities are in SI units:
    Then, the mass msms of that air is
    Finally the density of air at STP is
  2. The air pressure inside the balloon is still 1 atm because the bottom of the balloon is open to the atmosphere. The calculation is the same except that we use a temperature of 120ºC120ºC, which is 393 K. We can repeat the calculation in (a), or simply observe that the density is proportional to the number of moles, which is inversely proportional to the temperature. Then using the subscripts 1 for air at STP and 2 for the hot air, we have


Using the methods of Archimedes’ Principle and Buoyancy, we can find that the net force on 2200m32200m3 of air at 120ºC120ºC is FbFg=ρatmosphereVgρhot airVg=8.49×103N,FbFg=ρatmosphereVgρhot airVg=8.49×103N, or enough to lift about 867 kg. The mass density and molar density of air at STP, found above, are often useful numbers. From the molar density, we can easily determine another useful number, the volume of a mole of any ideal gas at STP, which is 22.4 L.

Check Your Understanding 2.3

Liquids and solids have densities on the order of 1000 times greater than gases. Explain how this implies that the distances between molecules in gases are on the order of 10 times greater than the size of their molecules.

The ideal gas law is closely related to energy: The units on both sides of the equation are joules. The right-hand side of the ideal gas law equation is NkBT.NkBT. This term is roughly the total translational kinetic energy (which, when discussing gases, refers to the energy of translation of a molecule, not that of vibration of its atoms or rotation) of N molecules at an absolute temperature T, as we will see formally in the next section. The left-hand side of the ideal gas law equation is pV. As mentioned in the example on the number of molecules in an ideal gas, pressure multiplied by volume has units of energy. The energy of a gas can be changed when the gas does work as it increases in volume, something we explored in the preceding chapter, and the amount of work is related to the pressure. This is the process that occurs in gasoline or steam engines and turbines, as we’ll see in the next chapter.

Problem-Solving Strategy

The Ideal Gas Law

Step 1. Examine the situation to determine that an ideal gas is involved. Most gases are nearly ideal unless they are close to the boiling point or at pressures far above atmospheric pressure.

Step 2. Make a list of what quantities are given or can be inferred from the problem as stated (identify the known quantities).

Step 3. Identify exactly what needs to be determined in the problem (identify the unknown quantities). A written list is useful.

Step 4. Determine whether the number of molecules or the number of moles is known or asked for to decide whether to use the ideal gas law as pV=NkBT,pV=NkBT, where N is the number of molecules, or pV=nRT,pV=nRT, where n is the number of moles.

Step 5. Convert known values into proper SI units (K for temperature, Pa for pressure, m3m3 for volume, molecules for N, and moles for n). If the units of the knowns are consistent with one of the non-SI values of R, you can leave them in those units. Be sure to use absolute temperature and absolute pressure.

Step 6. Solve the ideal gas law for the quantity to be determined (the unknown quantity). You may need to take a ratio of final states to initial states to eliminate the unknown quantities that are kept fixed.

Step 7. Substitute the known quantities, along with their units, into the appropriate equation and obtain numerical solutions complete with units.

Step 8. Check the answer to see if it is reasonable: Does it make sense?

The Van der Waals Equation of State

We have repeatedly noted that the ideal gas law is an approximation. How can it be improved upon? The van der Waals equation of state (named after the Dutch physicist Johannes van der Waals, 1837−1923) improves it by taking into account two factors. First, the attractive forces between molecules, which are stronger at higher density and reduce the pressure, are taken into account by adding to the pressure a term equal to the square of the molar density multiplied by a positive coefficient a. Second, the volume of the molecules is represented by a positive constant b, which can be thought of as the volume of a mole of molecules. This is subtracted from the total volume to give the remaining volume that the molecules can move in. The constants a and b are determined experimentally for each gas. The resulting equation is


In the limit of low density (small n), the a and b terms are negligible, and we have the ideal gas law, as we should for low density. On the other hand, if VnbVnb is small, meaning that the molecules are very close together, the pressure must be higher to give the same nRT, as we would expect in the situation of a highly compressed gas. However, the increase in pressure is less than that argument would suggest, because at high density the (n/V)2(n/V)2 term is significant. Since it’s positive, it causes a lower pressure to give the same nRT.

The van der Waals equation of state works well for most gases under a wide variety of conditions. As we’ll see in the next module, it even predicts the gas-liquid transition.

pV Diagrams

We can examine aspects of the behavior of a substance by plotting a pV diagram, which is a graph of pressure versus volume. When the substance behaves like an ideal gas, the ideal gas law pV=nRTpV=nRT describes the relationship between its pressure and volume. On a pV diagram, it’s common to plot an isotherm, which is a curve showing p as a function of V with the number of molecules and the temperature fixed. Then, for an ideal gas, pV=constant.pV=constant. For example, the volume of the gas decreases as the pressure increases. The resulting graph is a hyperbola.

However, if we assume the van der Waals equation of state, the isotherms become more interesting, as shown in Figure 2.7. At high temperatures, the curves are approximately hyperbolas, representing approximately ideal behavior at various fixed temperatures. At lower temperatures, the curves look less and less like hyperbolas—that is, the gas is not behaving ideally. There is a critical temperature TcTc at which the curve has a point with zero slope. Below that temperature, the curves do not decrease monotonically; instead, they each have a “hump,” meaning that for a certain range of volume, increasing the volume increases the pressure.

The figure is a plot of Pressure, p, on the vertical axis as a function of volume, V, on the horizontal axis, at five different temperatures. The curves all start at high pressures for the lowest volumes and decrease. The upper two curves, in red, decrease monotonically, with gradually decreasing slope. These curves are marked as having T greater than T c. The middle curve, in purple, is marked T c. This curve decreases rapidly, has a saddle point, and then continues to decrease gradually. The lowest two curves, in blue, decrease to a narrow minimum, then increase to a broad maximum, and then decrease gradually. These curves are marked as having T less than T c. The pressure minima of the lower curves occur at volumes slightly lower than the volume at which the T c curve saddle point is found.
Figure 2.7 pV diagram for a Van der Waals gas at various temperatures. The red curves are calculated at temperatures above the critical temperature and the blue curves at temperatures below it. The blue curves have an oscillation in which volume (V) increases with increasing pressure (P), an impossible situation, so they must be corrected as in Figure 2.8. (credit: “Eman”/Wikimedia Commons)

Such behavior would be completely unphysical. Instead, the curves are understood as describing a liquid-gas phase transition. The oscillating part of the curve is replaced by a horizontal line, showing that as the volume increases at constant temperature, the pressure stays constant. That behavior corresponds to boiling and condensation; when a substance is at its boiling temperature for a particular pressure, it can increase in volume as some of the liquid turns to gas, or decrease as some of the gas turns to liquid, without any change in temperature or pressure.

Figure 2.8 shows similar isotherms that are more realistic than those based on the van der Waals equation. The steep parts of the curves to the left of the transition region show the liquid phase, which is almost incompressible—a slight decrease in volume requires a large increase in pressure. The flat parts show the liquid-gas transition; the blue regions that they define represent combinations of pressure and volume where liquid and gas can coexist.

The figure has two plots of Pressure, p, on the vertical axis as a function of volume, V, on the horizontal axis, at several different temperatures. Figure a shows six isotherms labeled, from the bottom to top, T 1, T 2, T C, T 3, T 4 and T 5. A note on the graph tells us that these temperatures are also in increasing order. The graphs show that pressure generally decreases with increasing volume for all temperatures, except at low temperatures when pressure is constant as a function of volume during a phase change. The phase change occupies a region in the plot shaded in blue and labeled Liquid-vapor equilibrium region. Figure b is the same plot, zoomed in to show the p V diagram in and around the shaded liquid vapor region. Above the shaded region, the curves decrease monotonically. The curve that is still outside but just touches the peak of the liquid vapor region is labeled as the critical isotherm, T c. The point at which this curve meets the shaded region is labeled the critical point. The region to the left of the shaded region and at pressures lower than the pressure of the critical point is the liquid region. The region to the right of the shaded region is the vapor region. The right edge of the shaded region is the saturation curve. The region above the critical isotherm is labeled as true but not ideal gas.
Figure 2.8 pV diagrams. (a) Each curve (isotherm) represents the relationship between p and V at a fixed temperature; the upper curves are at higher temperatures. The lower curves are not hyperbolas because the gas is no longer an ideal gas. (b) An expanded portion of the pV diagram for low temperatures, where the phase can change from a gas to a liquid. The term “vapor” refers to the gas phase when it exists at a temperature below the boiling temperature.

The isotherms above TcTc do not go through the liquid-gas transition. Therefore, liquid cannot exist above that temperature, which is the critical temperature (described in the chapter on temperature and heat). At sufficiently low pressure above that temperature, the gas has the density of a liquid but will not condense; the gas is said to be supercritical. At higher pressure, it is solid. Carbon dioxide, for example, has no liquid phase at a temperature above 31.0ºC31.0ºC. The critical pressure is the maximum pressure at which the liquid can exist. The point on the pV diagram at the critical pressure and temperature is the critical point (which you learned about in the chapter on temperature and heat). Table 2.1 lists representative critical temperatures and pressures.

Substance Critical temperature Critical pressure
K °C°C Pa atm
Water 647.4 374.3 22.12×10622.12×106 219.0
Sulfur dioxide 430.7 157.6 7.88×1067.88×106 78.0
Ammonia 405.5 132.4 11.28×10611.28×106 111.7
Carbon dioxide 304.2 31.1 7.39×1067.39×106 73.2
Oxygen 154.8 –118.4 5.08×1065.08×106 50.3
Nitrogen 126.2 –146.9 3.39×1063.39×106 33.6
Hydrogen 33.3 –239.9 1.30×1061.30×106 12.9
Helium 5.3 –267.9 0.229×1060.229×106 2.27
Table 2.1 Critical Temperatures and Pressures for Various Substances


  • 1
  • 2
Order a print copy

As an Amazon Associate we earn from qualifying purchases.


This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at
Citation information

© Jan 19, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.