Compressibility and Number-Fluctuation Relation

Open a small imaginary box inside a gas and count the molecules inside it. The number is never quite fixed: molecules wander in and out across the invisible boundary, so the count fluctuates from instant to instant around some mean ⟨N⟩\langle N\rangle. How big are these fluctuations? Remarkably, their size is not an independent property of the gas — it is locked to a purely thermodynamic quantity you can measure with a piston: the isothermal compressibility κT\kappa_T. This is the compressibility–number-fluctuation relation, ⟨ΔN2⟩=kBT ⟨N⟩2κT/V\langle \Delta N^2\rangle = k_BT\,\langle N\rangle^2\kappa_T/V. The result is a fluctuation–response theorem, one member of a family (energy fluctuations tie to heat capacity, magnetization fluctuations to susceptibility). It says that a system which is easy to compress — soft, near a phase transition — will also show large spontaneous density fluctuations, and vice versa. The grand canonical ensemble, which lets particle number vary at fixed chemical potential μ\mu, makes the derivation almost automatic: differentiating ln⁡Ξ\ln\Xi twice with respect to μ\mu delivers both ⟨N⟩\langle N\rangle and ⟨ΔN2⟩\langle\Delta N^2\rangle in three lines. The relation has a dramatic consequence. As a fluid approaches its critical point, κT→∞\kappa_T\to\infty, so ⟨ΔN2⟩\langle\Delta N^2\rangle diverges: density fluctuations grow to macroscopic size, scattering light and turning the fluid milky. This is critical opalescence, the visible fingerprint of a diverging compressibility. The same quantity, written as the long-wavelength limit of the static structure factor S(0)=nkBTκTS(0)=n k_BT\kappa_T, is exactly what X-ray and neutron scattering measure — making density fluctuations a laboratory observable, not just a theorist's device.

Key takeaways
  • The number of particles in an open subvolume fluctuates; the variance is ⟨ΔN2⟩=kBT (∂⟨N⟩/∂μ)T,V=kBT ⟨N⟩2κT/V\langle\Delta N^2\rangle = k_BT\,(\partial\langle N\rangle/\partial\mu)_{T,V} = k_BT\,\langle N\rangle^2\kappa_T/V.
  • Both forms come from differentiating the grand partition function ln⁡Ξ\ln\Xi twice with respect to μ\mu — a clean fluctuation–response identity.
  • For an ideal classical gas κT=1/P\kappa_T=1/P, so ⟨ΔN2⟩=⟨N⟩\langle\Delta N^2\rangle=\langle N\rangle (Poisson statistics) and the relative fluctuation is 1/⟨N⟩1/\sqrt{\langle N\rangle} — negligible for a macroscopic box, dominant for a nanoscale one.
  • The long-wavelength structure factor S(0)=⟨ΔN2⟩/⟨N⟩=nkBTκTS(0)=\langle\Delta N^2\rangle/\langle N\rangle = n k_BT\kappa_T is measured directly by X-ray and neutron scattering.
  • Near a critical point κT→∞\kappa_T\to\infty, so density fluctuations diverge and scatter light — this is critical opalescence.
  • Key idea: density fluctuations are not free parameters — they are fixed by the compressibility, a macroscopic response function, through ⟨ΔN2⟩=kBT⟨N⟩2κT/V\langle\Delta N^2\rangle=k_BT\langle N\rangle^2\kappa_T/V.
The core insight

Spontaneous fluctuations in the number of particles inside an open subvolume are rigidly tied to the isothermal compressibility, a bulk thermodynamic response: ⟨ΔN2⟩=kBT⟨N⟩2κT/V\langle\Delta N^2\rangle=k_BT\langle N\rangle^2\kappa_T/V. A soft, easily compressed fluid fluctuates strongly; a stiff one barely fluctuates. The variance is generated by two μ\mu-derivatives of ln⁡Ξ\ln\Xi.

Where this lives today

