The Maximum Entropy Principle
Statistical mechanics asks you to assign probabilities to microstates when you know almost nothing about them — only a few macroscopic averages like the energy. Which distribution should you pick out of the infinitely many consistent with that data? The maximum entropy principle, articulated by Edwin Thompson Jaynes in 1957 building on Claude Shannon's 1948 information theory, gives a sharp answer: choose the distribution that maximizes the entropy subject to whatever you actually know. This is the least biased choice — it fits your constraints and assumes nothing else, spreading probability as evenly as the data permit. The payoff is that the standard ensembles fall out as theorems rather than postulates. Maximize entropy subject to fixed average energy and you get the canonical distribution ; add a constraint on average particle number and you get the grand canonical distribution ; impose only normalization and you get the uniform microcanonical distribution . The Lagrange multiplier conjugate to the energy constraint is exactly the quantity that later turns out to be . This article derives that machinery, works a concrete three-state example numerically, and states honestly what the principle does and does not prove — it is a rule for reasoning under incomplete information, not a mechanical law that forces nature to maximize anything. The uniqueness of the Shannon form and the dynamical generalization (maximum caliber) are named where they belong and not proved in full here.
- MaxEnt rule: given only some averages, pick the probability distribution that maximizes subject to those constraints — the least-biased distribution consistent with what you know.
- Fixing (plus normalization) and maximizing gives the canonical distribution ; the multiplier conjugate to energy is later identified with .
- Adding gives the grand canonical distribution; using only normalization gives the microcanonical uniform distribution with .
- Shannon's axioms (continuity, monotonicity for equiprobable outcomes, and a grouping/composition rule) single out as the unique measure of uncertainty, up to the constant .
- Any distribution matching the same constraints but not maximizing carries hidden assumptions and has strictly lower entropy.
- Key idea: the equilibrium ensembles are not extra postulates — they are what honest inference from a handful of averages inevitably produces.
Out of all probability distributions consistent with the averages you know, the one that maximizes the Shannon–Gibbs entropy is the unique least-biased choice; carrying out that maximization with Lagrange multipliers reproduces the canonical, grand canonical, and microcanonical ensembles, with the energy multiplier equal to .
Where this lives today
The maximum entropy principle is now a standard inference tool wherever one must build a distribution from limited moments. In physics it underlies the modern axiomatic route to the ensembles and generalizes to the maximum caliber principle, which selects distributions over whole trajectories (not just microstates) and is used in nonequilibrium and single-molecule statistics. Outside physics it powers maximum-entropy image and spectrum reconstruction, maximum-entropy (logistic/exponential-family) models in machine learning and natural-language processing, and species-distribution models in ecology. The deeper questions — the precise sense in which the Shannon form is unique, the role of the constraints, and whether MaxEnt can be founded on pure logic (the Cox–Jaynes program) — are active topics in the foundations of probability, and the dynamical extension to entropy production is treated in the nonequilibrium articles rather than here.
The physical picture
Imagine you must bet on which face of a many-sided die comes up, but all you are told is the long-run average of the numbers painted on the faces. Infinitely many probability assignments reproduce that one average. Assigning all the probability to a single face reproduces it too if you choose the face cleverly — but that is an outrageous claim of certainty you have no right to make. The honest assignment hugs the constraint while otherwise staying as flat and noncommittal as possible. "As flat as possible" needs a number to maximize, and that number is the entropy: it is largest for the uniform distribution and shrinks as probability piles up. Maximizing it under the constraint is the mathematical expression of "assume nothing you were not told." The same logic runs statistical mechanics. A macroscopic gas has an astronomical number of microstates; experiment pins down only a few averages — most importantly the mean energy. The microcanonical, canonical, and grand canonical ensembles are three different states of knowledge (energy fixed exactly; mean energy fixed; mean energy and mean number fixed), and each is the maximum-entropy distribution for its constraints. What looks in older treatments like a separate physical postulate for each ensemble becomes one principle applied three times.
The concavity in the figure is the whole engine: because is strictly concave on the space of distributions and the constraints are linear, the maximization has a unique solution, and it is found by the standard Lagrange-multiplier condition. The second figure shows what that solution looks like once a single average-energy constraint is switched on: the flat "know-nothing" distribution tilts into a decaying exponential in energy — the Boltzmann distribution — with the steepness set by the multiplier .
The core equations
The information entropy of a discrete probability distribution is the central object; everything else follows from maximizing it.
where: is the probability of microstate , the sum runs over all accessible microstates, and is a positive constant (Boltzmann's constant in physics, or to measure information in bits). , vanishes when one (certainty), and is maximal for the uniform distribution. This is the Gibbs entropy; its ownership and general properties live in the sibling article on the Gibbs entropy. To find the least-biased distribution we maximize (1) subject to constraints, which we enforce with Lagrange multipliers. For the canonical case the constraints are normalization and a fixed mean energy.
where: is the energy of microstate and is the (known) average energy. These are the only pieces of information assumed; the principle refuses to inject anything further. Maximizing (1) under (2) yields the canonical (Boltzmann) distribution, the central result.
where: is the Lagrange multiplier enforcing the energy constraint and is the partition function that enforces normalization. The value of is fixed implicitly by requiring ; thermodynamics later identifies it as . The canonical ensemble and its partition function are owned by their own articles; here they emerge from inference. Feeding (3) back into (1) gives the maximized entropy in closed form, the quantity all lower-entropy distributions fall short of.
where: the two terms are the log-partition function and the multiplier times the constrained average. Equation (4) is the bridge to thermodynamics: with it reads where is the Helmholtz free energy, so free energy is precisely because the ensemble is a maximum-entropy distribution. Adding a second constraint on the mean particle number introduces a second multiplier and produces the grand canonical distribution.
where: is the particle number of microstate , is (proportional to) the multiplier conjugate to — the chemical potential — and is the grand partition function. With no constraint but normalization, both multipliers vanish and (3) collapses to the uniform microcanonical distribution with .
The goal is to prove equation (3): among all normalized distributions with a prescribed mean energy, the one maximizing the entropy (1) is . The strategy is the method of Lagrange multipliers — we build a functional that adds the constraints to the entropy with undetermined coefficients, set every partial derivative to zero, and solve. The one subtlety worth flagging is that we must check the stationary point is a maximum, not a saddle; this is guaranteed because is strictly concave (its second derivative is negative) while the constraints are linear, so any interior stationary point is the unique global maximum.
Step 1. Build the Lagrangian. Working in units of for clarity, maximize subject to and . Introduce multipliers and : .
Step 2. Differentiate with respect to each and set to zero. Since , the condition is , i.e. .
Step 3. Exponentiate: . The factor is independent of ; call its reciprocal . Then .
Step 4. Fix the multipliers by the constraints. Normalization forces , the partition function. The remaining multiplier is set implicitly by ; equivalently . This is one equation for one unknown , and because is monotonically decreasing it has a unique solution for any physical .
Step 5. Confirm it is a maximum and evaluate . The Hessian of is diagonal with entries , so on the linear constraint surface the stationary point is the strict global maximum. Substituting into and using gives , which is equation (4) (restoring ). Verified: the companion script maximizes numerically for a three-state system with a fixed mean and confirms the optimizer equals to machine precision, that reproduces the imposed , and that .
Go deeper · Derivation B · 1 minShannon's axioms single out the entropy functional
The aim here is to explain why the specific combination — and not some other measure of "spread" — is the right thing to maximize. Shannon asked what functional could serve as a unique measure of the uncertainty in a distribution, and showed that three reasonable requirements determine it up to an overall positive constant. We state the axioms and sketch why they force the logarithmic form; a fully rigorous proof is a short exercise in functional equations that we cite rather than reproduce, so the scope of the claim stays honest.
Step 1. State the axioms. (i) Continuity: is a continuous function of the . (ii) Monotonicity: for equally likely outcomes, increases monotonically with — more equally likely alternatives means more uncertainty. (iii) Grouping (composition): if a choice is broken into successive sub-choices, is the weighted sum of the entropies of the stages. Concretely .
Step 2. Reduce to the equiprobable case. Applying the grouping axiom repeatedly to a distribution with rational weights lets you express any in terms of the function . The grouping axiom applied to equally likely outcomes, split into groups of , gives the Cauchy-type functional equation .
Step 3. Solve the functional equation. The only monotonic solution of is for some constant . Continuity extends the result from rational to all distributions, yielding .
Step 4. Interpret the constant. merely sets the units: gives thermodynamic entropy in joules per kelvin, gives Shannon information in bits. No axiom fixes , which is exactly why the same functional serves both physics and communication theory. Verified: the script checks the grouping axiom numerically, confirming , and that the equiprobable entropy satisfies .
Limiting cases
Each limit recovers a familiar ensemble or a sanity check on the construction.
| Case | Result | Meaning |
|---|---|---|
| No constraint but normalization | , | Total ignorance is the uniform microcanonical distribution — Boltzmann's . |
| Fixed | The canonical (Boltzmann) distribution; conjugate to energy becomes . | |
| Fixed and | The grand canonical distribution; conjugate to number is the chemical potential. | |
| (very large ) | Weak energy constraint returns the flat distribution — high "temperature" is near-total ignorance. | |
| One outcome certain | Perfect knowledge carries zero entropy; the principle then has nothing left to maximize. |
Worked examples
Example 1 — A three-state system with a fixed mean energy. A system has three microstates with energies . You are told only that the average energy is . Find the maximum-entropy distribution and its entropy, and compare with the unconstrained maximum.
Step 1. Write the MaxEnt form. By equation (3), with (measuring in units of ).
Step 2. Solve for from the constraint . Numerically this gives , so the probabilities are . Check: ✓.
Step 3. Compute the entropy: nats. The unconstrained maximum (uniform ) would be nats. The constraint has lowered the achievable entropy, exactly as it must — knowing the mean energy is information, and information reduces entropy. The takeaway: the MaxEnt distribution is the flattest one consistent with , and any other distribution with the same mean — for instance , which also averages — has strictly smaller entropy ( nats ).
Example 2 — Recovering microcanonical and grand canonical limits. Take the same three states but impose no energy constraint, only normalization.
Step 1. With only , the Lagrangian has a single multiplier and Step 2 of the derivation gives , so for all : the uniform distribution.
Step 2. Its entropy is nats with — the microcanonical result. For equally likely states one would get nats.
Step 3. Now suppose the states also carry particle numbers and you additionally know . Adding the term to the Lagrangian and repeating Steps 2–3 gives with : the grand canonical distribution (5). The takeaway: one principle, applied with zero, one, or two constraints, generates the microcanonical, canonical, and grand canonical ensembles respectively — they are three states of knowledge, not three separate laws.
Origins · 1 minmaximum entropy and how this was discovered
The maximum entropy principle was crystallized by Edwin Thompson Jaynes (1922–1998) in two 1957 Physical Review papers that reinterpreted statistical mechanics as a branch of statistical inference rather than mechanics. Jaynes built directly on Claude Shannon's 1948 measure of information, , arguing that the Gibbs ensembles are simply the distributions of maximum entropy subject to the macroscopic constraints one happens to know. The viewpoint reframed temperature, free energy, and the partition function as consequences of honest reasoning under uncertainty, and it seeded modern applications far beyond physics — image reconstruction, spectral analysis, natural-language modeling, and ecology. (This card is titled by the concept because the individual founders, Jaynes and Shannon, already head other articles in this collection.)
Going further
References. Jaynes, "Information Theory and Statistical Mechanics," Phys. Rev. 106, 620 (1957) and 108, 171 (1957) · Shannon, "A Mathematical Theory of Communication," Bell Syst. Tech. J. 27, 379 (1948) · Jaynes, Probability Theory: The Logic of Science (2003) · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, ch. 5–6 · Pathria & Beale, Statistical Mechanics, 3rd ed., §3.
Provenance. A verifier should reproduce: (1) the three-state optimizer , from numerically maximizing at fixed , matching ; (2) nats and its identity with ; (3) and a lower entropy for the alternative ; (4) the grouping axiom ; (5) for six equally likely states; (6) the equiprobable additivity with .
Builds on: Gibbs Entropy · Fundamental Postulate of Equal A Priori Probabilities · Canonical Ensemble. Leads to: Canonical Ensemble · Grand Canonical Ensemble · Maximum caliber and dynamical ensembles.
Isn't picking "maximum entropy" just as arbitrary as any other choice?
No — it is the unique choice that adds no information beyond your constraints. Shannon's axioms show that is the only functional (up to units) that consistently measures uncertainty, so maximizing it is the only way to be maximally noncommittal about everything you were not told. Any other rule would smuggle in extra assumptions: it would make some outcomes more or less likely than the data warrant. That is why MaxEnt is called the least-biased inference, not merely one option among many.
Why does the canonical distribution come out exponential rather than some other shape?
The exponential is forced by two facts: the entropy's derivative is logarithmic (), and the energy constraint enters linearly. Setting the derivative of the Lagrangian to zero therefore gives , and exponentiating gives . Any constraint that is linear in times some quantity adds a term to the exponent, so the maximum-entropy distribution is always of the exponential-family form .
Does the constant matter?
Only for units. The functional is maximized at the same distribution for any positive , so the shape of the answer — the Boltzmann distribution, the value of the probabilities — is independent of . Choosing measures entropy in joules per kelvin and makes ; choosing measures information in bits. The physics is in the constraints and the multipliers, not in .
How is this different from Boltzmann's ?
Boltzmann's formula is the special case of MaxEnt with no constraint but normalization: when all accessible microstates are equally likely, . So is the maximum-entropy (microcanonical) answer, and the Gibbs form generalizes it to distributions that are not uniform, which is exactly what you need once a heat bath fixes the mean energy instead of the energy itself.
If I add more and more constraints, what happens?
Each independent constraint adds a Lagrange multiplier and an exponential factor, and lowers (or leaves unchanged) the maximum achievable entropy — more knowledge means less uncertainty. In the limit where you constrain enough moments to pin the distribution completely, the entropy drops to that of a single fixed distribution. In practice one keeps only the constraints that are physically controlled (energy, particle number, sometimes volume or magnetization); adding spurious constraints is the classic way to get a wrong answer from a correct principle.
Does MaxEnt prove the second law of thermodynamics?
Not by itself. MaxEnt tells you the equilibrium distribution is the maximum-entropy one for the known constraints, but the claim that an isolated system evolves toward that distribution requires the microscopic dynamics (mixing, coarse-graining, contact with a bath). Jaynes' second 1957 paper and later work connect MaxEnt to irreversibility, but the arrow of time is extra physics layered on top of the inference principle. Treat MaxEnt as the correct bookkeeping for equilibrium ensembles, and look to the kinetic and nonequilibrium articles for why systems approach equilibrium.