# Boltzmann's entropy formula **Boltzmann's entropy formula** is the relation `S = k_B·ln(W)` between the [[Entropy|entropy]] S of a macroscopic state and the number W of microscopic configurations — [[Microstate_(statistical_mechanics)|microstates]] — that are consistent with it. Here k_B is the [[Boltzmann_constant|Boltzmann constant]], about 1.381×10⁻²³ J/K.[^up1-const] The formula is the bridge between [[Thermodynamics|thermodynamics]], where entropy is measured by dividing heat by [[Temperature|temperature]], and [[Statistical_mechanics|statistical mechanics]], where it is *counted*. It says that the reason heat flows one way is arithmetic: the states we call disordered vastly outnumber the ones we call ordered. In the microsim below the reader counts. N particles occupy a box divided into two halves, and the number of ways of putting n of them on the left is the binomial coefficient `W = N!/(n!·(N − n)!)`. Two controls: N, on a logarithmic axis from 10 to 10⁶, and the split x = n/N, dragged across the box. The exact count is drawn as bars, and over it lies the smooth Stirling curve `S/(N·k_B) = −[x·ln(x) + (1 − x)·ln(1 − x)]`, which the bars converge onto as N grows. The payoff is in the width. The distribution peaks at x = ½ with a fractional standard deviation of `1/(2·sqrt(N))` (derived), so at N = 100 the peak is broad and lopsided splits are common, while at N = 10⁶ it is a spike — and at the 10²³ particles of a real gas the spike is narrower than any instrument could resolve. That is why a gas never un-mixes: not because it is forbidden, but because the configurations in which it stays mixed outnumber the others beyond counting. On the [[Physics]] flagship this article serves Part I — History, the *Boltzmann's entropy* section (row P11). It is the point where the spine turns from macroscopic laws to the microscopic bookkeeping underneath them, and where the [[Second_law_of_thermodynamics|second law]] stops being an axiom and becomes a statement about very large numbers. ## History Entropy entered physics as a macroscopic quantity. Rudolf Clausius defined it in the 1860s through the heat exchanged in a reversible process divided by the temperature at which it was exchanged, and stated the [[Second_law_of_thermodynamics|second law]] as the claim that this quantity never decreases in an isolated system. The definition worked, and it explained nothing: it gave no account of *why* the quantity had a preferred direction while every underlying mechanical law was reversible in time. [[Ludwig_Boltzmann|Ludwig Boltzmann]] approached the problem first through dynamics. His 1872 transport equation tracked the distribution of molecular velocities in a dilute gas and yielded the H-theorem: a particular functional of that distribution can only decrease, reaching its minimum at the [[Maxwell–Boltzmann_distribution|Maxwell–Boltzmann distribution]], so the gas relaxes to equilibrium and never spontaneously leaves it.[^boltzmann1872] The derivation assumed that colliding molecules are uncorrelated before they meet — an assumption that quietly does all the work, and the reason the theorem was attacked rather than accepted. The attack came from Josef Loschmidt in 1876: reverse every velocity and the reversed motion is also a solution, so no purely mechanical argument can give one direction a preference. Boltzmann's reply, in the papers culminating in 1877, abandoned dynamics for counting. The entropy of a macroscopic state measures the number of microscopic arrangements compatible with it, and a system moves toward higher entropy simply because there are more such states to move into; the second law is overwhelmingly probable rather than certain.[^boltzmann1877] That was not what his critics wanted, and the controversy continued through Ernst Zermelo's recurrence objection of 1896 — a bounded mechanical system must eventually return arbitrarily close to any earlier configuration. Boltzmann's reply was to compute how long, and the answer was a number beyond cosmological. The compact form `S = k·ln(W)` with an explicit constant is not Boltzmann's own. Max Planck wrote it that way in 1900–01 while deriving the [[Black-body_radiation|black-body]] spectrum, introducing both k and, in the same paper, the quantum of action; the constant now carries Boltzmann's name and Planck's value.[^planck1901] Josiah Willard Gibbs then generalised the whole framework into the ensemble formulation that statistical mechanics still uses, published in 1902.[^gibbs1902] ## Introduction of the natural logarithm The logarithm is not decoration. It is forced by a single requirement: entropy must be additive when systems are combined, while configuration counts are multiplicative. Two independent systems with W₁ and W₂ microstates have W₁·W₂ between them, and the only continuous function turning products into sums is the logarithm.[^likharev-sm2] The constant k_B is then just the conversion from the dimensionless count to the joules per kelvin that thermodynamics had already fixed, so that the statistical and thermodynamic entropies agree numerically rather than merely in behaviour. The microsim exists to make the counting concrete. Each of N particles independently sits in the left or right half, so there are 2^N arrangements in total, and `W = N!/(n!·(N − n)!)` of them have exactly n on the left.[^comphys-count] Four particles make the structure visible by hand: of the 16 arrangements, six have two on each side, four have three-and-one each way, and exactly one has all four on the left. Factorials of a million are not computable that way, so the sim works with log-gamma throughout and the bars are ln W rather than W. Applying Stirling's approximation, ln N! ≈ N·ln N − N, collapses the expression into entropy per particle: `S/(N·k_B) = −[x·ln(x) + (1 − x)·ln(1 − x)]`, the smooth curve the bars approach. Two numbers make the point. At the even split the curve gives ln 2 = 0.693 per particle, so a [[Mole_(unit)|mole]] of gas allowed to spread into twice its volume gains `S = R·ln 2` = 5.76 J/K (derived) — exactly the classical result for a free expansion, obtained here by counting rather than by integrating heat. And the probability that all N particles are found in one half is 2^−N: for N = 100 that is 7.9×10⁻³¹ (derived), already hopeless, and for a mole it is a number with more than 10²³ zeros after the decimal point. The width behaves the same way. Because the standard deviation of n about N/2 is √N/2, the fractional width of the peak is `1/(2·sqrt(N))` (derived) — 5 % at N = 100, 0.05 % at N = 10⁶, and 5×10⁻¹² at N = 10²³. Dragging the N slider is the whole argument: nothing in the physics changes, and the second law appears out of the arithmetic. ## Generalization `S = k_B·ln(W)` assumes every accessible microstate is equally likely — true for an isolated system at fixed energy, false almost everywhere else. A system in contact with a heat bath visits states of different energy with different probabilities, and the formula gives way to the Gibbs expression `S = −k_B·Σ p_i·ln(p_i)`, summed over all microstates i.[^likharev-sm2] When the p_i are equal, at 1/W for each of W states, the sum collapses back to k_B·ln W, so Boltzmann's formula is the uniform special case rather than a separate law. The generalisation is what makes the subject computable. With the Gibbs form and the [[Boltzmann_distribution|Boltzmann distribution]] p_i ∝ exp(−E_i/k_B·T), every thermodynamic quantity follows from one sum over states, the [[Partition_function_(statistical_mechanics)|partition function]], and the [[Canonical_ensemble|canonical ensemble]] replaces the awkward business of holding energy exactly fixed.[^likharev-sm2] The cost is that the sum has as many terms as the system has microstates, growing as 2^N for N binary degrees of freedom.[^comphys-count] For a lattice of just 1,000 spins that is about 10³⁰⁰ terms, which at 10¹⁸ floating-point operations per second would take of order 10²⁷⁴ years.[^likharev-brute] Every practical method in statistical mechanics — [[Monte_Carlo_method|Monte Carlo]] sampling, mean-field approximation, transfer matrices — exists to avoid that sum. Counting also forces a question classical mechanics cannot answer: what, exactly, is one microstate? A continuous [[Phase_space|phase space]] has infinitely many, so W is meaningless until the space is divided into cells, and the cell size shifts ln W by an additive constant. Quantum mechanics supplies both the cell — of order Planck's constant per degree of freedom — and the indistinguishability of identical particles, without which the entropy of an [[Ideal_gas_law|ideal gas]] fails to be extensive.[^likharev-sm3] The [[Third_law_of_thermodynamics|third law]] follows from the same picture: as the temperature goes to zero the system settles into its ground state, W goes to one, and S goes to zero. The same expression reappears outside physics. Claude Shannon's measure of information in a [[Probability_distribution|probability distribution]] is `H = −Σ p_i·log(p_i)`, identical to Gibbs's up to the choice of base and the constant in front, and derived from the same additivity requirement.[^shannon1948] John von Neumann extended it to [[Quantum_mechanics|quantum]] states by replacing the probability list with a density operator.[^vonneumann1932] The convergence is not a coincidence: entropy in every version counts how much is *not* specified by the macroscopic description, whether the missing detail is the position of a molecule or the value of a bit. ## Boltzmann entropy excludes statistical dependencies The counting in the microsim rests on an assumption easy to miss: each particle chooses its half independently of every other. That is what makes the total 2^N and the count of n-on-the-left a plain binomial coefficient. Real particles interact, and when they do the assumption fails. The failure has a precise form. If the full N-particle distribution is replaced by the product of its single-particle marginals — which is what "Boltzmann entropy" means in this context — the resulting entropy is a sum of one-particle entropies and ignores every correlation between particles.[^likharev-sm2] Because entropy is subadditive, this always *overestimates* the true Gibbs entropy of the joint distribution, and the gap is exactly the mutual information shared among the particles. Independence is the case of zero correlation, where the two agree. The physical consequences are large wherever interactions matter. In a gas near its critical point, in a magnet near its [[Phase_transition|transition temperature]], or in the [[Ising_model|Ising model]] at criticality, particles are correlated over distances far larger than their spacing, and a one-particle account of the entropy is badly wrong. Mean-field theory, which makes exactly this independence assumption, is the clearest case: for the Ising model it predicts a critical temperature of 4 J in two dimensions against the exact Onsager value of 2.269 J, and 6 J in three dimensions against 4.513 J — overestimates of about 76 % and 33 %.[^likharev-mft] The error shrinks as the number of neighbours grows, because averaging over more of them makes independence less wrong, and vanishes only in infinite dimension. In dilute gases far from any transition the correlations are weak and Boltzmann's counting is excellent, which is why it worked so well on the problems he applied it to. This also sharpens what the sim does and does not show. It is an exact treatment of a system of genuinely independent units, and the second law emerges from it cleanly. It is not a model of a real interacting gas, and the shortfall is not in the formula `S = k_B·ln(W)` but in the counting of W: for interacting particles the accessible configurations are not all equally likely, and W must be replaced by the full ensemble sum before the answer means anything (ILLUSTRATIVE — the two-halves box is an independent-particle idealisation, and the caption says so). ## See also - [[Microstate_(statistical_mechanics)]] - [[Entropy_of_mixing]] - [[Entropy]] - [[Ludwig_Boltzmann]] - [[Statistical_mechanics]] - [[Second_law_of_thermodynamics]] - [[Entropy_(information_theory)]] - [[Partition_function_(statistical_mechanics)]] ## References [^likharev-sm2]: Likharev, Konstantin (2013). *Essential Graduate Physics, Part SM: Statistical Mechanics*. Chapter 2, pp. 29–72 (page to pin) — the statistical definition of entropy, the additivity argument that forces the logarithm, the Gibbs form `S = −k_B·Σ p_i·ln p_i` and its reduction to k_B·ln W for equal probabilities, the canonical ensemble and the partition function, and the relation between one-particle and full-ensemble entropies. Portal Book 075, https://open.umn.edu/opentextbooks/textbooks/part-sm-statistical-mechanics. Sub-manual 04 §A notes that the extraction of this book lost minus and equals signs in several displayed equations of Chapter 1 and that standard forms were supplied; the Chapter 2 forms quoted here should be verified against the PDF pages. [^likharev-brute]: Likharev (2013), *Essential Graduate Physics, Part SM*, pp. 134–135, for the cost of the direct sum over states: a system of 1,000 spins has of order 10³⁰⁰ terms in its partition function, which at 10¹⁸ floating-point operations per second would take of order 10²⁷⁴ years. Portal Book 075; recorded in sub-manual 04 §B.1 ("Brute-force cost"). [^comphys-count]: Anagnostopoulos, Konstantinos (2016). *Computational Physics: A Practical Introduction to Computational Physics and Scientific Computing (using C++)*, 2nd ed. Pp. 523–524, for the count of 2^N terms in the partition function of an N-site binary system, with the worked case of a 5×5 lattice at 2²⁵ ≈ 3.4×10⁶ configurations (p. 524). Portal Book 061, https://open.umn.edu/opentextbooks/textbooks/computational-physics-a-practical-introduction-to-computational-physics-and-scientific-computing-using-c. The binomial count `W = N!/(n!·(N − n)!)`, the Stirling form of the entropy per particle, the value ln 2 = 0.693, the mole figure R·ln 2 = 5.76 J/K, the probability 2⁻¹⁰⁰ = 7.9×10⁻³¹ and the fractional peak width 1/(2√N) with its values at N = 100, 10⁶ and 10²³ are all derived here and printed in no book. [^up1-const]: Sanny, Jeff; Ling, Samuel, et al. (2016). *University Physics Volume 1*. OpenStax, CC BY. Appendix C, "Fundamental Constants", pp. 883–884 (page to pin), for the Boltzmann constant and the gas constant R used in the worked mole figure. Portal Book 077, https://open.umn.edu/opentextbooks/textbooks/university-physics-volume-1. Sub-manual 04 records that the OpenStax extractions lost the printed values of k_B, N_A and R in the kinetic-theory chapter of Volume 2, so the appendix values should be checked against the PDF page. [^likharev-sm3]: Likharev (2013), *Essential Graduate Physics, Part SM*, Chapter 3, "Ideal and quantum gases", pp. 73–106 (page to pin), for the phase-space cell, the indistinguishability of identical particles, the extensivity of the ideal-gas entropy and the Gibbs mixing paradox. Portal Book 075. Sub-manual 04 records this chapter as known-relevant but not yet read, so the page should be pinned on a later pass. [^likharev-mft]: Likharev (2013), *Essential Graduate Physics, Part SM*, p. 137, for the table of Ising critical temperatures by dimension — mean field against exact: 2 J against 0 at d = 1, 4 J against 2.269 J at d = 2, and 6 J against 4.513 J at d = 3 — and p. 134 for the remark that a 1,000-spin lattice already smears the transition by about 3 %. Portal Book 075; recorded in sub-manual 04 §B.1 ("Tc by dimension") and §A.2, which notes that the extract's own summary of the mean-field error disagrees with its table and that the percentages should be computed from the table, as they are here (76 % and 33 %, derived). [^boltzmann1872]: Boltzmann, Ludwig (1872). "Weitere Studien über das Wärmegleichgewicht unter Gasmolekülen." *Sitzungsberichte der Kaiserlichen Akademie der Wissenschaften in Wien* (volume and page range to pin). The transport equation and the H-theorem, including the assumption of uncorrelated pre-collision velocities on which the theorem rests. [^boltzmann1877]: Boltzmann, Ludwig (1877). "Über die Beziehung zwischen dem zweiten Hauptsatze der mechanischen Wärmetheorie und der Wahrscheinlichkeitsrechnung respektive den Sätzen über das Wärmegleichgewicht." *Sitzungsberichte der Kaiserlichen Akademie der Wissenschaften in Wien*, mathematisch-naturwissenschaftliche Classe (volume and page range to pin). The paper identifying entropy with a count of microscopic arrangements, written in answer to Josef Loschmidt's reversibility objection of 1876; Ernst Zermelo's recurrence objection followed in 1896. [^planck1901]: Planck, Max (1901). "Ueber das Gesetz der Energieverteilung im Normalspectrum." *Annalen der Physik* 309: 553–563. The paper in which the entropy relation is written with an explicit constant k and the quantum of action is introduced alongside it. [^gibbs1902]: Gibbs, Josiah Willard (1902). *Elementary Principles in Statistical Mechanics, Developed with Especial Reference to the Rational Foundation of Thermodynamics*. New York: Charles Scribner's Sons. [^shannon1948]: Shannon, Claude E. (1948). "A Mathematical Theory of Communication." *Bell System Technical Journal* 27 (3): 379–423, and 27 (4): 623–656. [^vonneumann1932]: von Neumann, John (1932). *Mathematische Grundlagen der Quantenmechanik*. Berlin: Julius Springer. The source of the density-operator entropy that generalises the Gibbs expression to quantum states. ## External links - [*Essential Graduate Physics, Part SM: Statistical Mechanics*](https://open.umn.edu/opentextbooks/textbooks/part-sm-statistical-mechanics), Konstantin Likharev — Chapter 2 is the statistical-entropy chapter this page follows (Portal Book 075) - [*Computational Physics*](https://open.umn.edu/opentextbooks/textbooks/computational-physics-a-practical-introduction-to-computational-physics-and-scientific-computing-using-c), Konstantinos Anagnostopoulos — the configuration-counting and Monte Carlo chapters behind the sim's arithmetic (Portal Book 061) - Archival scans of Boltzmann's and Planck's papers are listed in the Wikipedia pair's *External links*; none is reproduced here until its URL has been checked. <!-- MATTERSIM:BEGIN g33 — Matter & Energy Cluster microsim (framework build, specs/sims/Boltzmann's_entropy_formula.json); do not hand-edit inside --> **Microsim — three.js (Wikitube framework):** *Boltzmann's entropy formula* <div class="wt-sim" data-src="https://wikitube-3d-microsims.netlify.app/matter/Boltzmann's_entropy_formula.html" data-title="Boltzmann's entropy formula"></div> *Built from `MICROSIM_GUIDE/specs/sims/Boltzmann's_entropy_formula.json`; part of the [[PORTAL_Matter|Matter portal]] spine (section sims and See-also variants).* <!-- MATTERSIM:END --> ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Boltzmann's_entropy_formula) : [Wikitube](https://en.wikitube.io/wiki/Boltzmann's_entropy_formula) · pinned revision [1352008199](https://en.wikipedia.org/w/index.php?oldid=1352008199) · 2026-09-11 ## Previous hub tags Hubs: `Life_Physics`. Portals: [[PORTAL_Physics]]. --- *Matter & Energy Cluster child articles, wave 1 · 2026-09-11 · drafted · Physics row P11 · sim pending (matter/Boltzmann's_entropy_formula).*