Number and density fluctuations are a working tool across condensed matter and soft matter. Small-angle X-ray and neutron scattering (SAXS/SANS) routinely extract κT\kappa_T and, near phase transitions, the growing correlation length from the qq-dependence of S(q)S(q). In cold-atom experiments, in-situ imaging counts atoms in optical-lattice subregions and measures ⟨ΔN2⟩\langle\Delta N^2\rangle directly, using the fluctuation–compressibility relation as a thermometer and as a probe of quantum statistics (sub-Poissonian for a band insulator, super-Poissonian near a superfluid transition). The same machinery underlies "fluctuation microscopy" of glasses and the interpretation of density-fluctuation spectra in simulations. Wherever a compressibility diverges — critical fluids, the liquid–gas endpoint, the onset of phase separation — this relation says the density fluctuations diverge with it.

The physical picture

Picture a fixed region of space — say a cube 1 μm1\,\mu\mathrm{m} on a side — drawn inside a much larger gas. It has no walls; molecules cross its faces freely. At one instant it holds a few million molecules; a moment later, a few thousand more or fewer. The average occupancy ⟨N⟩\langle N\rangle is set by the density, but the spread around that average is the question. The grand canonical ensemble is built exactly for this: it fixes TT, VV, and μ\mu (the reservoir's chemical potential) and lets NN float. The payoff is that the spread is not arbitrary. If you could grab the whole gas with a piston and squeeze, the ease with which its volume gives way is the compressibility κT\kappa_T. A gas near condensation is soft — a tiny pressure change moves a lot of volume — and that same softness shows up microscopically as big, easily-excited density fluctuations in your imaginary box. Stiffness and quietness go together; softness and jitter go together.

Figure
A fixed open subvolume drawn inside a large gas: molecules cross its faces, so the count N fluctuates in time around its mean ⟨N⟩, tracing a jagged line whose spread is √⟨ΔN²⟩.
large gas (reservoir at T, μ) open box V time N(t) ⟨N⟩ √⟨ΔN²⟩

The second figure is the punchline: plot the relative fluctuation and the compressibility together as a fluid is cooled toward its critical point. Both climb, then blow up at TcT_c. The molky glow of critical opalescence is this divergence made visible — the density fluctuations grow to the wavelength of light and scatter it.

Figure
Punchline: as T → T_c the isothermal compressibility κ_T diverges, so the relative density fluctuation √⟨ΔN²⟩/⟨N⟩ climbs off a flat 1/√⟨N⟩ baseline and blows up — the onset of critical opalescence.
temperature T → fluctuation / κ_T T_c κ_T (compressibility) √⟨ΔN²⟩/⟨N⟩ flat 1/√⟨N⟩ baseline (ideal gas)

The core equations

The grand canonical ensemble weights each microstate by e−β(E−μN)e^{-\beta(E-\mu N)} and sums over all particle numbers. The grand partition function Ξ\Xi generates the moments of NN: one μ\mu-derivative gives the mean, a second gives the variance. This is the whole engine of the relation.

Ξ(T,V,μ)=∑N=0∞∑ie−β(Ei−μN),⟨N⟩=1β∂ln⁡Ξ∂μ∣T,V(1)\Xi(T,V,\mu)=\sum_{N=0}^{\infty}\sum_{i}e^{-\beta(E_i-\mu N)},\qquad \langle N\rangle = \frac{1}{\beta}\frac{\partial\ln\Xi}{\partial\mu}\bigg|_{T,V} \qquad (1)

where: β=1/kBT\beta=1/k_BT; μ\mu — chemical potential fixed by the reservoir; the double sum runs over particle number NN and, for each NN, over microstates ii. The first μ\mu-derivative of ln⁡Ξ\ln\Xi pulls down a factor βN\beta N, so it returns the mean occupancy. Differentiating a second time turns the mean into the variance. This is the fluctuation–response step: the response of ⟨N⟩\langle N\rangle to a shift in μ\mu equals the fluctuation ⟨ΔN2⟩\langle\Delta N^2\rangle.

⟨ΔN2⟩≡⟨N2⟩−⟨N⟩2=1β2∂2ln⁡Ξ∂μ2=kBT(∂⟨N⟩∂μ)T,V(2)\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} = k_BT\left(\frac{\partial\langle N\rangle}{\partial\mu}\right)_{T,V} \qquad (2)

