One equation, three variables
Put some gas in a container and you can measure three things about it: how much space it fills, how hard it pushes on the walls, and how hot it is. You might expect those three to be independent. They are not. Squeeze the gas without letting heat out and it gets hotter. Warm a sealed can and the pressure climbs. Two of the three are free; the third is then fixed for you.
The relation that fixes it is the ideal gas law, not a law of nature in the sense that is, but an equation of state, a statement about how one particular kind of stuff behaves. Real gases obey it well when they are dilute and far from condensing, which covers nearly every gas in a problem. This lesson builds it from the molecular picture in kinetic theory, then uses it to invert a mercury tube, compress a diesel cylinder, and predict the temperature three kilometres up.
Where comes from
The last lesson ended with a result about molecules bouncing off walls. For molecules of mass rattling around in a box of volume , the pressure on the walls is
where is the average of the squared speed. Rewrite the right side to make the kinetic energy show up. Since the average translational kinetic energy of one molecule is ,
That is pure mechanics: no temperature anywhere. Temperature enters as a definition. Two gases in thermal contact stop exchanging energy when their molecules have the same average kinetic energy, so that average is the natural thing to call temperature. The Kelvin scale was already fixed by then, so the definition carries a conversion constant :
Substitute and the and cancel:
Counting molecules one at a time is awkward, so chemists count in moles. One mole is of them, so , and grouping J/(mol·K) gives the form you will use most:
The two versions are the same statement divided by Avogadro's number. Use and when the problem talks about moles or grams, and when it talks about individual molecules.
Read it in words. At fixed temperature, pressure and volume trade off inversely: halve the volume and the pressure doubles. At fixed volume, pressure rises in direct proportion to absolute temperature. And is always in kelvin, never celsius, because the derivation ran through and kinetic energy cannot be negative.
Putting celsius into is the single most common error in this topic, and it does not announce itself: you get a plausible-looking number that is wrong by a factor of a few. Convert first, every time: . The same goes for gauge pressure. A tyre gauge reading Pa means the gas is at Pa absolute, and only the absolute value belongs in the equation.
The ratio form, which is what you actually use
Most problems never need . They give you a gas in one state and ask about another, with the amount of gas unchanged. Then is a constant you never have to evaluate, and dividing the two states gives
Cross out whatever is held fixed. Rigid container: cancels, so . Fixed temperature: is constant, which is Boyle's law. Fixed pressure: .
Example 1: a tyre after a highway run. A tyre of essentially fixed volume reads a gauge pressure of Pa at K. Driving warms the air to K. Atmospheric pressure is Pa. Find the new gauge pressure.
Convert to absolute first: Pa. The volume is fixed, so
The question asks for gauge, so subtract the atmosphere back off: Pa. Had you used gauge pressure throughout you would have got Pa: close enough to look right, and wrong.
Quick check
A sealed rigid can of gas is heated from 27 C to 327 K. By what factor does the pressure change?
Pressure bookkeeping: pistons and mercury
Half the difficulty in gas problems is not the gas law at all. It is working out what is before you use it. Two setups cover almost everything.
A piston in equilibrium is a free body. The gas below pushes up with , the atmosphere pushes down with , and gravity pulls down with . So for a piston sitting on top of the gas, and if the piston hangs below it. With kg and m², the piston contributes Pa, giving Pa.
A column of liquid of height contributes to the pressure at its bottom. Mercury problems quote lengths in cmHg and never need converting, because the conversion cancels. What matters is only whether the mercury adds to or subtracts from the atmospheric pressure holding the gas in.
Example 2: inverting a mercury-sealed tube. A tube closed at the bottom stands upright. It traps a cm air column, capped by cm of mercury, open to an atmosphere of cmHg. Turn the tube over, closed end now up, and find the new air column length at unchanged temperature.
In the first configuration the trapped air holds up cm of mercury and the atmosphere above that:
Now invert. The gas sits at the closed top with the mercury hanging below it, and below that the open end feels the atmosphere. Work up from the open end: start at , then climbing cm of mercury drops the pressure by :
The gas is at lower pressure, so it expands. The tube has uniform area, so volume is proportional to length, and Boyle's law gives
The sign of the is the whole problem. Ask each time: is the mercury sitting on the gas, or hanging off it?
When a gas is sealed off by a valve and then released into a second tank, the quantity that is conserved is , not . Add up the moles: , and since is common it cancels, leaving . For 2.00 L at Pa joined to 3.00 L at Pa, that is Pa.
Density, and why hot air rises
The mass of the gas is , where is the molar mass in kg/mol, so
At fixed pressure, density is inversely proportional to absolute temperature. That line explains hot-air balloons. Heat the air in an open-bottomed envelope and it stays at atmospheric pressure (the bottom is open, so it must) but its density falls by the factor .
Example 3: how hot must the balloon air be? An envelope encloses m³. Fabric, basket and passengers come to kg, not counting the air inside. Outside air is kg/m³ at K. Find the lowest inside temperature that lifts the balloon.
Buoyancy is the weight of displaced outside air, . It must support the payload plus the enclosed hot air, . The cancels:
Numerically kg/m³. Same pressure and same gas inside and out means is the same constant, so
About 70 °C. That is why balloon burners are large.
Equipartition: how a gas stores energy
The gas law says nothing about energy. For that you need to know how many independent ways a molecule can hold it.
The rule is remarkable. In thermal equilibrium, every independent term in a molecule's energy that is quadratic in some coordinate or velocity carries an average of : each , each , each of a vibrating bond. Call the number of such terms , the degrees of freedom. Note what a degree of freedom is, not a way of moving, but a quadratic energy term.
A single atom has three, one for motion along each of , , . So and , which is the definition of temperature you started from. That is a consistency check, not a coincidence.
A diatomic molecule adds tumbling about the two axes perpendicular to the bond, so at room temperature. Rotation about the bond axis does not count: the moment of inertia is minuscule and the energy to excite it is far above . Heat the gas to a few thousand kelvin and the bond vibrates, adding a kinetic and a potential term, so .
Multiply through by the number of molecules. The internal energy of moles is
Two things follow. First, depends on temperature alone, not on volume or pressure. Second, heating at constant volume does no work, so all the heat goes into , and the molar heat capacity at constant volume is
Heat at constant pressure instead and the gas expands, doing work . You supply that as well as the internal energy, so
The ratio of the two gets its own symbol and controls everything that follows:
Monatomic gases have , diatomics at room temperature , and a molecule with six active degrees of freedom .
Equipartition is classical, and modes freeze out when their energy spacing exceeds . Hydrogen behaves with below about 100 K, near room temperature, and only above a few thousand. When a problem bothers to tell you the temperature or says "at room temperature", it is telling you which count to use.
For a mixture, add extensively. Two moles of different gases in one vessel each contribute their own , so the mixture's molar is the mole-weighted average. One mole of argon () with one mole of nitrogen () gives , then , so . Pressures add the same way: each gas fills the whole volume and contributes a partial pressure , and the total is their sum. Two moles of oxygen with three of nitrogen at Pa total puts the oxygen at Pa.
Quick check
A gas has molar heat capacity at constant volume equal to 3R. How many active degrees of freedom does each molecule have, and what is gamma?
Adiabatic processes
An adiabatic change has no heat crossing the boundary: insulated walls, or a change too fast for heat to flow. The gas still does work, so its internal energy pays for it.
Take a small step. With no heat term the first law reads , and , so . Replace with and divide through by :
Both sides integrate to logarithms. Dividing by and using ,
Substituting turns the same statement into . Because , an adiabat is steeper on a diagram than an isotherm: compressing adiabatically raises the pressure more than compressing isothermally, because you are heating the gas as well as crowding it.
Example 4: work done in an adiabatic expansion. Two moles of a monatomic gas expand adiabatically, cooling from K to K. How much work does the gas do?
No heat flows, so the work comes entirely out of internal energy: . For a monatomic gas , so
Work through it: J/(mol·K), times mol is J/K, times K is J. The gas does about kJ of work. Notice you never needed the volumes, the pressures, or , just the temperature drop.
For a temperature question instead, use . Air at K compressed 18-fold with reaches . Since , , and , giving K. That is hot enough to ignite diesel without a spark plug, which is the entire point of a diesel engine.
The atmosphere: two different questions
Air gets thinner with altitude for one reason and colder for a completely different one. Keeping them apart is worth a section.
Pressure falls because each layer holds up the weight of everything above it. A slab of thickness and density weighs per unit area, so . Substituting at uniform temperature,
At K, kg/mol, the exponent at m is . Then , so Pa. Roughly 70 percent of sea level.
Temperature falls for an adiabatic reason. Take a parcel of air rising slowly enough to match the surrounding pressure but too fast to exchange heat. It expands as the pressure drops, does work, and cools. Per mole, with no heat in, ; the constant-pressure capacity appears because you are tracking the parcel at ambient pressure. Insert and the hydrostatic with :
so the dry adiabatic lapse rate is
Everything cancelled: no temperature, no pressure, just a constant. With J/(mol·K),
Climb a kilometre of mountain and expect about ten degrees colder. That number comes out of a gas law and a force balance, with no meteorology at all.
Example 5: the heated half of an insulated cylinder. This one is harder. An insulated cylinder of total volume is split into equal halves by a frictionless insulating piston. Each half holds mol of monatomic gas at K. A heater in the left half runs slowly until the left gas fills . Find the final temperature on the right.
Look at the right-hand gas only. It is insulated from the walls and from the left gas by the piston, and it is compressed slowly. So its process is adiabatic, and is constant, whatever the heater is doing. Its volume goes from to , a compression by a factor of 2. With , so ,
Since , the answer is K. The left gas is hotter still, but the question did not ask, and you did not need it.
Quick check
A gas is compressed to half its volume, once slowly in a water bath at fixed temperature and once quickly in an insulated cylinder. Which ends at the higher pressure?
Recognising which tool a problem wants
Almost every problem in this unit announces itself in one line.
If the problem gives you a gas in one state and asks about another state of the same gas, reach for and cross out whatever is held fixed. You will not need .
If it asks for moles, molecules, mass, density or molar mass, you need the full or , and probably . Anything mentioning buoyancy or a balloon is a density problem wearing a costume.
If the words insulated, adiabatic, no heat exchanged, or compressed rapidly appear, use or , and get by counting degrees of freedom. If instead the problem says rigid vessel or constant pressure and asks for heat, use or and nothing else.
If a piston, mercury column or manometer appears, stop and do a force balance or a liquid-column tally before touching the gas law. That step is where the marks are lost.
And if the problem is about the atmosphere, decide first which question it is asking. Pressure against height is the exponential barometric formula at fixed temperature. Temperature against height is the lapse rate . They use the same hydrostatic equation and are otherwise unrelated.
The next lesson takes , the adiabat and the first law and strings them into closed loops on a diagram, which is how you get work out of heat, and how much you are forbidden from getting. That is heat engines and the second law.