359 Boltzmann–Gibbs Entropy from Counting and Refinement

Thesis. Entropy is derived here in two independent ways, which agree.

In both routes the logarithm appears for the same reason: it is the homomorphism from the free commutative monoid of counts under multiplication to \((\mathbb R,+)\), which makes entropy additive when independent systems combine. The quantum entropy is the entropy of the spectrum, minimal over all complete measurements. Its maximiser at fixed energy is the Gibbs state, and along the Gibbs family \(dS=\beta \,dE\), which is the Clausius relation.

359.1 Counting microstates

Multisets. \(N\) systems, each in one of \(k\) outcomes, give words in \([k]^N\). Forgetting the order of the systems gives a multiset, recorded by occupation numbers \((n_1,\dots ,n_k)\) with \(\sum _in_i=N\). The number of words of a given type is

\begin{equation} W(n_1,\dots ,n_k)=\frac {N!}{n_1!\cdots n_k!}. \tag{21735}\end{equation}
The macrostate is the type, and \(W\) counts its microstates.

Bounds on \(\log n!\). Since \(\log \) is increasing, \(\int _{j-1}^j\log x\,dx\le \log j\le \int _j^{j+1}\log x\,dx\), and summing over \(j\le n\),

\begin{equation} n\log n-n+1\ \le \ \log n!\ \le \ (n+1)\log (n+1)-n . \tag{21736}\end{equation}
Hence \(\log n!=n\log n-n+O(\log n)\).

The limit. With \(n_i=p_iN\) and \(\sum _in_i=N\),

\begin{equation} \log W=N\log N-N-\sum _i(n_i\log n_i-n_i)+O(k\log N) =-N\sum _ip_i\log p_i+O(k\log N). \tag{21737}\end{equation}

Boltzmann.

\begin{equation} S_B=k_B\log W, \qquad \frac {S_B}{N}\to -k_B\sum _ip_i\log p_i . \tag{21738}\end{equation}
For the uniform distribution on \(W\) microstates, \(-\sum \frac 1W\log \frac 1W=\log W\): Boltzmann’s entropy is the Gibbs entropy of the uniform state on the energy shell.

359.2 Refinement

Let \(H\) assign a number to each finite probability vector, subject to:

(R3) is the statement that a partition \(\sum _j\Pi _j=I\) refined into \(\Pi _j=\sum _i\Pi _{ji}\) has uncertainty that of the coarse partition plus the average uncertainty within each block.

Additivity. Refining \(m\) equal blocks into \(n\) equal parts each gives

\begin{equation} f(mn)=f(m)+f(n), \tag{21740}\end{equation}
so \(f\) is a completely additive function on the free commutative monoid \((\mathbb N_{\ge 1},\cdot )\), determined by its values on the primes.

Lemma. A non-decreasing completely additive \(f\) on \(\mathbb N_{\ge 1}\) is \(f(n)=c\log n\) with \(c\ge 0\) [793].

Proof. \(f(1)=0\) and \(f(n^k)=kf(n)\). For \(m,n\ge 2\) and \(k\ge 1\), choose \(a\) with \(m^a\le n^k<m^{a+1}\). Monotonicity gives \(af(m)\le kf(n)\le (a+1)f(m)\), and also \(a\log m\le k\log n<(a+1)\log m\). Dividing,

\begin{equation} \Bigl |\frac {f(n)}{f(m)}-\frac {\log n}{\log m}\Bigr |\le \frac 1k \tag{21741}\end{equation}
when \(f(m)>0\); letting \(k\to \infty \), \(f(n)/\log n=f(m)/\log m\). If \(f(m)=0\) for some \(m\ge 2\), the same inequalities force \(f\equiv 0\). \(\square \)

Rational probabilities. For \(p_i=a_i/N\), refine each outcome \(i\) into \(a_i\) equal parts of probability \(1/N\). By (R3),

\begin{equation} c\log N=H(p)+\sum _ip_i\,c\log a_i, \qquad H(p)=-c\sum _ip_i\log \frac {a_i}{N}=-c\sum _ip_i\log p_i . \tag{21742}\end{equation}
Continuity (R1) extends this to all probability vectors [791, 792].

359.3 Why the logarithm