where: the middle form is the raw second cumulant of ln⁡Ξ\ln\Xi; the right form rewrites it as kBTk_BT times a susceptibility. Reading it physically: how strongly the mean number responds to a chemical-potential nudge is exactly how strongly it spontaneously fluctuates. To reach the compressibility we convert the μ\mu-susceptibility into a mechanical one. Using the Gibbs–Duhem relation and (∂μ/∂N)T,V(\partial\mu/\partial N)_{T,V}, the density derivative becomes the isothermal compressibility.

  ⟨ΔN2⟩=kBT ⟨N⟩2V κT  ,κT≡−1V(∂V∂P)T,N(3)\boxed{\;\langle\Delta N^2\rangle = k_BT\,\frac{\langle N\rangle^2}{V}\,\kappa_T\;},\qquad \kappa_T\equiv-\frac{1}{V}\left(\frac{\partial V}{\partial P}\right)_{T,N} \qquad (3)

where: κT\kappa_T — isothermal compressibility (units Pa−1\mathrm{Pa}^{-1}), the fractional volume change per unit pressure at fixed T,NT,N. A large κT\kappa_T (soft fluid) means large density fluctuations. This is the compressibility–fluctuation relation. The same content, expressed as scattering physicists use it, is the long-wavelength limit of the static structure factor — the dimensionless normalized variance.

S(0)=⟨ΔN2⟩⟨N⟩=n kBT κT,n=⟨N⟩V(4)S(0)=\frac{\langle\Delta N^2\rangle}{\langle N\rangle}=n\,k_BT\,\kappa_T,\qquad n=\frac{\langle N\rangle}{V} \qquad (4)

where: S(0)S(0) — the forward (q→0q\to0) static structure factor, measured directly by X-ray/neutron scattering; nn — number density. For an ideal gas S(0)=1S(0)=1; correlations push it above or below unity.

Derivation ANumber fluctuations from two derivatives of the grand partition function

The goal is to show, from first principles and with no thermodynamic input yet, that the variance of the particle number in an open system equals kBTk_BT times the susceptibility ∂⟨N⟩/∂μ\partial\langle N\rangle/\partial\mu. The strategy is purely generating-function algebra: write ⟨N⟩\langle N\rangle as the first logarithmic derivative of Ξ\Xi with respect to μ\mu, then differentiate once more and recognize the second cumulant. This is the cleanest example of a fluctuation–response identity, and it needs only that Ξ\Xi is a sum of Boltzmann–Gibbs weights.

Step 1. Start from the grand-canonical probability of a microstate, pi,N=e−β(Ei−μN)/Ξp_{i,N}=e^{-\beta(E_i-\mu N)}/\Xi. The mean particle number is ⟨N⟩=∑i,NN pi,N\langle N\rangle=\sum_{i,N}N\,p_{i,N}. Because each weight carries the factor eβμNe^{\beta\mu N}, taking ∂/∂μ\partial/\partial\mu of ln⁡Ξ\ln\Xi brings down exactly βN\beta N inside the average.

Step 2. Therefore ∂ln⁡Ξ∂μ=1Ξ∂Ξ∂μ=β⟨N⟩\dfrac{\partial\ln\Xi}{\partial\mu}=\dfrac{1}{\Xi}\dfrac{\partial\Xi}{\partial\mu}=\beta\langle N\rangle, which is equation (1).

