---
title: Chemical Potential, Fugacity, and Number Fluctuations
module: Grand Canonical Ensemble
moduleNumber: 6
lessonNumber: 2
order: 602
summary: >
  The chemical potential is the energy to add one particle at fixed entropy and
  volume, equal to the slope of the free energy in the particle number. For the
  classical ideal gas $\mu=k_BT\ln(n\lambda^3)$ is large and negative, and the
  fugacity $z=n\lambda^3$ is small. The grand ensemble makes the particle number
  fluctuate; its variance $\langle\Delta N^2\rangle=k_BT(\partial N/\partial\mu)$
  equals $k_BT\,N^2\kappa_T/V$, tying density fluctuations to the isothermal
  compressibility. Equality of $\mu$ is the condition for diffusive equilibrium
  and phase coexistence.
topics: [Grand Canonical Ensemble]
sources:
  - book: Schroeder
    ref: "Ch. 3 — Interactions and Implications; §3.5 Diffusive Equilibrium and Chemical Potential"
  - book: Reif
    ref: "Ch. 8 — Equilibrium between Phases and Chemical Species; §8.7–8.9, Ch. 9 §9.4"
  - book: Pathria & Beale
    ref: "Ch. 4 — The Grand Canonical Ensemble; §4.5 Density and Energy Fluctuations"
draft: false
---

The chemical potential entered the grand ensemble as the reservoir derivative
$\mu=-T(\partial S/\partial N)$ that weights the Gibbs factor. Read as a
thermodynamic quantity it measures the energetic cost of adding a particle, and
it controls diffusion the way temperature controls heat flow: particles move down
gradients of $\mu$ until it is uniform. This lesson fixes the physical meaning of
$\mu$, computes it for the classical ideal gas, and uses the grand ensemble to
find the fluctuations of the particle number, which turn out to be a direct
measure of the compressibility.

## The chemical potential as the cost of a particle

The fundamental relation $\d U=T\,\d S-P\,\d V+\mu\,\d N$ identifies $\mu$ as the
energy change when one particle is added at fixed entropy and volume,

$$
\mu=\Big(\frac{\partial U}{\partial N}\Big)_{S,V}.
$$

Fixing $S$ is awkward in practice, so the more useful expressions hold the
temperature fixed instead. Legendre-transforming to the Helmholtz and Gibbs free
energies gives three equal forms,

$$
\mu=\Big(\frac{\partial U}{\partial N}\Big)_{S,V}
=\Big(\frac{\partial F}{\partial N}\Big)_{T,V}
=\Big(\frac{\partial G}{\partial N}\Big)_{T,P}.
$$

The Helmholtz form is the working definition: $\mu$ is the free-energy cost of one
more particle at fixed temperature and volume. The Gibbs form has a further
consequence. Because $G$ is extensive and $T$, $P$ are intensive, $G$ is
proportional to $N$ at fixed $T,P$, so $\mu=G/N$: the chemical potential is the
Gibbs free energy per particle. A pure substance carries one chemical potential,
its Gibbs energy per particle, whatever the ensemble.

$$
% caption: The chemical potential is the slope of the free energy in the particle number: $\mu=(\partial F/\partial N)_{T,V}$ is the free-energy cost of inserting one particle at fixed temperature and volume.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(7.0,0) node[right,black]{$N$};
\draw[->,black] (0,0)--(0,4.4) node[above,black]{$F(T,V,N)$};
\draw[acc,very thick] plot[domain=0.3:4.5,samples=80] (\x,{0.12*\x*\x+0.3*\x+0.4});
\filldraw[acc] (3.5,2.92) circle (2.2pt);
\draw[black,thick] (2.4,1.67)--(4.6,4.18);
\node[black!70,right] at (3.85,2.3) {tangent slope};
\node[black!70,below,font=\scriptsize] at (3.5,-0.05) {insert one particle};
\end{tikzpicture}
$$

## Chemical potential of the classical ideal gas

