The Boltzmann Equation
Point a spectrograph at any star and you get a barcode of dark lines, and the depths of those lines are the raw data of astrophysics — temperature, composition, pressure, motion. But a line is only as dark as the number of atoms sitting in the exact lower level the photon can lift them out of. The Balmer lines of hydrogen, the signature of the visible spectrum, absorb only from atoms already parked in the second level ; if none is there, the line vanishes no matter how much hydrogen the star holds. So the first question stellar spectroscopy must answer is bookkeeping: given a gas at temperature , what fraction of its atoms occupy each internal energy level? The Boltzmann equation is that answer. It is Maxwell–Boltzmann statistics turned inward — applied not to atoms' translational motion but to their electronic states — and it says a level's population falls off exponentially with energy, tempered by how many quantum states share that energy. Two numbers fight: the Boltzmann factor , which buries every excited level, and the statistical weight , which counts the seats available at each height. Their ratio, taken between two levels, is exact and astonishingly simple because the intractable partition function cancels. Paired with its sister the Saha equation — which tracks ionization rather than excitation — it explains why the OBAFGKM spectral sequence looks as it does, why hydrogen lines peak in A stars, and how a spectrum becomes a thermometer. It is the hinge between microscopic quantum statistics and the macroscopic light of stars.
- The Boltzmann equation gives the population ratio of two atomic levels in thermodynamic equilibrium: .
- Two effects compete — the Boltzmann factor suppresses higher levels, while the statistical weights count the quantum states at each energy and can partly offset the suppression.
- For hydrogen the level energy is and the degeneracy is , so exciting an atom from to costs eV — a gap whose temperature scale K is far hotter than any photosphere.
- At K only about of neutral hydrogen atoms sit in , yet the sheer column of atoms still makes the Balmer lines strong.
- Combined with the Saha ionization equation, the Boltzmann equation explains why Balmer strength peaks near K (A0 stars) rather than in the hottest O stars.
- The equation assumes local thermodynamic equilibrium (LTE): one temperature must describe velocities and level populations alike, which fails in thin, radiation-driven gas.
- Key idea: the relative population of two levels is a tug-of-war between the Boltzmann factor , which favours the lower level, and the statistical-weight ratio , which counts the available quantum states at each energy.
The relative population of two energy levels is set by a competition between the Boltzmann factor , which favours the lower level, and the ratio of statistical weights , which counts the available quantum states at each energy.
Where this lives today
The Boltzmann equation is compiled into every modern stellar-atmosphere code. Programs such as ATLAS, MARCS, PHOENIX and Turbospectrum solve the coupled Saha–Boltzmann statistics at each depth of a model photosphere to predict level populations, feed them into the line opacity , and synthesize a spectrum matched against observations to extract temperature, gravity and abundances. Massive surveys lean on this: the SDSS/APOGEE and Gaia-ESO pipelines fit millions of spectra to derive abundances of dozens of elements — the raw material of Galactic archaeology. Where LTE breaks down, in the thin outer layers of hot and giant stars, spectroscopists apply non-LTE corrections, solving the full statistical-equilibrium rate equations and quantifying "departure coefficients" that measure how far a population strays from its Boltzmann value; these shift inferred iron, oxygen and sodium abundances at the tenths-of-a-dex level. The same statistics govern the interstellar medium, where fine-structure and rotational level populations act as thermometers of cold gas, and even the 21-cm line that maps galaxies is a two-level Boltzmann ratio through its "spin temperature." A century on, the exponential Boltzmann weighting is the first thing any quantitative account of astrophysical gas must get right.
The physical picture
Picture the energy levels of an atom as shelves stacked at increasing heights, and temperature as how hard the surrounding gas shakes each atom through collisions. At low almost every atom rests on the ground shelf; as climbs, collisions kick a growing minority upward. The Boltzmann factor is exactly the fraction energetic enough to reach a shelf higher — a probability that plunges toward zero when is much smaller than the gap and rises toward one when dwarfs it. But height is only half the story. Each shelf has a width, the statistical weight , counting how many quantum states share that energy. A wide upper shelf pulls in more atoms even though it sits higher, so the occupancy ratio balances height (the exponential) against width (the degeneracy ratio). For hydrogen the shelves widen as they rise, , which softens but never overturns the exponential collapse of the upper levels.
The natural temperature scale for exciting a transition is . An optical transition of a few electronvolts corresponds to tens of thousands of kelvin, so at ordinary photospheric temperatures the excited populations are minuscule — yet the lines are strong, because a tiny fraction of an enormous number of atoms is still an enormous number of absorbers. This is why the Boltzmann equation alone does not explain stellar spectra. As rises the excited fraction grows, but the atoms also begin to ionize, and an ionized hydrogen atom has no bound electron to absorb a Balmer photon at all. Excitation (Boltzmann) pushes line strength up; ionization (Saha) pulls the supply of neutral absorbers down. Their product is a peaked curve, and the peak is why A-type stars, not the hotter O stars, show the strongest hydrogen lines.
The core equations
The equation exists in two guises: a ratio between two levels, which is exact and simple, and an absolute fraction of all atoms, which needs the partition function. The ratio is the workhorse, because taking it cancels the hard sum over all states. In equilibrium the probability of a microstate of energy is proportional to ; a level with degenerate microstates carries a weight , and dividing two levels gives the Boltzmann ratio.
where: — number densities of atoms in the lower level and upper level ; — statistical weights (degeneracies) of the two levels; — level energies, with ; — Boltzmann constant, ; — thermodynamic (kinetic) temperature. Read it as a competition: raise and the exponential climbs toward unity, so the ratio saturates at the pure degeneracy ratio . For the population of one level as a fraction of all atoms in that ionization stage there is no cancellation, and the partition function — the degeneracy-weighted sum of Boltzmann factors over every bound level — must appear explicitly.
where: — total number density of atoms in this ionization stage; — the partition function. For hydrogen the naive sum formally diverges as high- levels crowd toward ; in practice it is truncated by pressure ionization, and near the ground state . For hydrogen the two ingredients — level energies and degeneracies — come straight from the Bohr model, and they are what make the numbers concrete.
where: — principal quantum number, ; the degeneracy is the factor for electron spin times the orbital substates ( from to , each with values of ). So , , . The gap between the ground and first excited level fixes the temperature scale for excitation. Getting an atom into — the prerequisite for a Balmer line — costs the Lyman- energy, and the temperature at which matches it is enormous by stellar standards.
where: — energy gap between and ; — the temperature at which becomes comparable to the gap. Because photospheres are far cooler than K, the excited fraction stays tiny, and the exponential dominates over the modest degeneracy boost . Turned around, the equation becomes a thermometer: measure a population ratio from two line strengths and solve for the temperature that produced it. In LTE this excitation temperature equals the kinetic temperature.
where: — the temperature reproducing an observed ratio . If several line ratios of the same ion give the same , LTE is self-consistent; systematic disagreement is a fingerprint of non-LTE. Finally, the reason any of this is observable: the lower-level population sets the line's absorption coefficient — every dark line in a spectrum is a Boltzmann population read out through the opacity.
where: — line absorption coefficient at frequency ; — Einstein absorption coefficient of the transition; — normalized line-profile function; — lower-level population supplied by equation (1) or (2). A line is deep only where its lower level is well populated, which is precisely what the Boltzmann equation quantifies.
The goal of this derivation is to obtain equation (1) from first principles, making explicit where the exponential and the statistical weights enter and why the partition function drops out of a level ratio. We treat a gas of identical atoms in thermal contact with a heat bath at temperature ; each has a discrete ladder of internal levels, and we ask for the relative occupation of any two at equilibrium. The result rests on one input — the canonical probability of a single microstate — plus careful counting of degenerate microstates.
Step 1. Start from the canonical distribution: the probability of finding one atom in a specific quantum microstate of energy is , with the single-atom partition function summed over microstates. Why: this is the defining result of the canonical ensemble — a system coupled to a bath at temperature visits microstates with weight , and nothing about atomic structure changes that.
Step 2. Group microstates into energy levels. A level collects distinct microstates that all share the same energy , so the probability of finding the atom somewhere in level is the sum
Why: degeneracy is just multiplicity — equal terms add to give a factor , which is the mathematical origin of the statistical weight in the final formula.
Step 3. Convert probabilities to populations. With atoms per unit volume in this ionization stage, the number in level is times the level probability,
Why: populations are just probabilities scaled by how many atoms are available to distribute, so every level inherits the same weighting.
Step 4. Take the ratio of two levels and watch the common factor cancel,
Why: the shared prefactor is identical for both levels, so it divides out — which is why a level ratio never needs the partition function, while an absolute fraction always does. This reproduces Carroll and Ostlie equation (8.6). When verifying, check that the canonical weight is and that the degeneracy enters linearly, once per level.
Go deeper · Derivation B · 1 minThe excited hydrogen fraction and why the Balmer lines are weak
The purpose here is to turn the abstract ratio into a hard number for hydrogen and explain a genuine puzzle: the Balmer lines dominate the visible spectra of many stars, yet the fraction of atoms able to make a Balmer absorption is vanishingly small. We compute the occupation of relative to the ground state versus temperature, evaluate it at a photospheric temperature, and show how sharply it collapses when the star is cooler. We keep only and , an excellent approximation since higher levels are even more suppressed.
Step 1. Write the Boltzmann ratio for hydrogen over with , , and eV,
Why: the degeneracy ratio is a fixed multiplier; all the temperature dependence lives in the exponential, so the physics is set by the dimensionless ratio .
Step 2. Evaluate the exponent at K using eV/K,
Why: this dimensionless number decides everything — the gap is nearly twelve times the thermal energy, so only the exponential tail of the collision-energy distribution can bridge it.
Step 3. Exponentiate and multiply, , so
Why: about three atoms in every hundred thousand reach — yet a photosphere presents a column of order hydrogen atoms per square centimetre, so three in is still an ample supply of absorbers.
Step 4. Repeat at K. Now , so — roughly a thousand times fewer excited atoms than at K. Why: because the population depends exponentially on , a modest temperature drop slashes the excited fraction by orders of magnitude — the excitation-side reason cool stars show weak hydrogen lines. The numbers match the Carroll and Ostlie §8.1 worked example.
Go deeper · Derivation C · 2 minWhy Balmer strength peaks in A stars: Boltzmann times Saha
This derivation resolves the classic paradox of stellar classification: if raising temperature always raises the excited population, why are the Balmer lines strongest in A-type stars near K rather than in the fiercely hot O stars? Balmer absorption needs neutral hydrogen atoms in , and temperature acts on that supply through two opposing channels — one Boltzmann, one Saha. We write the observable as their product and track how each factor behaves as the star gets hotter.
Step 1. Express the number of Balmer absorbers as a product of a Boltzmann factor and a Saha factor,
Why: an atom must be both neutral (to have a bound electron at all) and excited to (to absorb a Balmer photon); the first condition is Saha's business, the second is Boltzmann's, and the observable strength scales with their product.
Step 2. Follow the Boltzmann factor upward. As rises, grows exponentially — from at K to at K — pushing line strength up. Why: this is the excited-fraction result of the previous derivation, and taken alone it would predict the strongest Balmer lines in the hottest stars.
Step 3. Follow the Saha factor downward. As rises past about K, collisions and the radiation field ionize hydrogen wholesale, so the neutral fraction crashes toward zero — removing the very atoms Boltzmann was busy exciting. Why: an ionized hydrogen atom is a bare proton with no electron to lift into , so beyond a point ionization starves the Balmer lines faster than excitation can feed them.
Step 4. Multiply the rising and falling factors. A product of an increasing and a decreasing function has a maximum; for hydrogen it falls near K (spectral type A0) — exactly where the observed Balmer lines peak. Why: this is the quantitative triumph of combining the two equations, and it is the solid curve in the second figure. The peak is consistent with Carroll and Ostlie Figure 8.10. A verifier should reconstruct the product curve from Boltzmann and Saha and confirm the maximum near K.
Limiting cases
The Boltzmann ratio is best understood through the temperatures at which one factor or the other wins.
| Case | Result | Meaning |
|---|---|---|
| High temperature, | The exponential saturates to unity; levels fill purely in proportion to their degeneracies — equipartition among all accessible states. | |
| Low temperature, | Upper levels are exponentially emptied; essentially every atom sits in the ground level. | |
| Degenerate levels, | Two levels of equal energy share population by statistical weight alone, at any temperature. | |
| Absolute population | A single level's share of all atoms needs the partition function ; only ratios let cancel. |
Worked examples
1 · The excited hydrogen fraction at two temperatures (fully worked)
Compute the fraction of neutral hydrogen atoms in at K and K, and comment on what it implies for Balmer strength. Use , , eV, eV/K.
Step 1. Form the two-level fraction. Keeping only and ,
Step 2. At K the exponent is , so . Because this is tiny the denominator is essentially one, giving a fraction — about 3 atoms in 100,000 are ready to absorb a Balmer photon.
Step 3. At K the exponent rises to , so — roughly a thousandfold smaller.
Step 4. Interpret. Dropping the temperature by a factor cut the excited population by about , because the dependence is exponential in — the excitation-side reason cool stars show weak hydrogen lines. Yet even the fraction at K suffices, because the hydrogen column is so large. At 10,000 K about 3×10⁻⁵ of atoms sit in n = 2; at 6000 K only ~1×10⁻⁸.
2 · A spectroscopic thermometer: inverting for the excitation temperature
A cloud of neutral hydrogen shows a population ratio , inferred from line strengths. Assuming LTE, what is its temperature?
Step 1. Invert the Boltzmann equation for (equation 5), with eV and ,
Step 2. Evaluate the logarithm: , and .
Step 3. Divide: .
Step 4. Sanity-check forward: at K the exponent is , so , reproducing the input. The measured ratio pins the temperature to about 11,200 K — a distance-independent thermometer, since it depends only on a ratio of two lines from the same atom. T_exc ≈ 1.1×10⁴ K.
Physics of the portrait
The equation carries the name of the physicist who taught the world that macroscopic thermodynamics is atomic statistics in disguise — that entropy counts microstates and populations follow .
Origins · 1 minLudwig Boltzmann and how this was discovered
Ludwig Boltzmann built the bridge between the invisible motion of atoms and the measurable laws of heat, decades before atoms were universally accepted as real. In the 1870s he showed that the second law of thermodynamics is statistical, not absolute: entropy measures the number of microscopic arrangements consistent with a macrostate, — the equation carved on his gravestone in Vienna. From the same reasoning flows the distribution that bears his name: in thermal equilibrium a state of energy is occupied with probability proportional to , whether that state is a molecule's velocity or, as here, an atom's electronic level. The constant linking energy to temperature is Boltzmann's, though it was Planck who first wrote it in that form. Boltzmann's kinetic theory and transport equation are foundations of modern physics, yet in his lifetime they drew fierce opposition from those who denied the reality of atoms — a hostility that weighed on a man already prone to deep depression. He took his own life in 1906, a few years before Perrin's experiments on Brownian motion settled the atomic question in his favour. When astronomers write to read a star's temperature off its spectrum, they use his insight exactly as he framed it — populations set by the exponential weighting of energy against the thermal scale .
Going further
Texts. Carroll and Ostlie, An Introduction to Modern Astrophysics, 2nd ed., §8.1 — the canonical undergraduate treatment with the hydrogen worked example · Ryden and Peterson, Foundations of Astrophysics, ch. 15 · Rybicki and Lightman, Radiative Processes in Astrophysics, §9.1 (LTE and the source function) · Mihalas, Stellar Atmospheres, 2nd ed., ch. 5 · Gray, The Observation and Analysis of Stellar Photospheres, for the practical spectroscopy. Key numerical checks: the canonical-ensemble derivation gives with cancelling exactly; for hydrogen with eV/K, eV, , , one obtains at K and at K; inverting for returns K; and the Boltzmann×Saha product peaks near K. Constants used throughout: J/K eV/K; hydrogen ground-state energy eV.
Prerequisites. Blackbody Radiation and the Planck Law · Local Thermodynamic Equilibrium. Leads to. The Saha Ionization Equation · Spectral Line Formation · Kirchhoff's Laws and Thermal Emission.
Ask the tutor: Want to see how the Balmer peak at 9500 K falls out numerically when you multiply the Boltzmann excited fraction by the Saha neutral fraction? Ask and we will build the product curve together.
Why does taking a ratio of two levels let me ignore the partition function?
Because the partition function is a common factor. The absolute population of level is , and the prefactor is identical for every level in the same ionization stage. Dividing by cancels it exactly, leaving only . This is a practical gift, because is a hard, sometimes formally divergent sum over all bound levels. So level ratios are clean and exact, while the fraction of atoms in a single level — or the total line opacity — forces you to confront head-on.
What is a statistical weight, and where does g = 2n² for hydrogen come from?
The statistical weight of a level is the number of distinct quantum microstates sharing that energy — its degeneracy. It enters the Boltzmann equation because each microstate carries its own Boltzmann factor, and they add. For hydrogen, a level has orbital from to , each providing values of ; summing gives the orbital multiplicity, and a factor of for electron spin makes . So , , . This growth with is why upper levels are not quite as starved as the bare exponential suggests.
What exactly does "local thermodynamic equilibrium" require?
LTE requires that a single temperature simultaneously describes the velocity distribution (Maxwellian), the ionization balance (Saha), and the level populations (Boltzmann) at each point in the gas. It holds when collisions are frequent enough to thermalize atoms faster than radiation can drag their populations out of equilibrium — that is, at high density. It is "local" because varies from place to place; each small volume sits in its own equilibrium at its own temperature. LTE is excellent deep in stellar photospheres and is what licenses using the Boltzmann and Saha equations at all, but it degrades in thin, transparent, radiation-dominated layers.
If only 3 in 100,000 hydrogen atoms are in n = 2, how can Balmer lines be so strong?
Because a small fraction of a colossal number is still a large number. A photosphere presents a sight-line through a column holding well over hydrogen atoms per square centimetre; three parts in of that is still atoms per square centimetre in , each an eager absorber. Line strength depends on the absolute column of lower-level absorbers, not their fractional abundance. It is also why Balmer lines fade toward cooler stars (the excited fraction plummets) and toward hotter stars (ionization empties the neutral reservoir) — either way the absolute number of absorbers drops.
How is the Boltzmann equation different from the Saha equation?
They are complementary halves of the same accounting. Boltzmann redistributes atoms among the bound levels within one ionization stage — how many neutral hydrogen atoms are in versus . Saha redistributes atoms among ionization stages — how many hydrogen atoms are neutral versus singly ionized. Boltzmann involves only the excitation energy and degeneracies; Saha also involves the ionization energy, the free-electron density, and a phase-space factor from the liberated electron. In a real gas you apply both: Saha gives the neutral fraction, Boltzmann distributes those neutrals among their levels. Getting the OBAFGKM sequence right requires them together.
Can the excitation temperature ever differ from the gas kinetic temperature?
Yes — and when it does, it signals that LTE has broken down. In strict LTE the excitation temperature inferred from any pair of levels equals the kinetic temperature, so all line ratios give one consistent . But in low-density, radiation-driven gas the populations are set by the balance of radiative and collisional rates rather than collisions alone, and different level pairs can imply different "temperatures." Spectroscopists exploit this: a mismatch between the excitation, ionization, and kinetic temperatures is the fingerprint of non-LTE, quantified with departure coefficients relative to the Boltzmann prediction. So the Boltzmann temperature is both a thermometer in equilibrium and a diagnostic of its own failure out of it.