Step 3. Differentiate once more: ∂2ln⁡Ξ∂μ2=β∂⟨N⟩∂μ\dfrac{\partial^2\ln\Xi}{\partial\mu^2}=\beta\dfrac{\partial\langle N\rangle}{\partial\mu}. But the left side is also the second cumulant of the generating function, β2(⟨N2⟩−⟨N⟩2)\beta^2(\langle N^2\rangle-\langle N\rangle^2), because a second derivative of ln⁡Ξ\ln\Xi always produces the variance of the conjugate variable. Why this works. The logarithm is the key: the first derivative of ln⁡Ξ\ln\Xi is a mean, the second is a variance, the third a skewness — cumulants, not moments. This is why ln⁡Ξ\ln\Xi (not Ξ\Xi) is the natural object.

Step 4. Equate the two expressions for ∂2ln⁡Ξ/∂μ2\partial^2\ln\Xi/\partial\mu^2: β2⟨ΔN2⟩=β ∂⟨N⟩/∂μ\beta^2\langle\Delta N^2\rangle=\beta\,\partial\langle N\rangle/\partial\mu, hence ⟨ΔN2⟩=kBT ∂⟨N⟩/∂μ\langle\Delta N^2\rangle=k_BT\,\partial\langle N\rangle/\partial\mu, which is equation (2).

Step 5. Test on the ideal classical gas, where Ξ=ezZ1\Xi=e^{zZ_1} with fugacity z=eβμz=e^{\beta\mu} and single-particle Z1Z_1. Then ln⁡Ξ=zZ1\ln\Xi=zZ_1, ⟨N⟩=∂μln⁡Ξ/β=zZ1\langle N\rangle=\partial_\mu\ln\Xi/\beta=zZ_1, and ∂μ2ln⁡Ξ/β2=zZ1\partial^2_\mu\ln\Xi/\beta^2=zZ_1 again, so ⟨ΔN2⟩=⟨N⟩\langle\Delta N^2\rangle=\langle N\rangle — the Poisson result. Verified: symbolic differentiation of ln⁡Ξ=zZ1\ln\Xi=zZ_1 gives ⟨N⟩=⟨ΔN2⟩=zZ1\langle N\rangle=\langle\Delta N^2\rangle=zZ_1, and ⟨ΔN2⟩/⟨N⟩=1/⟨N⟩\sqrt{\langle\Delta N^2\rangle}/\langle N\rangle=1/\sqrt{\langle N\rangle}, all confirmed in verify_aq-sm-compressibility-number-fluctuations.py.

Go deeper · Derivation B · 1 minFrom the μ-susceptibility to the isothermal compressibility
Derivation BFrom the μ-susceptibility to the isothermal compressibility

The goal is to convert the microscopic susceptibility ∂⟨N⟩/∂μ\partial\langle N\rangle/\partial\mu into the macroscopic, piston-measurable compressibility κT\kappa_T, arriving at the boxed relation (3). The bridge is the Gibbs–Duhem relation at fixed TT, which ties changes in μ\mu to changes in pressure, together with the fact that at fixed T,VT,V the chemical potential depends on NN only through the density n=N/Vn=N/V.

Step 1. At fixed TT and VV, μ\mu is a function of the density n=⟨N⟩/Vn=\langle N\rangle/V alone (intensive), so (∂⟨N⟩/∂μ)T,V=V(∂n/∂μ)T=V/(∂μ/∂n)T(\partial\langle N\rangle/\partial\mu)_{T,V}=V(\partial n/\partial\mu)_{T}= V\big/(\partial\mu/\partial n)_T.

Step 2. The Gibbs–Duhem relation at fixed TT reads n dμ=dPn\,d\mu=dP, i.e. (∂μ/∂n)T=(1/n)(∂P/∂n)T(\partial\mu/\partial n)_T=(1/n)(\partial P/\partial n)_T. Substituting, (∂⟨N⟩/∂μ)T,V=Vn/(∂P/∂n)T(\partial\langle N\rangle/\partial\mu)_{T,V}=Vn\big/(\partial P/\partial n)_T.