The classical monatomic ideal gas provides the reference value of $\mu$ against
which every other regime is measured. Its Helmholtz free energy, from the
correctly counted partition function $Z=z_1^N/N!$ with single-particle partition
function $z_1=V/\lambda^3$, is[^gibbs]

$$
F=-k_BT\ln\frac{z_1^{N}}{N!}
=-k_BT\Big[N\ln\frac{V}{\lambda^3}-\ln N!\Big],
$$

where $\lambda=h/\sqrt{2\pi m k_BT}$ is the thermal de Broglie wavelength. Using
Stirling's approximation $\ln N!\approx N\ln N-N$ and differentiating in $N$,

$$
\mu=\Big(\frac{\partial F}{\partial N}\Big)_{T,V}
=-k_BT\ln\frac{V}{N\lambda^3}
=k_BT\ln\!\big(n\lambda^3\big),
\qquad n=\frac{N}{V}.
$$

The dimensionless combination $n\lambda^3$ is the number of particles inside a
thermal volume $\lambda^3$. The classical regime is exactly $n\lambda^3\ll1$,
where the gas is dilute on the scale of the thermal wavelength, so the logarithm
is large and negative and

$$
\mu\approx-k_BT\,\big|\ln(n\lambda^3)\big|<0.
$$

The classical chemical potential is negative: adding a particle at fixed $T$ and
$V$ lowers the free energy, because the entropy gained by having one more particle
to distribute outweighs its energy. Since $\lambda\propto T^{-1/2}$, at fixed
density $\mu$ falls without bound as the temperature rises, $\mu\sim
-\tfrac32k_BT\ln T$; it climbs toward zero as the gas is cooled or compressed
toward $n\lambda^3\sim1$, where the classical description fails and quantum
statistics take over.

$$
% caption: The classical ideal-gas chemical potential $\mu=k_BT\ln(n\lambda^3)$ is negative throughout the classical regime and grows more negative as the temperature rises at fixed density; it approaches zero as the gas is cooled toward the quantum boundary $n\lambda^3\sim1$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,-3.4)--(7.0,-3.4) node[right,black]{$T$};
\draw[->,black] (0,-3.6)--(0,0.7) node[above,align=center,black]{chemical\\potential};
\draw[black,dashed] (0,0)--(6.6,0);
\node[black,above left,font=\scriptsize] at (6.6,0) {zero level};
\draw[acc,very thick] plot[domain=0.35:3.15,samples=90] (\x,{-0.55*\x*ln(2.2*\x)});
\node[acc,align=center] at (4.6,-1.9) {classical gas:\\negative and falling};
\filldraw[black] (0.55,{-0.55*0.55*ln(2.2*0.55)}) circle (2.0pt);
\node[black!70,right,font=\scriptsize] at (0.75,-0.3) {quantum boundary};
\end{tikzpicture}
$$

## Fugacity as an effective activity

The fugacity $z=e^{\beta\mu}$ repackages the chemical potential into the
multiplicative weight that enters the grand partition function once per particle.
For the classical ideal gas the exponential of the result above is

$$
z=e^{\beta\mu}=n\lambda^3=\frac{n}{n_Q},
\qquad n_Q\equiv\frac{1}{\lambda^3},
$$

with $n_Q$ the quantum concentration. The fugacity is the ratio of the actual
density to the quantum concentration, and the classical condition $n\lambda^3\ll1$
is exactly $z\ll1$. In this regime the grand partition function is dominated by
its low-order terms in $z$, so the fugacity is a small parameter in which
corrections to ideal behavior are organized. For an interacting or quantum gas
$z$ ceases to equal $n\lambda^3$, but it remains the activity that measures how
strongly the reservoir drives particles into the system: $z\to0$ is the empty
limit and $z\to1$ (that is, $\mu\to0$) marks the onset of quantum degeneracy for
a gas of conserved bosons.

## Number fluctuations

