An interactive demo created by Claude Opus 5.5, based on the lecture notes by Sang Hoon Lee (Statistical Physics 1, Chapter 3, Interactions and Implications, Sections 3.1 to 3.3)

What Temperature Really Is

Temperature is the thing that is equal for two objects in thermal equilibrium. Entropy is the thing that is maximized there. Put the two together and temperature gets its real definition, one that even allows temperatures below absolute zero.

Temperature from entropy

By the second law, two objects in thermal equilibrium have reached the maximum possible total entropy. Operationally (Section 1.1), they are also at the same temperature. Take two Einstein solids, \(N_A = 300\) and \(N_B = 200\), sharing \(q_{\text{total}} = 100\) units of energy, with \(S_{\text{total}} = S_A + S_B\). At equilibrium (\(q_A = 60\)) the total entropy is at its maximum, so

\( \displaystyle \frac{\partial S_{\text{total}}}{\partial U_A} = \frac{\partial S_A}{\partial U_A} + \frac{\partial S_B}{\partial U_A} = 0 \)\( \displaystyle \Longrightarrow\; \frac{\partial S_A}{\partial U_A} = \frac{\partial S_B}{\partial U_B} \)

using \(dU_A = -dU_B\). Away from equilibrium, energy flowing from B to A raises the total entropy if A’s entropy gains more than B’s loses, so it happens spontaneously: energy tends to flow into the object with the steeper \(S\)-versus-\(U\) graph, which “wants” energy, and out of the one with the shallower graph, which doesn’t “mind” losing some. Steep means cold and shallow means hot, which gives the real definition of temperature:

\( \displaystyle \frac{1}{T} \equiv \left(\frac{\partial S}{\partial U}\right)_{N,V} \)

(the units work out because \(S\) carries \(k_{\mathrm{B}}\)). Drag \(q_A\) to see both slopes.

\(S_A\) \(S_B\) \(S_{\text{total}}\)

\(k_{\mathrm{B}}T_A/\varepsilon\)
–
\(k_{\mathrm{B}}T_B/\varepsilon\)
–
\(S_{\text{total}}/k_{\mathrm{B}}\)
–

\(T = \Delta U/\Delta S\) by centered differences, as in the lecture’s table, from exact multiplicities. (The lecture’s 0.83 for \(T_B\) at \(q_A = 12\) comes from the table’s rounded entropies; the exact value is 0.85.)

Money, happiness, and generosity

The textbook offers a social analogy: energy is money, entropy is happiness, and temperature is generosity. A “normal” person is happier with more money but more generous as they get more, since each extra unit adds less happiness. A “miserly” person’s happiness rises faster and faster, so they grow less generous; an “enlightened” one is happier as they lose money. Two miserly systems can satisfy \(\partial S_A/\partial U_A = \partial S_B/\partial U_B\), but at a minimum of the total entropy, so the equilibrium is unstable: a small perturbation drives them away from it (Problem 3.4).

Putting the definition to work

For a large Einstein solid with \(q \gg N\), \(S = Nk_{\mathrm{B}}[\ln(q/N) + 1]\) with \(U = q\varepsilon\), so \(1/T = Nk_{\mathrm{B}}/U\), which recovers the equipartition result \(U = Nk_{\mathrm{B}}T\) (two degrees of freedom per oscillator). For a monatomic ideal gas, the Sackur–Tetrode equation gives \(S = Nk_{\mathrm{B}}\ln U^{3/2} + \ldots\), so \(U = \tfrac32 Nk_{\mathrm{B}}T\). In the opposite, quantum limit \(q \ll N\), \(\Omega \approx (eN/q)^q\) gives (Problem 3.5)

\[ U = N\varepsilon\,e^{-\varepsilon/k_{\mathrm{B}}T} \qquad (q \ll N) \]

a first appearance of the Boltzmann factor \(e^{-\varepsilon/k_{\mathrm{B}}T}\). Applying \(1/T = \partial S/\partial U\) directly to the exact multiplicity of a large Einstein solid connects the two limits:

From the exact multiplicity \(U = Nk_{\mathrm{B}}T\) (\(q \gg N\)) \(U = N\varepsilon\,e^{-\varepsilon/k_{\mathrm{B}}T}\) (\(q \ll N\))
Show
\(q/N\), exact
–
\(q \gg N\) limit
–
\(q \ll N\) limit
–

With \(\Omega = \binom{q+N-1}{q}\), \(\partial S/\partial q = k_{\mathrm{B}}\ln(1 + N/q)\) for large \(N\), so \(q/N = 1/(e^{\varepsilon/k_{\mathrm{B}}T} - 1)\). The high-temperature line is offset from it by \(\tfrac12\) at large \(T\), since the zero-point energy is not counted.

Entropy and heat

Heat capacity is measurable, \(C_V = (\partial U/\partial T)_{N,V}\): \(Nk_{\mathrm{B}}\) for an Einstein solid with \(q \gg N\) and \(\tfrac32 Nk_{\mathrm{B}}\) for a monatomic ideal gas, matching experiments on solids at high temperature and dilute monatomic gases. The general procedure is to find \(\Omega\), take its logarithm, differentiate for \(T\), solve for \(U(T)\), and differentiate again for \(C\). For most systems you get stuck at the first step. Running it backward instead, from \(1/T = (\partial S/\partial U)_{N,V}\) at constant volume (no work):

\( \displaystyle dS = \frac{dU}{T} = \frac{Q}{T}, \)\( \displaystyle \Delta S = \int_{T_i}^{T_f}\frac{C_V}{T}\,dT \)

(the first also holds when the volume changes, as long as the process is quasistatic). Historically, \(dS = Q/T\) was the original definition of entropy, due to Rudolf Clausius. As \(T \to 0\), a system settles into its unique lowest-energy state with \(\Omega = 1\) and \(S = 0\) (in practice there may be some residual entropy), and \(C_V \to 0\) so that the integral converges: the third law of thermodynamics. The constant \(C_V\) of the classical limit must fail at low temperature as degrees of freedom freeze out, as the Einstein solid’s heat capacity above shows.

Heating water

–

Heat flowing between two objects

\(\Delta S_A = -Q/T_A\)
–
\(\Delta S_B = +Q/T_B\)
–
\(\Delta S_{\text{total}}\)
–

Erasing information costs entropy

Problem 3.16. A bit of memory has two states. Erasing a gigabyte (about \(8 \times 10^9\) bits) maps \(2^{8\times10^9}\) possible states onto one, so the computer’s entropy decreases by about \(8\times10^9 k_{\mathrm{B}}\ln 2\), and at least that much entropy must be dumped into the environment, carried by heat \(Q = T\Delta S\): Landauer’s principle, verified experimentally in 2012.

Entropy, \(N_{\text{bits}}k_{\mathrm{B}}\ln 2\)
–
Minimum heat, \(T\Delta S\)
–
In electron volts
–
Per bit
–

Tiny by everyday standards, though large in electron volts. The lecture’s \(2.3 \times 10^{-11}\) J uses \(8 \times 10^9\) bits; a gigabyte of \(2^{30}\) bytes gives \(2.5 \times 10^{-11}\) J.

Paramagnetism and negative temperature

A more complicated example, where equipartition doesn’t apply at all: a two-state paramagnet of \(N\) noninteracting spin-½ particles in a magnetic field \(B\) along \(+z\). Each dipole is up, with energy \(-\mu B\), or down, with \(+\mu B\), so

\( \displaystyle U = \mu B(N_\downarrow - N_\uparrow) = \mu B(N - 2N_\uparrow), \)\( \displaystyle M = \mu(N_\uparrow - N_\downarrow) = -\frac{U}{B}, \)\( \displaystyle \Omega(N_\uparrow) = \binom{N}{N_\uparrow} \)

just like coins. Below, \(N = 100\), worked out numerically as in the lecture’s table: \(T = \Delta U/\Delta S\) and \(C = \Delta U/\Delta T\) by centered differences.

\(U/\mu B\)
–
\(M/N\mu\)
–
\(\Omega\)
–
\(S/k_{\mathrm{B}}\)
–
\(k_{\mathrm{B}}T/\mu B\)
–
\(C/Nk_{\mathrm{B}}\)
–