Step 3. Express (∂P/∂n)T(\partial P/\partial n)_T through the compressibility. Since n=N/Vn=N/V at fixed NN, a density change is a volume change: (∂P/∂n)T=−Vn1  ?  (\partial P/\partial n)_T = -\dfrac{V}{n}\dfrac{1}{\;?\;} — carefully, κT=−1V(∂V/∂P)T\kappa_T=-\frac1V(\partial V/\partial P)_T gives (∂P/∂n)T=1/(nκT)(\partial P/\partial n)_T = 1/(n\kappa_T) after using dn/n=−dV/Vdn/n=-dV/V. Why the density trick. Holding T,VT,V fixed and varying NN is thermodynamically equivalent to holding T,NT,N and varying VV — both change the density — so the mechanical compressibility (a VV-derivative) can stand in for the number susceptibility (an NN-derivative).

Step 4. Combine: (∂⟨N⟩/∂μ)T,V=Vn⋅nκT=Vn2κT=⟨N⟩2κT/V(\partial\langle N\rangle/\partial\mu)_{T,V}=Vn\cdot n\kappa_T=V n^2\kappa_T=\langle N\rangle^2\kappa_T/V. Insert into equation (2): ⟨ΔN2⟩=kBT⟨N⟩2κT/V\langle\Delta N^2\rangle=k_BT\langle N\rangle^2\kappa_T/V, the boxed result (3).

Step 5. Consistency on the ideal gas: κT=1/P\kappa_T=1/P and P=nkBTP=nk_BT give ⟨ΔN2⟩=kBT ⟨N⟩2(1/P)/V=kBT⟨N⟩2/(nkBTV)=⟨N⟩\langle\Delta N^2\rangle=k_BT\,\langle N\rangle^2(1/P)/V=k_BT\langle N\rangle^2/(nk_BT V)=\langle N\rangle. It reproduces the Poisson answer of the previous card — the two routes agree. Verified: substituting κT=1/P\kappa_T=1/P, P=NkBT/VP=Nk_BT/V into kBT⟨N⟩2κT/Vk_BT\langle N\rangle^2\kappa_T/V returns exactly ⟨N⟩\langle N\rangle symbolically (verify script), and S(0)=nkBTκT=1S(0)=n k_BT\kappa_T=1 for the ideal gas.

Limiting cases

The relation interpolates between quiet macroscopic samples and violent critical fluctuations; the same formula covers both.

CaseResultMeaning
Ideal classical gas⟨ΔN2⟩=⟨N⟩\langle\Delta N^2\rangle=\langle N\rangle, S(0)=1S(0)=1Poisson statistics; particles independent, no correlations.
Large box, ⟨N⟩→∞\langle N\rangle\to\infty⟨ΔN2⟩/⟨N⟩=1/⟨N⟩→0\sqrt{\langle\Delta N^2\rangle}/\langle N\rangle=1/\sqrt{\langle N\rangle}\to0Relative fluctuations vanish — the thermodynamic limit; densities are sharp.
Nanoscale box, ⟨N⟩∼1\langle N\rangle\sim1relative fluctuation ∼1\sim1Fluctuations dominate; "the density" of a few molecules is not well defined.
Approach to critical pointκT→∞\kappa_T\to\infty, ⟨ΔN2⟩→∞\langle\Delta N^2\rangle\to\inftyDensity fluctuations diverge; critical opalescence, scattering blows up.
Incompressible liquid, κT→0\kappa_T\to0⟨ΔN2⟩→0\langle\Delta N^2\rangle\to0Stiff systems barely fluctuate; S(0)≪1S(0)\ll1 (strong short-range order).

Worked examples

