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 n=2n=2; 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 TT, 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 e−ΔE/kTe^{-\Delta E/kT}, which buries every excited level, and the statistical weight gg, 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.

Key takeaways
  • The Boltzmann equation gives the population ratio of two atomic levels in thermodynamic equilibrium: nb/na=(gb/ga) e−(Eb−Ea)/kTn_b/n_a = (g_b/g_a)\,e^{-(E_b-E_a)/kT}.
  • Two effects compete — the Boltzmann factor e−ΔE/kTe^{-\Delta E/kT} suppresses higher levels, while the statistical weights ga,gbg_a,g_b count the quantum states at each energy and can partly offset the suppression.
  • For hydrogen the level energy is En=−13.6 eV/n2E_n = -13.6\ \mathrm{eV}/n^2 and the degeneracy is gn=2n2g_n = 2n^2, so exciting an atom from n=1n=1 to n=2n=2 costs ΔE=10.2\Delta E = 10.2 eV — a gap whose temperature scale ΔE/k≈1.2×105\Delta E/k \approx 1.2\times10^5 K is far hotter than any photosphere.
  • At T=10,000T = 10{,}000 K only about 3×10−53\times10^{-5} of neutral hydrogen atoms sit in n=2n=2, 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 T≈9500T \approx 9500 K (A0 stars) rather than in the hottest O stars.
  • The equation assumes local thermodynamic equilibrium (LTE): one temperature TT 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 e−ΔE/kTe^{-\Delta E/kT}, which favours the lower level, and the statistical-weight ratio gb/gag_b/g_a, which counts the available quantum states at each energy.
The core insight

The relative population of two energy levels is set by a competition between the Boltzmann factor e−ΔE/kTe^{-\Delta E/kT}, which favours the lower level, and the ratio of statistical weights gb/gag_b/g_a, 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 kνk_\nu, 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 TT almost every atom rests on the ground shelf; as TT climbs, collisions kick a growing minority upward. The Boltzmann factor e−ΔE/kTe^{-\Delta E/kT} is exactly the fraction energetic enough to reach a shelf ΔE\Delta E higher — a probability that plunges toward zero when kTkT is much smaller than the gap and rises toward one when kTkT dwarfs it. But height is only half the story. Each shelf has a width, the statistical weight gg, 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, gn=2n2g_n = 2n^2, which softens but never overturns the exponential collapse of the upper levels.

Figure
Energy shelves of hydrogen. Level n sits at height Eₙ = −13.6 eV/n² with degeneracy gₙ = 2n², so its shelf is drawn with width proportional to gₙ. Reaching n = 2 costs ΔE = 10.2 eV, and at T = 10,000 K the Boltzmann factor lets only n₂/n₁ = 4·e^−11.8 ≈ 3×10⁻⁵ of the atoms climb that high.
Energy shelves: height = Eₙ, width ∝ degeneracy gₙ = 2n² energy E 0 eV −1.5 −3.4 −13.6 n = ∞ ionization n = 3, g = 18 n = 2, g = 8 n = 1, g = 2 (ground) ΔE = E₂ − E₁ = 10.2 eV Populating n = 2 at T = 10⁴ K n₂/n₁ = (g₂/g₁)·e^(−ΔE/kT) = 4 · e^(−11.8) ≈ 3 × 10⁻⁵ only ~3 atoms in 10⁵ reach n = 2

The natural temperature scale for exciting a transition is T∼ΔE/kT \sim \Delta E/k. 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 TT 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.

Figure
Relative hydrogen Balmer line strength versus temperature. The rising Boltzmann fraction n₂/n_HI multiplied by the falling Saha neutral fraction n_HI/n_total gives a product that peaks near T ≈ 9500 K, the temperature of A0 stars — which is why A stars, not the hotter B and O stars, show the strongest Balmer lines.
Balmer strength = Boltzmann (rises) × Saha (falls), peak T ≈ 9500 K → A0 K G F A B O 5000 10000 15000 20000 25000 temperature T (K) relative Balmer strength peak ≈ 9500 K (A0) Balmer strength (product) Boltzmann n₂/n_HI (rises) Saha n_HI/n_total (falls)

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 EE is proportional to e−E/kTe^{-E/kT}; a level with gg degenerate microstates carries a weight g e−E/kTg\,e^{-E/kT}, and dividing two levels gives the Boltzmann ratio.

nbna=gbga e−(Eb−Ea)/kT(1)\frac{n_b}{n_a} = \frac{g_b}{g_a}\,e^{-(E_b-E_a)/kT} \qquad (1)