At the minimum energy, all dipoles up, the \(S\)-versus-\(U\) graph is very steep: a low temperature, with a strong tendency to absorb energy. The entropy peaks at \(U = 0\) (\(N_\uparrow = N_\downarrow\)), where the system couldn’t care less whether its energy increases a bit, so \(T = \infty\). Beyond that, adding energy lowers the entropy, so the slope and the temperature are negative. A system at \(T < 0\) will spontaneously give energy to any object whose entropy-energy graph has a positive slope: negative temperatures are hotter than all positive ones. This can only happen when the total energy is bounded, unlike an Einstein solid; nuclear paramagnets in certain crystals, where the nuclear spins hardly exchange energy with the lattice vibrations, have been prepared at negative temperatures experimentally. Temperature is less fundamental than entropy: it characterizes a system’s willingness to give up energy.

The analytic solution

For large \(N\), Stirling’s approximation gives \(S/k_{\mathrm{B}} = N\ln N - N_\uparrow\ln N_\uparrow - (N - N_\uparrow)\ln(N - N_\uparrow)\), and with \(\partial N_\uparrow/\partial U = -1/2\mu B\) (Problem 3.19),

\( \displaystyle \frac1T = \frac{k_{\mathrm{B}}}{2\mu B}\ln\frac{N - U/\mu B}{N + U/\mu B}, \)\( \displaystyle U = -N\mu B\tanh\frac{\mu B}{k_{\mathrm{B}}T}, \)\( \displaystyle C_B = Nk_{\mathrm{B}}\frac{(\mu B/k_{\mathrm{B}}T)^2}{\cosh^2(\mu B/k_{\mathrm{B}}T)} \)

so \(T\) and \(U\) always have opposite signs, and \(M = N\mu\tanh(\mu B/k_{\mathrm{B}}T)\). With \(x = \mu B/k_{\mathrm{B}}T\), the entropy is \(S = Nk_{\mathrm{B}}[\ln(2\cosh x) - x\tanh x]\) (Problem 3.23), from \(Nk_{\mathrm{B}}\ln 2 \approx 0.693\,Nk_{\mathrm{B}}\) at \(T \to \infty\) down to 0 as \(T \to 0\). The heat capacity vanishes at both ends: only a finite amount of energy is needed to reach a very high temperature. The marker shows the state chosen above.

\(k_{\mathrm{B}}T/\mu B\) versus \(U/N\mu B\): positive below zero energy, negative above.

\(M/N\mu\) versus \(k_{\mathrm{B}}T/\mu B\): saturated at \(T = 0^+\), randomized at \(T \to \pm\infty\), and the mirror image at \(T < 0\).

\(C_B/Nk_{\mathrm{B}}\) (solid) and \(-U/N\mu B\) (dashed) versus \(k_{\mathrm{B}}T/\mu B\).

\(S/Nk_{\mathrm{B}}\) versus \(x = \mu B/k_{\mathrm{B}}T\): maximum \(\ln 2\) at \(T \to \infty\).

Curie’s law

For electrons, \(\mu\) is the Bohr magneton, \(\mu_B = eh/4\pi m_e = 5.788 \times 10^{-5}\) eV/T. Even in a strong 1 T field, \(\mu B \approx 5.8 \times 10^{-5}\) eV is far below \(k_{\mathrm{B}}T \approx 1/40\) eV at room temperature. With \(\tanh x \approx x\) for small \(x\), \(M \approx N\mu^2B/k_{\mathrm{B}}T\), proportional to \(1/T\): Curie’s law, named for Pierre Curie, which holds at high temperature. Atomic nuclei have magnetic moments about 2000 times smaller, so lining up a nuclear paramagnet takes millikelvin temperatures.

\(\tanh(\mu B/k_{\mathrm{B}}T)\) Curie’s law, \(\mu B/k_{\mathrm{B}}T\)
Dipoles
\(\mu B/k_{\mathrm{B}}T\)
–
\(M/N\mu\), exact
–
Curie’s law
–