Example 1 — Counting fluctuations in a micron cube of argon (enumerate, apply, boundary number). Take argon at STP (T=273.15 KT=273.15\,\mathrm{K}, P=101325 PaP=101325\,\mathrm{Pa}) and a fixed open box V=1 μm3=10−18 m3V=1\,\mu\mathrm{m}^3=10^{-18}\,\mathrm{m}^3.

Step 1. Mean occupancy from the ideal-gas law, ⟨N⟩=PV/(kBT)\langle N\rangle=PV/(k_BT). Numerically ⟨N⟩=(101325)(10−18)/((1.380649×10−23)(273.15))=2.69×107\langle N\rangle=(101325)(10^{-18})/((1.380649\times10^{-23})(273.15))=\mathbf{2.69\times10^{7}} molecules.

Step 2. Because argon at STP is nearly ideal, ⟨ΔN2⟩=⟨N⟩\langle\Delta N^2\rangle=\langle N\rangle, so the standard deviation is ⟨N⟩=2.69×107≈5.18×103\sqrt{\langle N\rangle}=\sqrt{2.69\times10^{7}}\approx5.18\times10^{3} molecules.

Step 3. Relative fluctuation ⟨N⟩/⟨N⟩=1/⟨N⟩=1.93×10−4\sqrt{\langle N\rangle}/\langle N\rangle=1/\sqrt{\langle N\rangle}=\mathbf{1.93\times10^{-4}}, i.e. about 0.02%0.02\%. The count is sharp to four significant figures — this is why "density" is a well-defined field for macroscopic samples.

Step 4. Boundary number: shrink the box to 1 nm3=10−27 m31\,\mathrm{nm}^3=10^{-27}\,\mathrm{m}^3. Then ⟨N⟩=2.69×107×10−9=0.0269\langle N\rangle=2.69\times10^{7}\times10^{-9}=\mathbf{0.0269} — on average the box is empty, and the relative fluctuation is order unity. At the nanoscale, number fluctuations are the whole story.

Example 2 — Reading the compressibility off scattering. A neutron-scattering experiment on a simple liquid reports a forward structure factor S(0)=0.06S(0)=0.06 at T=300 KT=300\,\mathrm{K} and number density n=2.1×1028 m−3n=2.1\times10^{28}\,\mathrm{m^{-3}}.

Step 1. Invert equation (4): κT=S(0)/(nkBT)\kappa_T=S(0)/(n k_BT).

Step 2. Numerically κT=0.06/[(2.1×1028)(1.380649×10−23)(300)]=0.06/(8.70×107)=6.9×10−10 Pa−1\kappa_T=0.06/\big[(2.1\times10^{28})(1.380649\times10^{-23})(300)\big]=0.06/(8.70\times10^{7})=\mathbf{6.9\times10^{-10}\,Pa^{-1}}.

Step 3. Interpret: S(0)=0.06≪1S(0)=0.06\ll1 tells you the liquid is far stiffer than an ideal gas at the same density — strong short-range repulsion suppresses density fluctuations, and the measured κT\kappa_T (sub-nanopascal−1^{-1}) confirms it. Scattering has measured a bulk mechanical property without ever touching a piston.

Origins · 1 minstructure factor and how this was discovered
SF
structure factor
statistical-mechanics concept · scattering observable

The static structure factor S(q)S(q) is the Fourier transform of the density–density correlation function of a fluid, and its forward limit S(0)S(0) is precisely the normalized number-fluctuation variance ⟨ΔN2⟩/⟨N⟩=nkBTκT\langle\Delta N^2\rangle/\langle N\rangle=n k_BT\kappa_T. It is what a diffraction experiment actually measures: shine X-rays or neutrons on a sample and the scattered intensity at small angle is proportional to S(0)S(0). This turns an abstract statistical quantity — the variance of particle counts in an imaginary box — into a hard laboratory number, and it is the reason critical opalescence (a diverging S(0)S(0)) is not just calculable but visible to the eye as the fluid turns milky near its critical point.

