Gibbs Entropy
When a message arrives and resolves your uncertainty, exactly how much did you learn? Claude Shannon answered that in 1948 with a formula — — and was startled to find it was already famous: Josiah Willard Gibbs had written the same expression half a century earlier as the entropy of a statistical ensemble. The Gibbs entropy is the master definition of entropy in statistical mechanics, and its coincidence with Shannon's information measure is no accident: both count the same thing — the number of microscopic possibilities left open by what you know. The Gibbs entropy generalizes Boltzmann's to any probability distribution over microstates, not just the uniform one. Where Boltzmann counts equally weighted microstates on an energy shell, Gibbs weighs each microstate by its probability and forms the functional . When the distribution happens to be uniform — the microcanonical case — the two collapse to the identical number. But Gibbs's form keeps working when microstates are not equally likely: in a heat bath the canonical weights are wildly unequal, and only the Gibbs functional gives the right entropy. This one expression is the pivot of the whole subject. Maximize it subject to a fixed mean energy and the Boltzmann distribution falls out — thermodynamics from a variational principle. Evaluate it on the equilibrium distribution and you recover the free energy . Its non-negativity and its concavity encode the second law and thermodynamic stability. And because it is bounded above by — achieved only when every accessible microstate is equally likely — it tells you that ignorance, quantified honestly, is maximized by the uniform distribution. Entropy, in Gibbs's hands, becomes the least-biased accounting of what a probability distribution does not pin down.
- The Gibbs entropy of a distribution over microstates is — the ensemble generalization of the Boltzmann entropy.
- It reduces exactly to on the uniform (microcanonical) distribution , so Boltzmann entropy is its special case.
- Maximizing it at fixed mean energy yields the canonical (Boltzmann) distribution — thermodynamics as a variational principle.
- It is bounded: , the maximum reached only for the uniform distribution over accessible microstates.
- The same functional is Shannon's information entropy; the Gibbs inequality (KL divergence ) underpins both the variational principle and the second law.
- Key idea: the Gibbs entropy measures the uncertainty in a distribution over microstates; maximizing it under constraints generates the equilibrium ensembles and all their thermodynamics.
The Gibbs entropy is the entropy of a probability distribution over microstates — the least-biased measure of how much that distribution leaves undetermined. It equals the Boltzmann entropy when the distribution is uniform, and maximizing it under the constraints that define an ensemble produces the equilibrium distributions and their thermodynamics.
Where this lives today
The Gibbs functional is the beating heart of the maximum-entropy method, which now reaches far beyond physics. Jaynes recast statistical mechanics in 1957 as inference: the equilibrium ensembles are simply the distributions that maximize subject to whatever macroscopic averages you know, and the same recipe now builds models in machine learning (maximum-entropy classifiers), ecology, natural-language processing, and neuroscience. Every time a "MaxEnt" model is fit to data, it is Gibbs's entropy being maximized under constraints. The deepest modern current is the identity of thermodynamic and information entropy. Landauer's principle — erasing a bit costs at least of dissipated heat — is the Gibbs/Shannon coincidence made physical, and it sets fundamental limits on the energy cost of computation now approached by real chips. In quantum information the same functional becomes the von Neumann entropy , the currency of entanglement and quantum thermodynamics. Gibbs wrote down a formula for gases; it turned out to be a universal statement about uncertainty.
The physical picture
Picture the accessible microstates as boxes and the probability as how much of your belief sits in each. If all your belief piles into one box (, the rest zero), you are certain, and the Gibbs entropy is zero — you have no uncertainty to measure. Spread your belief evenly across boxes and uncertainty is maximal: , the same as Boltzmann's count. Any lopsided distribution sits between these extremes. Entropy is literally the width of your ignorance, weighted honestly by how likely each possibility is. The figure below plots the Gibbs entropy of a two-outcome distribution as one probability slides from 0 to 1. It is zero at both ends (certainty) and peaks in the dead centre (maximum ignorance), a concave hill — the shape that makes entropy maximization have a unique answer.
Now the punchline that makes the Gibbs form indispensable. In a heat bath the microstates are not equally likely — high-energy states are exponentially rare, weighted by . The next figure shows those unequal Boltzmann weights, and the point is that only a distribution-aware entropy (), not a flat count of states, can assign the right value here. The Gibbs entropy of this exponential distribution, maximized at fixed mean energy, is precisely what selects it.
The two entropies — Boltzmann's flat count and Gibbs's weighted sum — agree exactly when the weights happen to be equal, and only Gibbs's survives when they are not. That is the sense in which Gibbs is the master definition and Boltzmann the important special case.
The core equations
The defining functional assigns an entropy to any normalized probability distribution over microstates. It is the same expression whether the microstates come from a spin lattice, a gas, or an abstract information source.
where: — entropy of the ensemble; — Boltzmann constant; — probability of microstate , with . Read each term as the "surprise" of outcome weighted by how often it occurs; entropy is the average surprise. For a classical system the microstates form a continuum, so the sum becomes an integral over phase space, with the same factors that made the Boltzmann count dimensionless and extensive.
where: — phase-space density, normalized ; — the quantum cell and Gibbs factor inside the log, so the argument is dimensionless. The bracketed is exactly the local microstate occupation, tying the continuum form to the discrete count. The single most important property: on the uniform distribution the Gibbs entropy collapses to the Boltzmann entropy. This is the bridge between the two definitions, and it makes the microcanonical ensemble a special case rather than a separate postulate.
where: — number of accessible microstates. The sum has identical terms each equal to , recovering the tombstone formula owned by the Boltzmann-entropy article. Maximizing the functional at fixed mean energy is where thermodynamics enters. The constrained maximum is the canonical distribution — the Boltzmann weights — and this is the variational principle at the root of the canonical ensemble.
where: — the Lagrange multiplier enforcing fixed ; — energy of microstate ; — the partition function. The exponential is not assumed; it is derived by maximizing Eq. (1), as the second derivation shows. Substituting the canonical weights back into the Gibbs functional produces the thermodynamic bridge to the free energy — the equation that turns the partition function into all of equilibrium thermodynamics.
where: — internal energy ; — Helmholtz free energy; — absolute temperature. Rearranged, this is the familiar : the Gibbs entropy is the exact link between the microscopic and macroscopic free energy. Finally, the two bounds that encode the second law and the maximum-ignorance principle. Entropy is non-negative and capped by the log of the number of accessible microstates.
where: — number of microstates with nonzero probability. The lower bound (equality for a certain outcome) and the upper bound (equality for the uniform distribution) both follow from the Gibbs inequality below.
The core equations — the inequality behind it all
The Gibbs (Kullback–Leibler) inequality is the single mathematical fact from which the variational principle, the entropy bounds, and the second law all descend. It states that the relative entropy of any distribution against any reference is non-negative.
where: — any reference distribution with ; — the Kullback–Leibler divergence. Choosing uniform turns this into the upper bound ; choosing to be the equilibrium distribution turns it into the second law for open systems.
This is one half of the article's owned result. We prove that among all probability distributions on a fixed set of accessible microstates — with no constraint beyond normalization — the Gibbs entropy is maximized by the uniform distribution , that the maximum value is exactly , and that the second-order condition confirms it is a genuine maximum. The uniform choice is therefore not an extra postulate: it is the least-biased (maximum-entropy) distribution for an isolated system, and evaluating Gibbs on it reproduces Boltzmann's tombstone formula. The tool is a single Lagrange multiplier.
Step 1. Build the Lagrange functional , with enforcing normalization. Why: normalization is the only information an isolated system supplies, so it is the sole constraint we impose while extremizing.
Step 2. Stationarity gives , so — a constant independent of . Why: the derivative condition is identical for every microstate, forcing the maximizing distribution to be flat.
Step 3. Normalization over states fixes , and substituting into Eq. (1):
Why: the uniform distribution IS the postulate of equal a priori probabilities, here derived not assumed, and evaluating Gibbs on it collapses the sum into the Boltzmann entropy.
Step 4. Confirm it is a maximum: the second variation of has diagonal entries , so the functional is strictly concave and the stationary point is the unique global maximum. Why: strict concavity guarantees the extremum is a maximum, not a saddle, so the uniform distribution genuinely maximizes ignorance. *Verified: stationarity gives constant , normalization fixes , the collapse to , and the concavity are all checked symbolically and numerically in verify_aq-sm-gibbs-entropy.py. Cf. Reif Ch. 3, Sethna Ch. 5.*
Go deeper · Derivation B · 1 minThe canonical distribution from constrained maximization, and additivity over independent systems
This completes the owned result. First we maximize the Gibbs entropy subject to a second constraint — fixed mean energy — and show the maximizer is the Boltzmann distribution , deriving the canonical ensemble from a variational principle rather than postulating it. Then we prove the Gibbs entropy is additive over independent subsystems, — the property that makes it a legitimate thermodynamic entropy and mirrors the multiplicativity of microstate counts.
Step 1. Extremize with two multipliers: for normalization, for the energy constraint. Why: an isolated system fixes only the count, but a system in a heat bath additionally fixes its mean energy — the extra constraint is what produces temperature.
Step 2. Stationarity gives , so ; normalization then supplies and . Why: solving for yields the exponential Boltzmann weight, with emerging as the multiplier conjugate to energy — the canonical ensemble derived, not assumed.
Step 3. Insert these weights into Eq. (1): , so with . Why: this is the thermodynamic bridge — the Gibbs entropy of the canonical distribution is exactly , delivering .
Step 4. For two independent subsystems the joint distribution factorizes, . Then , using and . Why: independence makes the log of a product a sum, so entropy adds — the additivity that qualifies as a thermodynamic entropy and echoes . *Verified: the canonical maximizer , the free-energy identity on a two-level system, and the additivity are all checked numerically in the verify script. Cf. Pathria §3.2–3.3, Kardar Ch. 4.*
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Uniform distribution | Gibbs collapses to the Boltzmann entropy — the microcanonical special case | |
| Certain outcome () | no uncertainty, no entropy; the third-law limit of a unique ground state | |
| Canonical () | the equilibrium entropy in a heat bath, bridging to free energy | |
| Two independent systems | additivity from factorized probabilities, mirroring |
Worked examples
1 · Gibbs entropy of an explicit three-microstate distribution (confidence builder)
A system has three accessible microstates with probabilities . Compute its Gibbs entropy, then compare with the uniform distribution over the same three states to confirm the uniform case is larger.
Step 1. Term by term, : for , ; for , ; for , .
Step 2. Sum them: , so .
Step 3. The uniform distribution over three states gives , which is larger. The difference is exactly the KL divergence: , confirming Eq. (7).
Step 4. The lesson: any departure from uniform lowers the entropy, and by precisely the relative-entropy penalty. Uniform is the maximum-ignorance distribution, and the Gibbs functional measures exactly how far from it you have strayed.
2 · Entropy of a two-level system in a heat bath (exam level)
A single two-level system has ground state at energy and excited state at energy . In a bath at temperature , compute the Gibbs entropy as a function of , and evaluate its high- and low-temperature limits.
Step 1. Canonical weights: , so and . The mean energy is .
Step 2. Use the bridge with : .
Step 3. High temperature : both states equally likely, — maximum entropy for two states. Check directly: at , , and ✓.
Step 4. Low temperature : , , and — the system freezes into its ground state, entropy vanishes (third law). Between the two limits the Gibbs entropy rises from to , tracking exactly how uncertain the occupation is — a Schottky-style curve. As a concrete point, at (): .
Origins · 1 minClaude Shannon and how this was discovered
Shannon founded information theory in his 1948 paper A Mathematical Theory of Communication, where he sought a measure of the uncertainty in a probability distribution and derived from a short list of natural axioms (continuity, monotonicity for uniform distributions, and a grouping/composition rule). The story goes that von Neumann advised him to call it "entropy," partly because Gibbs's identical expression had governed statistical mechanics since 1902 and partly because "no one really knows what entropy is, so in a debate you will always have the advantage." The coincidence is deep, not cosmetic: Gibbs's thermodynamic entropy and Shannon's information entropy are the same functional counting the same thing — the possibilities a distribution leaves open — and the bridge between them (Landauer, Jaynes) is now a research field of its own.
Going further
Texts. Pathria & Beale, Statistical Mechanics, 3rd ed., §3.2–3.3, §6 · Reif, Fundamentals of Statistical and Thermal Physics, Ch. 3 · Kardar, Statistical Physics of Particles, Ch. 4 · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, Ch. 5–6 · Jaynes, Information Theory and Statistical Mechanics, Phys. Rev. 106 (1957).
Provenance. The Gibbs functional and its continuum form are from Gibbs (1902) and Pathria §3.3. A verifier should recompute: the collapse to on the uniform distribution; the Lagrange derivation of the canonical maximizer and the concavity ; additivity ; the three-state worked entropy with ; and the two-level entropy at , at , at large . The reduction to the Boltzmann entropy is owned by that article and recalled here by name. No numbers are fabricated.
Prerequisites. Microstates and Macrostates · Statistical Ensembles · Phase Space Density and the Distribution Function · Fundamental Postulate of Equal A Priori Probabilities. Leads to. Boltzmann Entropy · Equivalence and Distinction of Boltzmann and Gibbs Entropies · Liouville's Theorem · Ergodic Theory and Mixing.
Is the Gibbs entropy more fundamental than the Boltzmann entropy, or the other way around?
The Gibbs entropy is more general: it is defined for any distribution over microstates, while the Boltzmann entropy is the value Gibbs takes on the uniform (microcanonical) distribution. So Boltzmann is a special case of Gibbs. That said, "fundamental" cuts both ways — Boltzmann's is the one that connects most directly to a physical count of states and to the second law's arrow, while Gibbs's is the one that works in a heat bath and underlies the variational principle. The comparison article treats exactly when and why they agree or differ.
If the fine-grained Gibbs entropy never changes, how can there be a second law at all?
The second law lives in the coarse-grained entropy. The exact fine-grained is conserved by the reversible Liouville dynamics — no information is truly lost. But any real observation has finite resolution: average over small phase-space cells and, as mixing shreds into ever-finer filaments, the cell-averaged distribution relaxes to uniform and its entropy climbs to the equilibrium value . Irreversibility is lost information about fine structure, not lost reversibility. This is developed fully in the statistical-irreversibility article.
Why is the canonical distribution a maximum of entropy rather than a minimum?
Because the Gibbs functional is strictly concave: its second derivative with respect to each is . A concave function on the convex set of probability distributions (a simplex, possibly sliced by the energy constraint) has a unique interior stationary point, and concavity guarantees it is the global maximum. So maximizing at fixed has exactly one answer, the Boltzmann distribution, and it is a genuine maximum — equilibrium is the state of maximum entropy consistent with the known mean energy.
Where does temperature come from in the maximization? I only imposed a mean-energy constraint.
Temperature enters as the Lagrange multiplier conjugate to the energy constraint. When you maximize subject to , the multiplier that enforces that constraint is , and it appears in the answer as . Identifying is what defines the thermodynamic temperature of the resulting distribution. So temperature is not put in by hand — it is the "price" of the mean-energy constraint, exactly analogous to how a chemical potential emerges as the multiplier for a particle-number constraint in the grand canonical ensemble.
Does the continuum Gibbs entropy really need the h³ᴺ and N! inside the logarithm?
Yes, for the same reasons as in the Boltzmann count. Without the argument of the log would be dimensionful (since has units of inverse phase-space volume), making the "entropy" depend on your choice of units — physically meaningless. Without the entropy is non-extensive and you resurrect the Gibbs paradox for identical particles. The combination is precisely the dimensionless local microstate occupation, so the continuum and discrete Gibbs entropies agree, and both match the Boltzmann count on the uniform distribution.
How is the Gibbs entropy related to the von Neumann entropy in quantum mechanics?
They are the same idea, one level up. Replace the classical distribution by a density matrix and the Gibbs entropy becomes the von Neumann entropy . When is diagonal (a classical mixture) the two coincide, with the being the eigenvalues of . The quantum version inherits every property discussed here — non-negativity, the bound, concavity, additivity for product states — and adds genuinely quantum features (entanglement entropy, subadditivity), making it the central quantity of quantum information and quantum thermodynamics.