Home / Learn / Exam prep / GATE Physics / Lesson 5.1
All lessons

Module 5: Thermodynamics and statistical physics · Lesson 5.1 · about 40 min

Microstates, entropy and the statistical ensembles

How statistical mechanics turns counting into thermodynamics: microstates and macrostates, Boltzmann and Gibbs entropy, temperature from S(E), the microcanonical, canonical and grand canonical ensembles, fluctuations, Liouville’s theorem and negative temperature.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 5 · about 40 minutes. By the end you will be able to count microstates, get the temperature of an isolated system from its entropy, choose the right ensemble for a problem, compute energy and particle-number fluctuations, and explain why all ensembles agree for large systems (and when they do not). Thermodynamics itself (entropy, potentials, Maxwell relations) is in the IIT JAM lessons on the second law and thermodynamic potentials; here we derive it from counting.

A macroscopic state is compatible with an astronomically large number of microscopic arrangements. Entropy is the logarithm of that number, and every equilibrium property follows from how this number changes with energy, volume and particle number.

1. Microstates, macrostates and the basic postulate

A microstate says exactly what every particle is doing (every quantum number, or a point in phase space). A macrostate gives only a few numbers: E, V, N, perhaps a magnetisation. The basic postulate of statistical mechanics:

Equal a priori probabilities
In an isolated system in equilibrium, every accessible microstate (consistent with the fixed E, V, N) is equally likely.
Ω(E, V, N)
the number of accessible microstates. For classical systems, the phase-space volume of the energy shell divided by h3N (and N! for identical particles).
Physical meaning
Macrostates are not equally likely. The one with the most microstates wins, overwhelmingly, which is why systems evolve towards equilibrium and stay there.

Worked example (spins). N distinguishable spin-1/2 moments in zero field: the macrostate “n up” has Ω=(Nn) microstates. For N=100 the middle one, n=50, has 1.0×1029, about 8% of all 2100; for N=1023 the fluctuations about the middle are only ∼N/N∼10−11.5 of the total.

Einstein solid. N oscillators sharing q quanta: Ω=(q+N−1q) (stars and bars: arrange q quanta and N−1 dividers). This one formula drives most of the counting problems examiners set.

2. Entropy and temperature from counting

Boltzmann defined

S=kln⁡Ω,1T=(∂S∂E)V,N,PT=(∂S∂V)E,N,μT=−(∂S∂N)E,V

Why is this the temperature? Put two systems in thermal contact. The combined number of states is Ω1(E1)Ω2(E−E1); it is overwhelmingly peaked where ∂ln⁡Ω1/∂E1=∂ln⁡Ω2/∂E2. So the quantity that becomes equal in equilibrium is ∂S/∂E: that is what thermometers read.

Worked example (ideal gas from counting). For a monatomic ideal gas the phase-space volume gives Ω∝VNE3N/2. Then 1/T=3N2k/E, so E=32NkT, and P/T=Nk/V: the ideal gas law, with no kinetic theory at all.

The Gibbs entropy generalises Boltzmann’s to any probability distribution over microstates:

S=−k∑ipiln⁡pi

It reduces to kln⁡Ω when all pi=1/Ω, and it is largest for the uniform distribution. Maximising it with the mean energy fixed gives pi∝e−βEi, the canonical distribution, with β appearing as a Lagrange multiplier.

3. The three ensembles

An ensemble is an imagined collection of copies of the system, one per microstate, weighted by probability. Which one you use depends on what crosses the boundary.

Ensemble What is fixed Probability of a microstate Bridge to thermodynamics
microcanonical E,V,N 1/Ω S=kln⁡Ω
canonical T,V,N e−βEi/Z F=−kTln⁡Z
grand canonical T,V,μ e−β(Ei−μNi)/𝒵 ΦG=−kTln⁡𝒵=−PV

The canonical rule follows from the microcanonical one. A small system in contact with a huge reservoir: the probability of a system microstate of energy Ei is proportional to the number of reservoir states left, ΩR(Etot−Ei). Expand the logarithm:

ln⁡ΩR(Etot−Ei)≈ln⁡ΩR(Etot)−Ei∂ln⁡ΩR∂E=const−EikT

so Pi∝e−Ei/kT. Let particles cross as well and the same expansion adds +μNi/kT. The fugacity z=eβμ then weights each particle.

Worked example (a tiny reservoir). A two-level unit (levels 0, ε) shares 4ε with an Einstein solid of 3 oscillators. Excited: the solid holds 3 quanta, (53)=10 states. Ground: 4 quanta, (64)=15. So P1=10/25=0.4. With a huge reservoir the ratio ΩR(E−ε)/ΩR(E) would become exactly e−ε/kT.

4. Fluctuations and why ensembles agree

In the canonical ensemble the energy is not fixed. Differentiating Z=∑e−βEi:

⟨E⟩=−∂ln⁡Z∂β,⟨(ΔE)2⟩=∂2ln⁡Z∂β2=kT2CV

