Canonical partition function Created 2026-09-24 Updated 2026-10-14
The partition function is the sum of the Boltzmann weights over individual microstates. Dividing by it makes their probabilities sum to one. When summing distinct energies instead, include the state degeneracy: . For two independent distinguishable two-level systems,The middle coefficient counts two microstates, exactly as in the preceding figure. For such units, ; this factorization requires additive energy and independence, and generally fails with interactions.
The usefulness goes beyond normalization. For fixed energies, derivatives of the natural logarithm of the partition function yield measurable quantities:Here is internal energy, the second expression is the energy variance, and is Gibbs entropy. For one two-level system at fixed , its heat capacity and entropy areAt , these give , and . For independent units, all three quantities add.
The figure shows why heat capacity peaks. At low temperature, the excited energy is rarely occupied; at high temperature, the probabilities are almost equal and further warming barely changes internal energy. The largest response lies between these limits, at , where . Meanwhile entropy rises from zero toward , reflecting two equally likely alternatives. This high-temperature limit belongs to the stipulated two-level system; extra accessible energy eigenstates would change it.
Entropy Created 2026-09-24 Updated 2026-10-20
Entropy is an extensive quantity and a state function of an equilibrium system, measured in . Differences between equilibrium states are calculated along a reversible thermodynamic process:Here heat entering the system is positive and is its absolute thermodynamic temperature. The reversible path used for calculation need not be the path actually taken. Dividing the actual heat by a single temperature generally fails for an irreversible process.
For example, put two rigid bodies, each with constant heat capacity , at and in an otherwise isolated system. Assume each body has a uniform internal temperature, no phase transition occurs, and no work is extracted. Their final thermal equilibrium is at , because the internal energy lost by one equals that gained by the other. Using entropy from heat capacity,so . One body's entropy decreases while the total increases. [ref]
https://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node41.html. MIT, Entropy changes and the hot-brick problem
In statistical mechanics, Boltzmann's entropy formula counts equally likely microstates compatible with a macrostate; Gibbs entropy handles a specified probability distribution over microstates. If the number of equally likely microstates doubles, entropy increases by . The logarithm makes multiplicative counts additive for independent systems. These are precise statements about states and probabilities, not a universal measure of visible messiness. Calling entropy merely "disorder" obscures the thermal calculation above and hides which microstates are being counted. [ref]
https://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node57.html. MIT, Statistical entropy and randomness
The usefulness of entropy is that measurable heat capacities determine its changes, and the Second law of thermodynamics turns those changes into constraints on processes. It also connects macroscopic measurements to microscopic descriptions without requiring us to track every particle.
Fine-grained Gibbs entropy 2026-10-24
For a normalized probability density on classical phase space with canonical volume element , the fine-grained Gibbs entropy is , whenever the integral exists. Here is a constant reference density fixing the units inside the logarithm, and is the Boltzmann constant. No averaging into finite cells is performed.
For a regular Hamiltonian flow , Liouville theorem in Hamiltonian mechanics gives and . Substitution directly provesAn irreversible macroscopic entropy increase therefore requires a different description or additional assumptions; it is not a failure of this volume-preservation argument.
Magnetic entropy Created 2026-10-18 Updated 2026-10-20
Magnetic entropy counts the uncertainty in the occupied magnetic microstates. For independent localized magnetic moments with one-site probabilities ,where counts sites and is the Boltzmann constant. This is the Gibbs entropy for the magnetic degrees of freedom. Equal occupation of two states gives ; certain occupation of one state gives zero. Calling this disorder is useful only if the relevant states and their probabilities are specified. In an interacting material, correlations generally prevent replacing the many-body Gibbs entropy by this sum of independent one-site contributions.
Increasing the magnetic field at fixed positive temperature favors lower magnetic energy levels, reducing magnetic entropy. During ideal isolated demagnetization, both the level separation and temperature fall together, leaving the occupation probabilities unchanged. Thus the independent-spin idealization cools without increasing spin disorder along the isolated leg. When a real crystal's vibrating lattice also cools, its lost entropy can instead be taken up by the magnetic degrees of freedom. The conserved quantity is the total entropy of the thermally isolated stage, including any attached load in thermal equilibrium.
Maximum-entropy derivation of equilibrium ensembles Created 2026-09-24 Updated 2026-10-24
Maximizing the Gibbs entropy under normalization alone gives a uniform distribution. Adding a fixed mean-energy constraint gives the Boltzmann distribution .
Use and setFor unit particle mass, is both the number density and the mass density in the number convention of c. A fixed reference scale inside the logarithm changes by a constant multiple of the conserved total mass, leaving its derivative unchanged.
Both prefactors in the source's part (d) need correction. Multiplication of the mean-field alignment equation by and integration by parts givesExchange and , use the symmetry of , and average the two expressions:The printed right-hand side omits . This corrected velocity-alignment energy dissipation agrees with the pair-counting calculation in a.
For velocity-alignment entropy production, let . The velocity-space divergence is . Assuming and sufficient decay, integration by parts yieldsThe printed formula omits the factor from the three velocity components. In spatial dimensions, that factor would be . Zeros of can be treated by a regularized entropy calculation when the required integrability holds.
A concrete smooth counterexample to both printed coefficients is and , where is a positive normalized Gaussian distribution. The total mass is one, the total momentum is zero, and initially. The kinetic energy derivative is , whereas the printed formula gives . The entropy functional derivative is , whereas the printed formula gives .
The signs describe cooling of relative velocities and contraction in phase space: increases, so the fine-grained Gibbs entropy decreases. These dissipative particle dynamics are not an isolated Hamiltonian system; there is no contradiction with Liouville's theorem or the Boltzmann equation's usual entropy increase. The microscopic mechanism removing kinetic energy is outside this alignment model.
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 4 34C ii Solution Created 2026-09-24 Updated 2026-10-14
For independent weakly coupled systems, insert the product probabilities into the Gibbs entropy. Since each marginal sums to one and the logarithm of a product is a sum,At fixed total energy and particle number, and . Part (i) givesIndependent exchange variations force both coefficients to vanish. Thus
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 4 34C i Solution Created 2026-09-24 Updated 2026-10-14
Maximize the Gibbs entropy subject to normalization and the two mean constraints. Introduce multipliers and differentiateStationarity gives . Strict concavity of entropy gives the constrained maximum, on its support. Differentiating the maximum value with respect to the constrained means, or differentiating the entropy along the maximizing distribution and using , gives . The thermodynamic identification is , . Therefore
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 1 35D Solution Created 2026-09-24 Updated 2026-10-14
The microcanonical ensemble describes an isolated system at fixed energy, volume and particle number. The canonical ensemble describes fixed particle number and volume with heat exchange at a prescribed temperature. The grand canonical ensemble additionally allows particles to exchange with a reservoir, prescribing temperature, volume and chemical potential. Their respective equilibrium probabilities are uniform on the accessible energy shell, proportional to , and proportional to . For stable short-range systems in the thermodynamic limit, concentration of relative energy and particle-number fluctuations and concavity of entropy make their bulk predictions equivalent; phase coexistence or nonadditive interactions require care.
For the microcanonical case restrict the allowed states to the fixed-energy shell of size , imposing outside it. Maximize the Gibbs entropy subject to . A Lagrange multiplier gives on the shell, soFor the canonical case impose both normalization and . Stationarity of gives . ThusThe last identification follows from . Entropy is strictly concave in the probabilities, so these stationary distributions are maxima.
For the independent three-level particles, put and . The full partition function is because the particles occupy labeled lattice sites. Differentiation givesThe heat capacity also equals , confirming positivity. As , the three occupations become equal:As , all particles occupy their unique lowest state:
A negative temperature is possible because the total energy is bounded above. An equilibrated population inversion has more particles at than at . For example probabilities correspond to and mean energy . This is a macroscopic occupation pattern; an isolated individual microstate is not itself assigned a temperature. At the positive zero-temperature limit the ground state is unique, so the entropy tends to zero: the system obeys the third law of thermodynamics. The negative-temperature branch likewise approaches the unique highest-energy state as ; it does not introduce residual ground-state entropy.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 2 34D a Solution Created 2026-09-24 Updated 2026-10-05
Here is the probability of microstate , including all occupation data. In the grand canonical ensemble, with energy , particle number , chemical potential and ,Substitution in the Gibbs entropy gives , where and . Differentiating at fixed gives . Therefore
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 3 35D Solution Created 2026-09-24 Updated 2026-10-03
The chemical potential is the change in internal energy when one particle is added at fixed entropy and volume:Equivalently, for the Helmholtz free energy.
Let a microstate have energy and particle number . Maximizing the Gibbs entropy subject to normalization and fixed mean values of and is the maximum-entropy derivation of equilibrium ensembles. With Lagrange multipliers , , and , varyThe stationarity equation is . Normalization therefore gives the grand canonical ensembleHere is the grand canonical partition function and is the Boltzmann constant.
For one fermionic quantum state of energy , the Pauli exclusion principle permits occupation numbers only . Its two grand-canonical weights are and , so its mean occupation is the Fermi-Dirac distribution
For a free nonrelativistic particle, . In a region of area , the number of wave-vector states in the annulus from to , including the two spin angular momentum states, isSince , the two-dimensional free-electron density of states is constant:
We now use units in which , as in the question. At zero temperature, the Fermi-Dirac distribution is a step function, and henceAt positive temperature the same fixed particle number satisfies the exact relationThusThis is the low-temperature particle-number cancellation for constant density of states. Therefore, for , the mean number of particles in the energy interval is
Finally, compare the internal energy with its zero-temperature value. The thermally excited particles above and holes below have equal leading particle numbers, so their terms proportional to cancel. With ,where the integral follows from the fermion-to-boson thermal integral ratio. Differentiation gives the linear low-temperature heat capacity of a two-dimensional Fermi gas:The requested power law is therefore linear in , with exponent one.
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 2 37A b Solution Created 2026-09-24 Updated 2026-09-25
For the Gibbs entropyfirst maximize subject only to over accessible microstates. A Lagrange multiplier givesso every is equal. Normalization yields the microcanonical ensemble
For the canonical ensemble, impose both normalization and the mean-energy constraint . Stationarity ofgives . The canonical partition function fixes , soThermodynamic consistency identifies . This is the maximum-entropy derivation of equilibrium ensembles.
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 2 37A c Solution Created 2026-09-24 Updated 2026-09-25
Past exam of the physics B course of the University of Cambridge 2011 Paper 1 Section C C13 Solution 2026-10-20
A microstate specifies the microscopic state: classically the positions and momenta of all particles, or quantum mechanically an allowed many-body state. A macrostate specifies a few coarse variables such as energy, volume and particle number. Many microstates can give the same macrostate. A statistical ensemble is a probability assignment over hypothetical copies prepared with the same macroscopic constraints; it does not require a sample to be literally divided into many physical copies. An observable's ensemble mean is , with an integral replacing the sum in classical phase space.
For an isolated system at fixed , the microcanonical ensemble assigns equal probability to accessible microstates in a narrow energy shell. If their number is , the Boltzmann entropy is . Thermal contact between two initially isolated systems allows energy to be shared while their sum stays fixed. The most probable division maximizes , so equilibrium requires equal . This gives the statistical temperature definitionFor positive temperature, energy tends to flow from lower entropy slope to higher entropy slope until those slopes agree. The narrow energy-shell width represents macroscopic resolution; it must not exclude the physically accessible states.
For a small subsystem exchanging energy with a much larger bath, the bath has energy when subsystem microstate has energy . Expanding its entropy gives . Counting compatible bath states therefore yields the Boltzmann distribution and canonical ensemble:The exponential weights individual microstates. An energy level of degeneracy has total probability ; a more degenerate excited level can outweigh one ground-state level even though each of its microstates is less probable. The Gibbs entropy gives . The equilibrium energy variance is , linking measurable fluctuations to a macroscopic response.
If particle exchange is also allowed, a reservoir fixes and chemical potential . The grand canonical ensemble weights a state by , with . Mean particle number is , while volume remains a constraint in this version. Thus the ensemble follows the physical exchange conditions: fixed energy, thermal contact, or thermal and particle contact.
In ordinary large short-range systems, relative fluctuations often decrease as and the ensembles give the same bulk thermodynamics away from singular limits. Finite systems, critical fluctuations and long-range interactions require care. Interpreting a time average as an ensemble average additionally requires appropriate sampling or mixing dynamics; it is not guaranteed solely by naming an ensemble. thermal equilibrium probability assignments do not describe every driven or relaxing state.
Past exam of the quantum condensed matter course of the University of Cambridge 2004 Section B B8 Solution Created 2026-10-18 Updated 2026-10-20
Entropy is a thermodynamic state function. For a reversible heat transfer, ; the Clausius inequality generalizes this to irreversible processes. The combined entropy of a system and its surroundings does not decrease. A subsystem can lose entropy by exporting heat or matter, so the second-law statement must specify the whole isolated combination. In a simple compressible system,which identifies temperature, pressure and chemical potential as derivatives of the energy representation of the state function. Thermodynamic equilibrium maximizes entropy under fixed total energy, volume and particle number. A heat reservoir instead leads to minimizing the Helmholtz free energy at fixed , or the Gibbs free energy at fixed .
Statistical mechanics explains the state count. In a microcanonical ensemble, equally probable compatible microstates give Boltzmann's entropy formula, . With general discrete probabilities, the Gibbs entropy isThe microcanonical formula follows by setting every nonzero probability to . For a canonical ensemble, , soThis turns microscopic energy levels and their populations into a measurable thermodynamic quantity. Classical phase-space counting needs a consistent microscopic normalization and indistinguishability convention; quantum state counting supplies that normalization. Independent systems have multiplicative state counts and therefore additive entropies.
For an ideal gas freely expanding from volume to in an insulated enclosure, energy remains fixed while each particle gains twice the accessible position volume. The state count increases by , giving . The actual irreversible process transfers no heat. A reversible isothermal comparison path transfers heat and computes the same entropy change because the initial and final thermodynamic equilibrium states are the same.
Calorimetry supplies another connection to experiment: at fixed pressure and within one phase, , with latent-heat contributions at first-order transitions. The third law of thermodynamics fixes for an ideal perfect crystal with a unique ground state. Degeneracy or frozen disorder can produce residual entropy. Entropy thus links heat-capacity measurements, phase thermodynamic equilibrium and the number of accessible microscopic configurations.
Scope of Boltzmann's entropy formula 2026-10-14
The strings in Boltzmann entropy of a two-box occupancy are complete microstates only within the binary toy model. They retain a coarse-grained variable for each particle and omit its exact position within a box and its momentum. An actual classical gas instead occupies continuous phase space; obtaining a dimensionless count from a phase space volume requires a specified cell convention and the appropriate treatment of particle identity. A quantum state count must respect the allowed quantum states and quantum statistics. Thus is not a general count of microstates for a gas obeying quantum ideal-gas statistics. [ref]
https://ocw.mit.edu/courses/8-333-statistical-mechanics-i-statistical-mechanics-of-particles-fall-2013/0cdb670a825c6aaea7e229ac40776cbf_MIT8_333F13_Lec13.pdf. Kardar, MIT 8.333 (2013), lecture 13, §§IV.D–E: gas phase space and particle counting
For a discrete probability distribution with unequal weights, use the existing Gibbs entropy article; its equal-weight case gives Boltzmann's entropy formula. Shannon entropy uses the corresponding information measure, with the logarithm base setting its units. A count alone cannot replace the specified probability distribution, as the Boltzmann distribution examples demonstrate. [ref]
https://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node56.html. MIT, §7.3: statistical entropy for general microstate probabilities
Overwhelming multiplicity explains why thermodynamic equilibrium is overwhelmingly probable in macroscopic systems under the appropriate statistical assumptions. It does not make low-entropy thermal fluctuations logically impossible. Nor does counting alone derive irreversible macroscopic evolution: one also needs dynamics, an initial preparation, and a reason the system samples the allowed microstates on the timescale of interest. [ref]
https://ocw.mit.edu/courses/8-333-statistical-mechanics-i-statistical-mechanics-of-particles-fall-2013/0cb99318c2ed889316cdcff839759e8d_MIT8_333F13_Lec12.pdf. Kardar, lecture 12, §§IV.A–B: statistical equilibrium and the limits of counting arguments
Historically, Boltzmann's 1877 paper counted microscopic arrangements, called complexions, and related the natural logarithm of their number to entropy. The Sharp and Matschinsky translation appeared in Entropy 17 (2015), pages 1971–2009, DOI 10.3390/e17041971. Its notation differs from ours: Boltzmann's permutability measure is already logarithmic, whereas here is the count. [ref]
https://gilles.montambaux.com/files/histoire-physique/Boltzmann-1877-entropy.pdf. Boltzmann (1877), translated by Kim Sharp and Franz Matschinsky (2015), §III after equation 34 and §V
Josiah Willard Gibbs's Elementary Principles in Statistical Mechanics (1902) developed the statistical ensemble framework; Chapter XIV compares several statistical definitions of entropy with thermodynamics. [ref]https://en.wikisource.org/wiki/Elementary_Principles_in_Statistical_Mechanics. Gibbs (1902), title page and preface
[ref]https://en.wikisource.org/wiki/Elementary_Principles_in_Statistical_Mechanics/Chapter_XIV. Gibbs (1902), Chapter XIV: discussion of thermodynamic analogies
Two-level paramagnetic cooling model Created 2026-10-18 Updated 2026-10-20
Use the independent spin-one-half two-level system with fixed distinguishable sites and Hamiltonian levels , where is the magnitude of the field-axis magnetic moment and is a uniform externally controlled magnetic field. Assume positive temperature, no interactions between sites, and no appreciable lattice or load entropy. The two levels differ by . With inverse temperature , the canonical ensemble gives the one-site and total partition functionsHere the minus subscript denotes the lower energy . Factorization of the partition function requires additive energy and independent sites; there is no particle-exchange factor for these fixed distinguishable sites.
Differentiate the partition function, holding fixed when differentiating with respect to . The internal energy, Helmholtz free energy, total field-axis magnetic moment , and magnetic entropy areThe extensive moment is distinct from magnetization, the moment per unit volume. Direct substitution of into the Gibbs entropy gives the same independently of the free-energy derivative.
At fixed , the magnetic heat capacity isStrict decrease makes invertible on . Constant magnetic entropy therefore fixes , not or separately:The partition function may be used to label these equilibrium states even though the isolated cooling leg has no external heat bath. Actual thermalization of the lattice and load additionally requires a sufficiently fast spin-lattice relaxation; perfectly uncoupled spins by themselves cannot refrigerate an attached object.
The limiting cases are instructive. For , , , and . The moment response reproduces Curie's law. For , and the upper-state occupation is exponentially small. Taking at fixed gives ; taking at fixed gives . The origin has a path-dependent limit. Extrapolating a line of constant to does not construct a usable zero-temperature state or prove that a real material retains independent degenerate spins there.
Velocity-alignment entropy production 2026-10-25
For the mean-field alignment equation in position and velocity coordinates, put . Its force has velocity-space divergence . Consequently integration by parts gives the nonnegative derivative in the title, assuming suitable positivity, decay and integrability. The fine-grained Gibbs entropy decreases because these dynamics contract phase space; the interaction is dissipative.