Fixing $\mu$ rather than $N$ lets the particle number fluctuate, and its variance
follows from a second derivative of $\ln\Xi$, precisely as the energy variance
followed from a second derivative of $\ln Z$.[^fluc] The mean is
$\langle N\rangle=\beta^{-1}\partial\ln\Xi/\partial\mu$. Differentiating once
more,

$$
\langle\Delta N^2\rangle
\equiv\langle N^2\rangle-\langle N\rangle^2
=\frac{1}{\beta^2}\frac{\partial^2\ln\Xi}{\partial\mu^2}
=\frac{1}{\beta}\Big(\frac{\partial\langle N\rangle}{\partial\mu}\Big)_{T,V}
=k_BT\Big(\frac{\partial N}{\partial\mu}\Big)_{T,V}.
$$

The variance is the response of the mean particle number to the chemical
potential, another instance of a fluctuation equal to a susceptibility. Because
the variance is non-negative, $(\partial N/\partial\mu)_{T,V}\ge0$: raising the
chemical potential can only increase the mean population, a stability condition on
matter.

For the classical ideal gas the calculation is immediate. From
$\langle N\rangle=z\,\partial\ln\Xi/\partial z$ with $\ln\Xi=z\,z_1$ (derived in
the previous lesson from $\Xi=\sum_N z^N z_1^N/N!=e^{z z_1}$),

$$
\langle N\rangle=z\,z_1,
\qquad
\langle\Delta N^2\rangle=z\frac{\partial}{\partial z}\big(z\,z_1\big)=z\,z_1
=\langle N\rangle.
$$

The variance equals the mean: the particle number of a classical ideal gas in an
open volume is Poisson-distributed. The relative fluctuation is therefore

$$
\frac{\sqrt{\langle\Delta N^2\rangle}}{\langle N\rangle}
=\frac{1}{\sqrt{\langle N\rangle}},
$$

vanishing as $\langle N\rangle^{-1/2}$. For a macroscopic subvolume the particle
number is sharp to twelve significant figures, the same $1/\sqrt N$ suppression
that made the canonical energy sharp and that underlies the equivalence of the
ensembles.

$$
% caption: In the grand ensemble the particle number is distributed about its mean; for the classical ideal gas the distribution is Poisson with variance equal to the mean, so the width scales as $\sqrt{\langle N\rangle}$ and the relative spread as $\langle N\rangle^{-1/2}$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0)--(7.4,0) node[right,black]{$N$};
\draw[->,black] (0,0)--(0,4.0) node[above,black]{$P(N)$};
\draw[acc,very thick] plot[domain=0.6:6.8,samples=90] (\x,{3.6*exp(-(\x-3.7)*(\x-3.7)/1.5)});
\draw[black,dashed] (3.7,0)--(3.7,3.6);
\node[black!70,below,font=\scriptsize] at (3.7,0) {mean};
\draw[<->,black,thick] (3.7-0.87,1.15)--(3.7+0.87,1.15);
\node[black!70,above,font=\scriptsize] at (3.7,1.55) {Poisson width};
\end{tikzpicture}
$$

## Fluctuations and the compressibility

The number variance can be rewritten as a mechanical response. Density
fluctuations in an open subvolume are controlled by how easily the substance is
compressed.

> **Theorem (Number fluctuation–compressibility relation).** The particle-number
> variance in the grand ensemble is set by the isothermal compressibility
> $\kappa_T=-V^{-1}(\partial V/\partial P)_{T,N}$,
> $$
> \langle\Delta N^2\rangle=k_BT\,\frac{N^2}{V}\,\kappa_T,
> \qquad\text{equivalently}\qquad
> \frac{\langle\Delta N^2\rangle}{\langle N\rangle}=n\,k_BT\,\kappa_T.
> $$

