Research note 06 · Statistical mechanics

What is statistical thermodynamics?

Statistical thermodynamics explains the large-scale behavior of matter by counting the small-scale states it can be in. Temperature, entropy, and pressure are not fundamental forces. They are summaries of how an enormous number of microscopic configurations distribute themselves, and the same counting argument drives the Boltzmann sequencer.

Open the gas-speed lab The Boltzmann distribution in music
\\\ SYSTEM ~$ IDEAL GAS ENSEMBLE --simulate

Statistical thermodynamics derives the visible properties of matter, temperature, pressure, and entropy, from the statistics of its invisible parts. You do not track every molecule. You count how many microscopic arrangements correspond to each large-scale outcome, and the most likely outcome is what you measure.

The central idea

Large-scale law from small-scale counting.

Classical thermodynamics describes heat, work, and entropy with macroscopic laws that say nothing about atoms. Statistical thermodynamics supplies the missing layer: it explains where those laws come from by treating a system as an enormous collection of particles, each free to occupy many states, and asking which large-scale configurations are overwhelmingly the most probable.

The power of the approach is that it does not require solving the motion of every particle. A liter of gas holds on the order of \(10^{22}\) molecules. No one integrates that. Instead you describe the system by a probability distribution over its possible states and let the law of large numbers do the rest. The averages it produces are so sharply peaked that they read as deterministic laws.

Microstates and macrostates

Many configurations, one appearance.

A microstate is a complete specification of the system: every particle's position and velocity. A macrostate is what you can actually observe: the temperature, the pressure, the total energy. The bridge between them is counting. A single macrostate usually corresponds to a staggering number of microstates, and the macrostate you observe is simply the one that the most microstates produce.

This is the content of Boltzmann's most famous result. The entropy of a macrostate is the logarithm of the number of microstates W that realize it:

\[ S = k \ln W \]
\(S\)
Entropy, the thermodynamic measure of disorder.
\(W\)
The number of microstates consistent with the macrostate.
\(k\)
Boltzmann's constant, the conversion from counting to energy units.

The equation reframes entropy as a count. A gas spreads to fill its container not because of a force but because the spread-out macrostate has vastly more microstates than the clustered one. Disorder wins because there are simply more ways to be disordered. Boltzmann's energy sequencer uses the related Gibbs/Shannon entropy over pitch probabilities: fewer probable pitch states means lower entropy and higher Order.

Temperature

Temperature is how the system spends energy.

Temperature is not heat and it is not energy. It is the parameter that sets how readily a system trades entropy for energy. Formally it is defined by how entropy changes when you add energy, \(1/T = \partial S / \partial E\), but the intuition is simpler: at low temperature a system hoards its energy in the lowest states, and at high temperature it spreads energy freely across many states.

That single parameter is exactly what governs the Boltzmann distribution. The probability of a state with energy \(E_i\) is

\[ P(E_i) = \frac{e^{-E_i/kT}}{Z} \]

Cold concentrates probability on the ground state. Hot flattens it toward equal occupancy. Every result in this article, from the spread of gas speeds to the order of a musical phrase, is a consequence of this one exponential and the temperature inside it.

Interactive lab

Heat the gas. Watch the speeds spread.

Maxwell-Boltzmann speed distribution Temperature broadens the spread and shifts the peak
Most probable speed
1.41

The curve is the distribution of molecular speeds in an ideal gas. Few molecules are nearly still, few are very fast, and most sit near a peak whose location is the most probable speed, \(v_{mp} = \sqrt{2kT/m}\) (dashed line). Raise Temperature and the whole curve broadens and shifts right: the peak drops, the spread widens, and fast molecules become common. The area under the curve stays fixed, because the molecules have to be moving at some speed. It is the same trade Boltzmann makes in pitch space, where heating the distribution lowers the tallest bar and fills in the rest.

The bookkeeper

The partition function holds the whole system.

The denominator in the Boltzmann distribution has a name and a job far larger than normalization. The partition function sums the Boltzmann factor over every state:

\[ Z = \sum_i e^{-E_i/kT} \]

Z is the central object of statistical thermodynamics. Once you have it, the macroscopic quantities follow by differentiation: the average energy, the entropy, the pressure, and the free energy \(F = -kT \ln Z\) all fall out of this one sum. It earns its name because it describes how the system partitions its probability among the available states. A large Z means many states are within easy reach, which is another way of saying the system is hot and disordered.

The same sum appears in the music. When Boltzmann normalizes its pitch distribution, it is computing a partition function over the twelve energies of the scale. Raising Temperature raises Z, more pitches come into reach, and Order falls. The bookkeeping is identical; only the meaning of energy has changed.

The audio mapping

From a gas to a generator.

None of this is metaphor in Boltzmann. The plugin runs a literal Boltzmann distribution over a set of musical energies, samples it to choose notes, and reports the entropy and order of the result in the same units a physicist would use. Temperature is the control parameter in both worlds, and it does the same thing: it sets how strictly the system favors low-energy states.

What changes is the energy axis. In a gas, energy is kinetic and the distribution is over speeds. In music, energy is dissonance and the distribution is over pitches. The shape of the law, exponential in energy and tuned by temperature, is preserved exactly, which is why the statistical-thermodynamics intuition transfers cleanly to sound. Heating the system spreads its choices; cooling it collapses them onto the ground state.

This is the studio's working thesis: when the structure of a physical law maps onto the structure of a process, the law becomes an instrument with native, discoverable behavior. Read how the distribution turns into notes in the Boltzmann distribution explainer.

One law, two readings: the exponential \(e^{-E/kT}\) describes gas speeds, chemical reaction rates, and the pitches of a sequencer. Temperature is the dial that sets how sharply each one favors its low-energy states.

References

Source material.

  • Boltzmann, L. (1877). "Uber die Beziehung zwischen dem zweiten Hauptsatze der mechanischen Warmetheorie und der Wahrscheinlichkeitsrechnung." Wiener Berichte 76, 373-435.
  • Maxwell, J. C. (1860). "Illustrations of the dynamical theory of gases." Philosophical Magazine 19, 19-32.
  • Gibbs, J. W. (1902). Elementary Principles in Statistical Mechanics. Yale University Press.
  • Schroeder, D. V. (2000). An Introduction to Thermal Physics. Addison Wesley.
  • Reif, F. (1965). Fundamentals of Statistical and Thermal Physics. McGraw-Hill.