Both ⟨E⟩ and CV are proportional to N, so ΔE/⟨E⟩∝1/N. For a monatomic gas it is exactly 2/3N. Similarly, in the grand canonical ensemble

⟨(ΔN)2⟩=kT(∂⟨N⟩∂μ)T,V=⟨N⟩2kTκTV

which is ⟨N⟩ (Poisson statistics) for the ideal gas. Move N in the figure: the distribution of energy per particle narrows to a spike.

The canonical energy distribution P(E) ∝ Ω(E)e−E/kT for N two-level units. Ω(E) rises steeply and e−E/kT falls; their product is a peak whose relative width shrinks as 1/√N. For a macroscopic system the energy is effectively fixed, so canonical and microcanonical answers coincide.

The exception is a critical point: there CV or κT diverge, fluctuations become huge (critical opalescence) and the choice of ensemble matters for finite systems (lesson 5.7).

5. Phase space, Liouville and ergodicity

Classical microstates are points in a 6N-dimensional phase space. Two facts make the ensemble picture consistent:

  • Liouville’s theorem. Hamilton’s equations make the flow of phase points incompressible: dρ/dt=∂ρ/∂t+{ρ,H}=0. A uniform distribution on the energy shell stays uniform, so the microcanonical ensemble is stationary.
  • Ergodic hypothesis. A single system, followed long enough, spends equal times in equal areas of its energy shell, so time averages (what we measure) equal ensemble averages (what we compute).

Counting quantum states from phase space: one state per volume h per degree of freedom. For the 1D oscillator the region H≤E is an ellipse of area 2πE/ω, giving E/ℏω states, in agreement with the levels (n+12)ℏω. In many dimensions almost all of the volume of a ball lies in a thin outer shell (99% shell of a 100-dimensional ball: 63% of the volume), so “states below E” and “states near E” give the same entropy.

6. Negative temperature

For N two-level units (levels 0, ε) with n excited, Stirling’s formula gives

Sk≈Nln⁡N−nln⁡n−(N−n)ln⁡(N−n),1kT=1εln⁡N−nn

S(E) rises, peaks at n=N/2 and falls again. Beyond the peak T<0. This needs an energy spectrum with an upper bound (spins in a field, lasing atoms); a free gas can never do it.

Worked example. Nuclear spins with splitting 1.0 meV, prepared with 60% in the upper level: 1/kT=ε−1ln⁡(0.4/0.6), so T=−28.6 K.

“A system at −200 K is colder than one at +300 K.” No. Heat flows from small β=1/kT to large β, and β−200<0<β300. A negative-temperature system is hotter than any positive-temperature one: the order of hotness is +0 K, …, +∞, then −∞, …, −0 K. Order temperatures by −β, not by T.

  • S=kln⁡Ω; 1/T=∂S/∂E, P/T=∂S/∂V, μ/T=−∂S/∂N. Gibbs entropy −k∑pln⁡p reduces to it for equal probabilities.
  • Counting: (Nn) for two-state units, (q+N−1q) for an Einstein solid.
  • Microcanonical (E,V,N): p=1/Ω. Canonical (T,V,N): p∝e−βE, F=−kTln⁡Z. Grand canonical (T,V,μ): p∝e−β(E−μN), PV=kTln⁡𝒵.
  • ⟨(ΔE)2⟩=kT2CV, ⟨(ΔN)2⟩=kT∂⟨N⟩/∂μ; relative fluctuations ∼N−1/2 except near critical points.
  • Liouville: phase-space volume is conserved; ergodicity links time and ensemble averages.
  • Bounded spectra allow T<0, which is hotter than any positive temperature.

Practise: exam questions on this lesson

They start easy and climb to top-rank level. Check each answer, then read the full solution. More on the GATE practice page.

Next: lesson 5.2, partition functions, where the canonical ensemble becomes a working tool for two-level systems, oscillators, rotors and paramagnets. fibub’s Ising model simulator shows microstates being sampled with the Boltzmann weight in real time.

Going on to CSIR NET? Fluctuations, diffusion and Brownian motion asks how far a system strays from these averages.

Check yourself

1Which quantities are fixed in the canonical ensemble?
2For N two-level units isolated with more than half of them excited, the temperature is
3In the canonical ensemble the variance of the energy equals

Sources

  • R. K. Pathria and P. D. Beale, Statistical Mechanics, 4th ed. (Academic Press, 2021), chapters 1 to 4
  • K. Huang, Statistical Mechanics, 2nd ed. (Wiley, 1987), chapters 6 and 7
  • F. Reif, Fundamentals of Statistical and Thermal Physics (McGraw-Hill, 1965; reissued 2009), chapters 2 to 6
  • D. V. Schroeder, An Introduction to Thermal Physics (Addison-Wesley, 2000), chapters 2, 3 and 6
  • GATE Physics (PH) syllabus, Statistical Physics section, published by the organising institute each year

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Not affiliated with the IITs, IISc or the GATE organising institute. The general aptitude part of GATE is not covered here. Check the official GATE website for the current pattern. All questions are original.