where: na, nbn_a,\,n_b — number densities of atoms in the lower level aa and upper level bb; ga, gbg_a,\,g_b — statistical weights (degeneracies) of the two levels; Ea, EbE_a,\,E_b — level energies, with ΔE=Eb−Ea>0\Delta E = E_b - E_a > 0; kk — Boltzmann constant, 1.381×10−23 J K−1=8.617×10−5 eV K−11.381\times10^{-23}\ \mathrm{J\,K^{-1}} = 8.617\times10^{-5}\ \mathrm{eV\,K^{-1}}; TT — thermodynamic (kinetic) temperature. Read it as a competition: raise TT and the exponential climbs toward unity, so the ratio saturates at the pure degeneracy ratio gb/gag_b/g_a. 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.

naN=ga e−Ea/kTZ(T),Z(T)=∑igi e−Ei/kT(2)\frac{n_a}{N} = \frac{g_a\,e^{-E_a/kT}}{Z(T)},\qquad Z(T)=\sum_{i} g_i\,e^{-E_i/kT} \qquad (2)

where: NN — total number density of atoms in this ionization stage; Z(T)Z(T) — the partition function. For hydrogen the naive sum ∑2n2e−En/kT\sum 2n^2 e^{-E_n/kT} formally diverges as high-nn levels crowd toward E=0E=0; in practice it is truncated by pressure ionization, and near the ground state Z≈g1=2Z \approx g_1 = 2. For hydrogen the two ingredients — level energies and degeneracies — come straight from the Bohr model, and they are what make the numbers concrete.

En=−13.6 eVn2,gn=2n2(3)E_n = -\frac{13.6\ \mathrm{eV}}{n^2},\qquad g_n = 2n^2 \qquad (3)

where: nn — principal quantum number, n=1,2,3,…n = 1,2,3,\dots; the degeneracy gn=2n2g_n = 2n^2 is the factor 22 for electron spin times the n2n^2 orbital substates (ℓ\ell from 00 to n−1n-1, each with 2ℓ+12\ell+1 values of mℓm_\ell). So g1=2g_1 = 2, g2=8g_2 = 8, g3=18g_3 = 18. The gap between the ground and first excited level fixes the temperature scale for excitation. Getting an atom into n=2n=2 — the prerequisite for a Balmer line — costs the Lyman-α\alpha energy, and the temperature at which kTkT matches it is enormous by stellar standards.

ΔE=E2−E1=10.2 eV  (Lyman α),Texc∼ΔEk≈1.2×105 K(4)\Delta E = E_2 - E_1 = 10.2\ \mathrm{eV}\ \ (\text{Lyman }\alpha),\qquad T_{\rm exc}\sim \frac{\Delta E}{k} \approx 1.2\times10^{5}\ \mathrm{K} \qquad (4)

where: ΔE\Delta E — energy gap between n=1n=1 and n=2n=2; TexcT_{\rm exc} — the temperature at which kTkT becomes comparable to the gap. Because photospheres are far cooler than 10510^5 K, the excited fraction stays tiny, and the exponential dominates over the modest degeneracy boost g2/g1=4g_2/g_1 = 4. 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.

Texc=Eb−Eak ln⁡ ⁣[(gb/ga)(na/nb)](5)T_{\rm exc} = \frac{E_b - E_a}{k\,\ln\!\left[(g_b/g_a)(n_a/n_b)\right]} \qquad (5)

where: TexcT_{\rm exc} — the temperature reproducing an observed ratio na/nbn_a/n_b. If several line ratios of the same ion give the same TexcT_{\rm exc}, 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.

kν∝na Bab ϕ(ν),na from Boltzmann(6)k_\nu \propto n_a\,B_{ab}\,\phi(\nu),\qquad n_a\ \text{from Boltzmann} \qquad (6)

where: kνk_\nu — line absorption coefficient at frequency ν\nu; BabB_{ab} — Einstein absorption coefficient of the transition; ϕ(ν)\phi(\nu) — normalized line-profile function; nan_a — 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.

Derivation ADeriving the Boltzmann ratio from the canonical ensemble

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 TT; 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 ss of energy EsE_s is Ps=e−Es/kT/ZP_s = e^{-E_s/kT}/Z, with Z=∑se−Es/kTZ = \sum_s e^{-E_s/kT} 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 TT visits microstates with weight e−Es/kTe^{-E_s/kT}, and nothing about atomic structure changes that.

Step 2. Group microstates into energy levels. A level ii collects gig_i distinct microstates that all share the same energy EiE_i, so the probability of finding the atom somewhere in level ii is the sum