> **Proof.** Start from $\langle\Delta N^2\rangle=k_BT(\partial N/\partial\mu)_{T,V}$
> and convert the derivative using two thermodynamic identities at fixed $T$.
> First, the Gibbs-Duhem relation $S\,\d T-V\,\d P+N\,\d\mu=0$ gives, at fixed
> temperature, $\d\mu=(V/N)\,\d P=\d P/n$, hence
> $(\partial P/\partial\mu)_T=n$. Second, write the mean number as $N=nV$ and use
> the density's response to pressure. At fixed $N$,
> $(\partial n/\partial P)_T=-(N/V^2)(\partial V/\partial P)_{T,N}
> =-(n/V)(\partial V/\partial P)_{T,N}=n\kappa_T$. Combining,
> $$
> \Big(\frac{\partial n}{\partial\mu}\Big)_T
> =\Big(\frac{\partial n}{\partial P}\Big)_T\Big(\frac{\partial P}{\partial\mu}\Big)_T
> =n\kappa_T\cdot n=n^2\kappa_T.
> $$
> At fixed $V$, $(\partial N/\partial\mu)_{T,V}=V(\partial n/\partial\mu)_T
> =Vn^2\kappa_T=N^2\kappa_T/V$. Multiplying by $k_BT$ gives the result.

The relation is a check and a tool. For the ideal gas $\kappa_T=1/P=V/(Nk_BT)$,
so $\langle\Delta N^2\rangle/\langle N\rangle=n k_BT\kappa_T=1$, recovering the
Poisson result. More usefully, it runs the other way: measured density
fluctuations determine the compressibility, and a compressibility that diverges
at a critical point signals density fluctuations growing without bound, the
origin of critical opalescence taken up in the fluctuations module.

$$
% caption: The number variance equals $k_BT\,N^2\kappa_T/V$: a stiff, weakly compressible substance holds a nearly fixed number in an open subvolume, while a soft, highly compressible one admits large density fluctuations.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black,thick,fill=black!6] (0,0) rectangle (3.0,2.4);
\draw[black,dashed] (0.9,0)--(0.9,2.4);
\draw[black,dashed] (2.1,0)--(2.1,2.4);
\foreach \p in {(0.45,0.5),(0.55,1.2),(0.4,1.8),(1.5,0.6),(1.35,1.5),(1.65,1.9),(2.55,0.7),(2.4,1.4),(2.6,1.95)}{\filldraw[black] \p circle (1.7pt);}
\node[black!70,below,align=center] at (1.5,-0.15) {small compressibility:\\sharp $N$};
\draw[black,thick,fill=black!6] (4.6,0) rectangle (7.6,2.4);
\draw[black,dashed] (5.5,0)--(5.5,2.4);
\draw[black,dashed] (6.7,0)--(6.7,2.4);
\foreach \p in {(5.0,0.5),(5.15,1.1),(5.3,1.7),(5.1,2.0),(5.4,0.9),(6.9,0.6),(7.2,1.3),(7.0,1.9),(6.8,1.1)}{\filldraw[black] \p circle (1.7pt);}
\node[black!70,below,align=center] at (6.1,-0.15) {large compressibility:\\wide $N$};
\end{tikzpicture}
$$

## Chemical potential and diffusive equilibrium

The role of $\mu$ as a driving quantity follows from maximizing the total entropy
of two systems that exchange particles at fixed total $N=N_1+N_2$ and fixed
energies. The total entropy is stationary when

$$
\frac{\partial S_1}{\partial N_1}+\frac{\partial S_2}{\partial N_2}
\frac{\d N_2}{\d N_1}=0
\quad\Longrightarrow\quad
\frac{\partial S_1}{\partial N_1}=\frac{\partial S_2}{\partial N_2}
\quad\Longrightarrow\quad
\frac{\mu_1}{T_1}=\frac{\mu_2}{T_2},
$$

and at a common temperature this is $\mu_1=\mu_2$. Particles flow from high $\mu$
to low $\mu$ until the chemical potentials equalize, exactly as energy flows from
high $T$ to low $T$. The same condition governs phase coexistence: a liquid and
its vapor in equilibrium share one temperature, one pressure, and one chemical
potential, $\mu_{\rm liq}(T,P)=\mu_{\rm vap}(T,P)$, which is the equation of the
coexistence curve taken up in the phase-transition module.