Counts of independent systems multiply, \(W_{AB}=W_AW_B\), and dimensions of independent quantum systems multiply, \(\dim (\mathcal H_A\otimes \mathcal H_B)=d_Ad_B\). The logarithm is the homomorphism \((\mathbb R_{>0},\cdot )\to (\mathbb R,+)\) inverse to the exponential, the solution of \(Df=f\), \(f(0)=1\) (Section 333). It converts the free multiplicative monoid of counts into additive quantities, so that

\begin{equation} S(A\otimes B)=S(A)+S(B) \tag{21743}\end{equation}
for independent systems. Both routes above are forms of this one homomorphism.

359.4 Extremal properties

Maximum. For \(n\) outcomes and the uniform distribution \(u\), Klein’s inequality (Stage 7) gives

\begin{equation} D(p\,\|\,u)=\log n-H(p)\ge 0, \tag{21744}\end{equation}
with equality only at \(p=u\). For a binary partition, \(h(O)=-O\log O-U\log U\le \log 2\), with equality at \(O=U=\tfrac 12\).

Concavity. \(\varphi (x)=-x\log x\) is concave, so \(H\) is concave in \(p\), and mixing increases entropy.

359.5 Quantum entropy

Spectrum. For a density matrix \(\rho =\sum _jr_j\Pi _j\) (Stage 4),

\begin{equation} S(\rho )=-\operatorname {Tr}\rho \log \rho =H(r). \tag{21745}\end{equation}

Minimal over measurements. For an orthonormal basis \(\{e_i\}\), the outcome probabilities are \(q_i=\langle e_i|\rho |e_i\rangle =\sum _jP_{ij}r_j\), with \(P_{ij}=|\langle e_i|r_j\rangle |^2\) doubly stochastic. By concavity of \(\varphi \), \(\varphi (q_i)\ge \sum _jP_{ij}\varphi (r_j)\), and summing over \(i\) with \(\sum _iP_{ij}=1\),

\begin{equation} H(q)\ \ge \ H(r)=S(\rho ), \tag{21746}\end{equation}
with equality in the eigenbasis. The von Neumann entropy is the least Shannon entropy of a complete measurement [257].

359.6 Gibbs state and the Clausius relation

Maximum at fixed energy. For \(\gamma _\beta =e^{-\beta H}/Z\) and any \(\rho \) with \(\operatorname {Tr}\rho H=\operatorname {Tr}\gamma _\beta H\),

\begin{equation} S(\gamma _\beta )-S(\rho )=D(\rho \,\|\,\gamma _\beta )\ge 0 \tag{21747}\end{equation}
(Stage 7). The Gibbs state is also the typical reduced state of a large system (Stage 9).

Thermodynamic relation. Along the Gibbs family at fixed \(H\), with \(E=\operatorname {Tr}\gamma _\beta H\),

\begin{equation} S=\beta E+\log Z, \qquad d\log Z=-E\,d\beta , \qquad dS=\beta \,dE . \tag{21748}\end{equation}
Restoring units, \(S\mapsto k_BS\) and \(\beta =1/k_BT\), this is
\begin{equation} dS=\frac {\delta Q}{T}, \tag{21749}\end{equation}
the Clausius relation for reversible heat exchange at fixed Hamiltonian [94].

359.7 Summary

Statement Form Ingredient
microstates \(W=N!/\prod n_i!\) multisets
Stirling bounds \(n\log n-n+1\le \log n!\le (n+1)\log (n+1)-n\) monotone \(\log \)
Boltzmann \(\tfrac 1N\log W\to -\sum p_i\log p_i\) counting
uniform shell \(S_B=k_B\log W\) uniform state
refinement \(H(\text {fine})=H(\text {coarse})+\sum q_jH(\cdot |j)\) partitions
additivity \(f(mn)=f(m)+f(n)\) free monoid
logarithm monotone additive \(\Rightarrow c\log n\) Erdős
Shannon \(H=-c\sum p_i\log p_i\) rational, continuity
independence \(S(A\otimes B)=S(A)+S(B)\) \(\log \) homomorphism
maximum \(H\le \log n\), \(h\le \log 2\) Klein
von Neumann \(S(\rho )=\min _{\text {bases}}H(q)\) doubly stochastic overlaps
Gibbs \(S(\gamma _\beta )\ge S(\rho )\) at fixed \(E\) Klein
Clausius \(dS=\beta \,dE=\delta Q/T\) \(d\log Z=-E\,d\beta \)