P(level i)=1Z∑s∈ie−Es/kT=gi e−Ei/kTZ.P(\text{level } i) = \frac{1}{Z}\sum_{s\in i} e^{-E_s/kT} = \frac{g_i\,e^{-E_i/kT}}{Z}.

Why: degeneracy is just multiplicity — gig_i equal terms add to give a factor gig_i, which is the mathematical origin of the statistical weight in the final formula.

Step 3. Convert probabilities to populations. With NN atoms per unit volume in this ionization stage, the number in level ii is NN times the level probability,

ni=N P(level i)=N gi e−Ei/kTZ.n_i = N\,P(\text{level } i) = N\,\frac{g_i\,e^{-E_i/kT}}{Z}.

Why: populations are just probabilities scaled by how many atoms are available to distribute, so every level inherits the same gie−Ei/kT/Zg_i e^{-E_i/kT}/Z weighting.

Step 4. Take the ratio of two levels and watch the common factor cancel,

nbna=gb e−Eb/kTga e−Ea/kT=gbga e−(Eb−Ea)/kT.\frac{n_b}{n_a} = \frac{g_b\,e^{-E_b/kT}}{g_a\,e^{-E_a/kT}} = \frac{g_b}{g_a}\,e^{-(E_b-E_a)/kT}.

Why: the shared prefactor N/ZN/Z 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 e−E/kTe^{-E/kT} 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
Derivation BThe 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 n=2n=2 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 n=1n=1 and n=2n=2, an excellent approximation since higher levels are even more suppressed.

Step 1. Write the Boltzmann ratio for hydrogen n=2n=2 over n=1n=1 with g1=2g_1 = 2, g2=8g_2 = 8, and ΔE=10.2\Delta E = 10.2 eV,

n2n1=g2g1 e−ΔE/kT=4 e−10.2 eV/kT.\frac{n_2}{n_1} = \frac{g_2}{g_1}\,e^{-\Delta E/kT} = 4\,e^{-10.2\,\mathrm{eV}/kT}.

Why: the degeneracy ratio g2/g1=8/2=4g_2/g_1 = 8/2 = 4 is a fixed multiplier; all the temperature dependence lives in the exponential, so the physics is set by the dimensionless ratio ΔE/kT\Delta E/kT.

Step 2. Evaluate the exponent at T=10,000T = 10{,}000 K using k=8.617×10−5k = 8.617\times10^{-5} eV/K,

ΔEkT=10.2(8.617×10−5)(104)=10.20.8617≈11.8.\frac{\Delta E}{kT} = \frac{10.2}{(8.617\times10^{-5})(10^4)} = \frac{10.2}{0.8617} \approx 11.8.

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, e−11.8≈7.4×10−6e^{-11.8} \approx 7.4\times10^{-6}, so

n2n1≈4×7.4×10−6≈3×10−5.\frac{n_2}{n_1} \approx 4 \times 7.4\times10^{-6} \approx 3\times10^{-5}.

Why: about three atoms in every hundred thousand reach n=2n=2 — yet a photosphere presents a column of order 101710^{17} hydrogen atoms per square centimetre, so three in 10510^5 is still an ample supply of absorbers.

Step 4. Repeat at T=6000T = 6000 K. Now ΔE/kT≈19.7\Delta E/kT \approx 19.7, so n2/n1≈1×10−8n_2/n_1 \approx 1\times10^{-8} — roughly a thousand times fewer excited atoms than at 10,00010{,}000 K. Why: because the population depends exponentially on 1/T1/T, 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
Derivation CWhy 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 n=2n=2 population, why are the Balmer lines strongest in A-type stars near 95009500 K rather than in the fiercely hot O stars? Balmer absorption needs neutral hydrogen atoms in n=2n=2, 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,

NHI, n=2∝n2nHI⏟Boltzmann ↑×nHIntotal⏟Saha ↓.N_{\mathrm{HI},\,n=2} \propto \underbrace{\frac{n_2}{n_{\mathrm{HI}}}}_{\text{Boltzmann}\ \uparrow}\times \underbrace{\frac{n_{\mathrm{HI}}}{n_{\mathrm{total}}}}_{\text{Saha}\ \downarrow}.