History
1859
— Maxwell's kinetic theory establishes molecular velocity statistics, the backdrop for fluctuation ideas.
1902
— Gibbs's Elementary Principles in Statistical Mechanics formalizes the grand canonical ensemble.
1908
— Smoluchowski and Einstein connect density fluctuations to compressibility and explain critical opalescence.
1910
— Einstein's fluctuation theory quantitatively predicts light scattering from density fluctuations.
1914
— Ornstein and Zernike introduce the direct correlation function, refining the structure-factor picture near criticality.

Going further

References. Pathria & Beale, Statistical Mechanics, 4th ed., §4.5 (density fluctuations in the grand canonical ensemble) and §3.6 · Landau & Lifshitz, Statistical Physics Part 1, §112–114 (fluctuations) · Reif, Fundamentals of Statistical and Thermal Physics, §7.7 · Hansen & McDonald, Theory of Simple Liquids, Ch. 3 (structure factor) · Chaikin & Lubensky, Principles of Condensed Matter Physics, Ch. 2.

Provenance. The two forms ⟨ΔN2⟩=kBT ∂⟨N⟩/∂μ=kBT⟨N⟩2κT/V\langle\Delta N^2\rangle=k_BT\,\partial\langle N\rangle/\partial\mu=k_BT\langle N\rangle^2\kappa_T/V and S(0)=nkBTκTS(0)=n k_BT\kappa_T are standard (Pathria §4.5, Landau–Lifshitz §114). A verifier should confirm: (i) two μ\mu-derivatives of ln⁡Ξ=zZ1\ln\Xi=zZ_1 give ⟨N⟩=⟨ΔN2⟩=zZ1\langle N\rangle=\langle\Delta N^2\rangle=zZ_1; (ii) substituting κT=1/P\kappa_T=1/P, P=NkBT/VP=Nk_BT/V into kBT⟨N⟩2κT/Vk_BT\langle N\rangle^2\kappa_T/V returns ⟨N⟩\langle N\rangle; (iii) the numeric ⟨N⟩=PV/kBT=2.69×107\langle N\rangle=PV/k_BT=2.69\times10^7 for a 1 μm31\,\mu\mathrm{m}^3 argon box at STP, relative fluctuation 1.93×10−41.93\times10^{-4}; (iv) the vdW critical isotherm has (∂P/∂V)T=0(\partial P/\partial V)_T=0 at Vc=3bV_c=3b, Tc=8a/27bRT_c=8a/27bR, forcing κT→∞\kappa_T\to\infty. All checks are in verify_aq-sm-compressibility-number-fluctuations.py. Constants: kB=1.380649×10−23 J/Kk_B=1.380649\times10^{-23}\,\mathrm{J/K}.

Builds on: Grand Canonical Ensemble · Grand Partition Function · Gibbs Factor and Chemical Potential · Heat Capacity and Fluctuation-Response Relation · Thermodynamic Quantities from the Partition Function Leads to: Energy Fluctuations in the Canonical Ensemble · Helmholtz Free Energy from the Partition Function · Critical Opalescence

Why use the grand canonical ensemble instead of the canonical one?

Because number fluctuations only exist when NN is allowed to vary. The canonical ensemble fixes NN exactly, so ⟨ΔN2⟩=0\langle\Delta N^2\rangle=0 by construction there. The grand canonical ensemble fixes the chemical potential μ\mu of a reservoir and lets NN float, which is exactly the physical situation of an open subvolume inside a larger fluid. The two ensembles give identical thermodynamics in the thermodynamic limit, but only the grand canonical one can talk about density fluctuations at all.

Is ⟨ΔN²⟩=⟨N⟩ always true, or only for ideal gases?