$$
% caption: Two systems that exchange particles at a common temperature reach diffusive equilibrium when their chemical potentials are equal; until then particles flow from the higher chemical potential to the lower.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,thick,fill=acc!10] (0,0) rectangle (2.6,2.2);
\node[acc] at (1.3,1.7) {system 1};
\node at (1.3,0.85) {higher};
\draw[black,thick,fill=black!6] (4.4,0) rectangle (7.0,2.2);
\node[black!70] at (5.7,1.7) {system 2};
\node at (5.7,0.85) {lower};
\draw[->,black,very thick] (2.8,1.1)--(4.2,1.1);
\node[black!70,above,font=\scriptsize] at (3.5,1.2) {particle transfer};
\node[black!70,below,font=\scriptsize] at (3.5,1.0) {until equal};
\end{tikzpicture}
$$

## The electrochemical potential

For charged particles the chemical potential acquires an electrostatic
contribution. A particle of charge $q$ in a region at electrostatic potential
$\phi$ carries potential energy $q\phi$, which shifts the energy of every
microstate and adds to the free-energy cost of insertion. The equilibrium
condition on particle exchange is uniformity not of $\mu$ but of the
**electrochemical potential**

$$
\tilde\mu=\mu+q\phi,
$$

the sum of the internal chemical potential and the electrostatic energy per
particle. Equilibrium of electrons across a junction, the Nernst potential of an
ion across a membrane, and the contact potential between two metals are all
statements that $\tilde\mu$ is uniform even though $\mu$ and $\phi$ vary
separately across the interface. The grand ensemble accommodates this by using
$\tilde\mu$ in the Gibbs factor whenever the particles are charged and an external
potential is present.

## Summary

- The chemical potential is the cost of one particle,
  $\mu=(\partial U/\partial N)_{S,V}=(\partial F/\partial N)_{T,V}
  =(\partial G/\partial N)_{T,P}=G/N$, the slope of the free energy in the
  particle number and the Gibbs energy per particle.
- For the classical ideal gas $\mu=k_BT\ln(n\lambda^3)$ is large and negative,
  and the fugacity $z=e^{\beta\mu}=n\lambda^3=n/n_Q$ is small; the classical
  regime is $n\lambda^3\ll1$, equivalently $z\ll1$.
- The particle-number variance is
  $\langle\Delta N^2\rangle=k_BT(\partial N/\partial\mu)_{T,V}$, Poisson
  ($\langle\Delta N^2\rangle=\langle N\rangle$) for the ideal gas, with relative
  spread $\langle N\rangle^{-1/2}$. It equals $k_BT\,N^2\kappa_T/V$, tying density
  fluctuations to the isothermal compressibility.
- Equality of $\mu$ (at common $T$) is the condition for diffusive equilibrium
  and phase coexistence; for charged particles the uniform quantity is the
  electrochemical potential $\tilde\mu=\mu+q\phi$.

[^gibbs]: The correctly counted ideal-gas partition function $Z=z_1^N/N!$ with
$z_1=V/\lambda^3$, the Stirling reduction, and the resulting Sackur-Tetrode
entropy are derived in the [ideal-gas partition function and Gibbs paradox lesson](/statistical-mechanics/classical-gas/ideal-gas-partition-function-and-the-gibbs-paradox).
**Schroeder**, _An Introduction to Thermal Physics_, §3.5 and §7.1; companion
material at <https://physics.weber.edu/schroeder/thermal/>.
[^fluc]: **Pathria & Beale**, _Statistical Mechanics_ (4th ed.), §4.5 — the
density and energy fluctuations of the grand canonical ensemble and the
compressibility relation. **Reif**, _Fundamentals of Statistical and Thermal
Physics_, §8.7–8.9 develops the chemical potential and diffusive equilibrium; the
canonical energy-fluctuation analogue is in the [energy-fluctuations lesson](/statistical-mechanics/canonical/energy-fluctuations-and-ensemble-equivalence).