Why: an atom must be both neutral (to have a bound electron at all) and excited to n=2n=2 (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 TT rises, n2/nHIn_2/n_{\mathrm{HI}} grows exponentially — from ∼10−8\sim10^{-8} at 60006000 K to ∼10−5\sim10^{-5} at 10,00010{,}000 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 TT rises past about 10410^4 K, collisions and the radiation field ionize hydrogen wholesale, so the neutral fraction nHI/ntotaln_{\mathrm{HI}}/n_{\mathrm{total}} 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 n=2n=2, 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 T≈9500T \approx 9500 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 n2/nHIn_2/n_{\mathrm{HI}} and Saha nHI/ntotaln_{\mathrm{HI}}/n_{\mathrm{total}} and confirm the maximum near 95009500 K.

Limiting cases

The Boltzmann ratio nb/na=(gb/ga) e−ΔE/kTn_b/n_a = (g_b/g_a)\,e^{-\Delta E/kT} is best understood through the temperatures at which one factor or the other wins.

CaseResultMeaning
High temperature, kT≫ΔEkT \gg \Delta Enbna→gbga\dfrac{n_b}{n_a} \to \dfrac{g_b}{g_a}The exponential saturates to unity; levels fill purely in proportion to their degeneracies — equipartition among all accessible states.
Low temperature, kT≪ΔEkT \ll \Delta Enbna→gbga e−ΔE/kT→0\dfrac{n_b}{n_a} \to \dfrac{g_b}{g_a}\,e^{-\Delta E/kT} \to 0Upper levels are exponentially emptied; essentially every atom sits in the ground level.
Degenerate levels, ΔE→0\Delta E \to 0nbna=gbga\dfrac{n_b}{n_a} = \dfrac{g_b}{g_a}Two levels of equal energy share population by statistical weight alone, at any temperature.
Absolute populationnaN=ga e−Ea/kTZ(T)\dfrac{n_a}{N} = \dfrac{g_a\,e^{-E_a/kT}}{Z(T)}A single level's share of all atoms needs the partition function Z(T)Z(T); only ratios let ZZ cancel.

Worked examples

1 · The excited hydrogen fraction at two temperatures (fully worked)

Compute the fraction of neutral hydrogen atoms in n=2n=2 at T=10,000T = 10{,}000 K and T=6000T = 6000 K, and comment on what it implies for Balmer strength. Use g1=2g_1 = 2, g2=8g_2 = 8, ΔE=10.2\Delta E = 10.2 eV, k=8.617×10−5k = 8.617\times10^{-5} eV/K.

Step 1. Form the two-level fraction. Keeping only n=1n=1 and n=2n=2,

n2n1+n2=n2/n11+n2/n1,n2n1=4 e−10.2/kT.\frac{n_2}{n_1 + n_2} = \frac{n_2/n_1}{1 + n_2/n_1},\qquad \frac{n_2}{n_1} = 4\,e^{-10.2/kT}.

Step 2. At T=10,000T = 10{,}000 K the exponent is 10.2/(8.617×10−5×104)=11.8410.2/(8.617\times10^{-5}\times10^4) = 11.84, so n2/n1=4 e−11.84=4(7.2×10−6)≈2.9×10−5n_2/n_1 = 4\,e^{-11.84} = 4(7.2\times10^{-6}) \approx 2.9\times10^{-5}. Because this is tiny the denominator is essentially one, giving a fraction ≈2.9×10−5\approx \mathbf{2.9\times10^{-5}} — about 3 atoms in 100,000 are ready to absorb a Balmer photon.

Step 3. At T=6000T = 6000 K the exponent rises to 10.2/(8.617×10−5×6000)=19.7310.2/(8.617\times10^{-5}\times6000) = 19.73, so n2/n1=4 e−19.73≈1.1×10−8n_2/n_1 = 4\,e^{-19.73} \approx \mathbf{1.1\times10^{-8}} — roughly a thousandfold smaller.

Step 4. Interpret. Dropping the temperature by a factor 10/610/6 cut the excited population by about 26002600, because the dependence is exponential in 1/T1/T — the excitation-side reason cool stars show weak hydrogen lines. Yet even the 3×10−53\times10^{-5} fraction at 10,00010{,}000 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 n2/n1=1.0×10−4n_2/n_1 = 1.0\times10^{-4}, inferred from line strengths. Assuming LTE, what is its temperature?

Step 1. Invert the Boltzmann equation for TT (equation 5), with Eb−Ea=10.2E_b - E_a = 10.2 eV and gb/ga=8/2=4g_b/g_a = 8/2 = 4,

T=ΔEk ln⁡ ⁣[(gb/ga)(na/nb)]=10.2k ln⁡ ⁣[4 (1/1.0×10−4)].T = \frac{\Delta E}{k\,\ln\!\left[(g_b/g_a)(n_a/n_b)\right]} = \frac{10.2}{k\,\ln\!\left[4\,(1/1.0\times10^{-4})\right]}.

Step 2. Evaluate the logarithm: (gb/ga)(na/nb)=4×104=4.0×104(g_b/g_a)(n_a/n_b) = 4\times10^{4} = 4.0\times10^4, and ln⁡(4.0×104)=10.60\ln(4.0\times10^4) = 10.60.

Step 3. Divide: T=10.2/(8.617×10−5×10.60)=10.2/(9.13×10−4)≈1.12×104 KT = 10.2 / (8.617\times10^{-5} \times 10.60) = 10.2/(9.13\times10^{-4}) \approx \mathbf{1.12\times10^{4}\ K}.

Step 4. Sanity-check forward: at T=11,200T = 11{,}200 K the exponent is 10.5710.57, so n2/n1=4 e−10.57=1.0×10−4n_2/n_1 = 4\,e^{-10.57} = 1.0\times10^{-4}, 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 e−E/kTe^{-E/kT}.

Origins · 1 minLudwig Boltzmann and how this was discovered
LB
Ludwig Boltzmann
1844–1906 · statistical mechanics and the kinetic theory of gases

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 WW consistent with a macrostate, S=kln⁡WS = k\ln W — 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 EE is occupied with probability proportional to e−E/kTe^{-E/kT}, whether that state is a molecule's velocity or, as here, an atom's electronic level. The constant kk 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 nb/na=(gb/ga) e−ΔE/kTn_b/n_a = (g_b/g_a)\,e^{-\Delta E/kT} 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 kTkT.

History
1877
— Boltzmann relates entropy to microstate counting, S = k log W
1900
— Planck's quantization gives atoms discrete energy levels and fixes the constant k
1913
— Bohr's model sets Eₙ = −13.6 eV/n² and gₙ = 2n² for hydrogen
1920
— Saha derives the ionization equation, the excitation–ionization partner
1925
— Payne applies Saha–Boltzmann to show stellar atmospheres are mostly hydrogen

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 nb/na=(gb/ga) e−ΔE/kTn_b/n_a = (g_b/g_a)\,e^{-\Delta E/kT} with ZZ cancelling exactly; for hydrogen with k=8.617×10−5k = 8.617\times10^{-5} eV/K, ΔE=10.2\Delta E = 10.2 eV, g1=2g_1 = 2, g2=8g_2 = 8, one obtains n2/n1≈3×10−5n_2/n_1 \approx 3\times10^{-5} at 10,00010{,}000 K and ≈1×10−8\approx 1\times10^{-8} at 60006000 K; inverting for n2/n1=10−4n_2/n_1 = 10^{-4} returns T≈1.1×104T \approx 1.1\times10^4 K; and the Boltzmann×Saha product peaks near 95009500 K. Constants used throughout: k=1.381×10−23k = 1.381\times10^{-23} J/K =8.617×10−5= 8.617\times10^{-5} eV/K; hydrogen ground-state energy −13.6-13.6 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 ii is ni=N gi e−Ei/kT/Z(T)n_i = N\,g_i\,e^{-E_i/kT}/Z(T), and the N/ZN/Z prefactor is identical for every level in the same ionization stage. Dividing nbn_b by nan_a cancels it exactly, leaving only (gb/ga) e−ΔE/kT(g_b/g_a)\,e^{-\Delta E/kT}. This is a practical gift, because Z(T)=∑igie−Ei/kTZ(T) = \sum_i g_i e^{-E_i/kT} 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 ZZ head-on.

What is a statistical weight, and where does g = 2n² for hydrogen come from?

The statistical weight gg 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 nn has orbital ℓ\ell from 00 to n−1n-1, each providing 2ℓ+12\ell+1 values of mℓm_\ell; summing ∑ℓ=0n−1(2ℓ+1)=n2\sum_{\ell=0}^{n-1}(2\ell+1) = n^2 gives the orbital multiplicity, and a factor of 22 for electron spin makes gn=2n2g_n = 2n^2. So g1=2g_1 = 2, g2=8g_2 = 8, g3=18g_3 = 18. This growth with nn 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 TT 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 TT 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 101710^{17} hydrogen atoms per square centimetre; three parts in 10510^5 of that is still ∼1013\sim10^{13} atoms per square centimetre in n=2n=2, 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 n=2n=2 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 n=1n=1 versus n=2n=2. Saha redistributes atoms among ionization stages — how many hydrogen atoms are neutral versus singly ionized. Boltzmann involves only the excitation energy ΔE\Delta E 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 TT. 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.

Before this

Where this leads