Only for the ideal classical gas, where particles are statistically independent and NN follows a Poisson distribution. Interactions change it: repulsive short-range forces (like in a dense liquid) suppress fluctuations, giving ⟨ΔN2⟩<⟨N⟩\langle\Delta N^2\rangle<\langle N\rangle and S(0)<1S(0)<1; attractive correlations and proximity to a critical point enhance them, giving ⟨ΔN2⟩>⟨N⟩\langle\Delta N^2\rangle>\langle N\rangle and S(0)>1S(0)>1. The general statement is always ⟨ΔN2⟩=kBT⟨N⟩2κT/V\langle\Delta N^2\rangle=k_BT\langle N\rangle^2\kappa_T/V; the Poisson case is just the ideal-gas value of κT=1/P\kappa_T=1/P.

What exactly diverges at the critical point?

The isothermal compressibility κT\kappa_T diverges because the critical isotherm is flat there: (∂P/∂V)T=0(\partial P/\partial V)_T=0, so κT=−1V(∂V/∂P)T→∞\kappa_T=-\frac1V(\partial V/\partial P)_T\to\infty. Through equation (3), ⟨ΔN2⟩\langle\Delta N^2\rangle diverges with it. Physically, the free-energy cost of a density fluctuation vanishes, so fluctuations of all sizes proliferate, correlations become long-ranged, and the fluid scatters light of every wavelength — the milky glow of critical opalescence.

How is this a "fluctuation–response" theorem?

Equation (2), ⟨ΔN2⟩=kBT ∂⟨N⟩/∂μ\langle\Delta N^2\rangle=k_BT\,\partial\langle N\rangle/\partial\mu, has a spontaneous fluctuation on the left and a driven response on the right: the left is how much NN jitters on its own; the right is how much ⟨N⟩\langle N\rangle shifts when you push on μ\mu. They are equal. This is the same structure as ⟨ΔE2⟩=kBT2CV\langle\Delta E^2\rangle=k_BT^2C_V (energy fluctuation = heat-capacity response) and ⟨ΔM2⟩=kBTχ\langle\Delta M^2\rangle=k_BT\chi (magnetization fluctuation = susceptibility). All are avatars of the fluctuation–dissipation theorem, valid in equilibrium.

Does the compressibility have to be positive?

Yes, for a thermodynamically stable phase: κT>0\kappa_T>0 is a stability requirement (a stable system contracts when squeezed). Through equation (3) this guarantees ⟨ΔN2⟩>0\langle\Delta N^2\rangle>0 — the variance is manifestly non-negative, as it must be. A formally negative κT\kappa_T signals a mechanically unstable state (the interior loop of a van der Waals isotherm), which is not a real equilibrium phase and is removed by the Maxwell construction. The fluctuation relation and thermodynamic stability are two faces of the same positivity.

Can I measure these fluctuations directly?

Yes, in two very different arenas. Scattering (X-ray, neutron, light) measures S(0)S(0), hence κT\kappa_T, in bulk fluids and near critical points — this is decades-old technology. More recently, quantum-gas microscopes literally image and count atoms in subregions of an optical lattice, giving ⟨ΔN2⟩\langle\Delta N^2\rangle site by site; the measured fluctuations serve as an in-situ thermometer and reveal quantum statistics (sub-Poissonian for a Mott insulator). The imaginary counting box of the derivation has become a real, imaged region of atoms.

Why does the variance scale with ⟨N⟩² times κ_T rather than just ⟨N⟩?

The two factors of ⟨N⟩\langle N\rangle and the 1/V1/V combine to give ⟨N⟩⋅(nκTkBT)\langle N\rangle\cdot(n\kappa_T k_BT), i.e. ⟨N⟩×S(0)\langle N\rangle\times S(0). So the variance is extensive — it scales linearly with ⟨N⟩\langle N\rangle — while S(0)=nkBTκTS(0)=n k_BT\kappa_T is the intensive, per-particle factor set by correlations. Writing it as ⟨N⟩2κT/V\langle N\rangle^2\kappa_T/V makes the compressibility explicit; writing it as ⟨N⟩S(0)\langle N\rangle S(0) makes the extensivity explicit. They are the same statement.

Before this

Where this leads