Statistical Mechanics

Chemical Potential

The pressure that drives particles to move

Chemical potential (μ) is the energy it costs to add one more particle to a system at fixed temperature and volume — the thermodynamic "pressure" for particle number. Just as heat flows from hot to cold, particles flow from high chemical potential to low, and they keep flowing until μ is equal everywhere. That equalization defines diffusive equilibrium, sets where phase boundaries sit, fixes the Fermi level in semiconductors, and supplies the voltage of every battery.

  • Definitionμ = (∂G/∂N)T,P = (∂U/∂N)S,V
  • Ideal gasμ = kT · ln(n / n_Q)
  • Equilibrium conditionμ₁ = μ₂ across any movable boundary
  • Air at 300 K, 1 atmμ ≈ −0.5 eV per molecule
  • SI unitsJ/mol (or J/particle, or eV)
  • Introduced byJ. Willard Gibbs, 1876

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The intuition: particles roll downhill in μ

Thermodynamics has three great "potentials" that decide which way things spontaneously move. Temperature tells heat where to flow — always hot to cold. Pressure tells volume where to expand — always high to low. Chemical potential tells particles where to go — always from high μ to low μ. The three are exact siblings, and the chemical potential is the one most people never meet, even though it quietly governs diffusion, osmosis, evaporation, batteries, and the entire behavior of electrons in solids.

The cleanest definition is operational: μ is the change in a system's energy when you slip in one extra particle, holding the right things fixed. Add a molecule to a crowded, high-energy region and you pay a lot — that region has high μ. Add it to a sparse, low-energy region and you pay little — low μ. Open a door between the two, and particles move down the μ "hill" until the cost of adding a particle is the same on both sides. At that point net flow stops. The system is in diffusive equilibrium.

Formal definition

The chemical potential is a partial derivative of a thermodynamic potential with respect to particle number N. Which variables you hold fixed picks which potential you differentiate, but the resulting μ is the same physical quantity:

μ = (∂U/∂N)_{S,V}      energy U, at fixed entropy and volume
μ = (∂F/∂N)_{T,V}      Helmholtz free energy F, at fixed T and V
μ = (∂G/∂N)_{T,P}      Gibbs free energy G, at fixed T and P
μ = −T (∂S/∂N)_{U,V}   entropy form

The Gibbs form is the most practical, because lab conditions are usually constant temperature and pressure. It also gives a beautiful result for a pure substance: because G is extensive (double the amount, double G), the Gibbs free energy is exactly μN, so

μ = G / N        (chemical potential = molar Gibbs free energy)

Chemical potential enters the fundamental thermodynamic identity as the term that accounts for changing particle number:

dU = T dS − P dV + μ dN

Read that last term directly: when N increases by dN at fixed S and V, the energy goes up by μ dN. For a mixture of several species i, the term generalizes to a sum Σ μ_i dN_i, with one chemical potential per species.

The ideal-gas formula and real numbers

For a classical ideal gas, statistical mechanics delivers an explicit chemical potential:

μ = kT · ln( n / n_Q )

where n   = N/V        (number density)
      n_Q = (m kT / 2πℏ²)^{3/2}   (quantum concentration)

The quantum concentration n_Q is roughly one particle per cube of side equal to the thermal de Broglie wavelength. When the gas is dilute, n ≪ n_Q, the logarithm is negative, and μ is negative — adding a particle is "free energy favorable" because the entropy you gain outweighs the energy you spend. For nitrogen in air at 300 K and 1 atm, n ≈ 2.5 × 10²⁵ m⁻³ while n_Q ≈ 10³⁰ m⁻³, giving

μ ≈ kT · ln(2.5×10²⁵ / 1×10³⁰) ≈ (0.0259 eV)·(−10.6) ≈ −0.27 to −0.5 eV

The chemical potential rises with density: a more equivalent way to write the gas law is μ(P) = μ° + kT·ln(P/P°). Compress the gas — raise P — and μ climbs. This is why gas flows from high pressure to low pressure: it is flowing from high μ to low μ. Pressure-driven flow and diffusion are the same phenomenon seen through two different variables.

Equilibrium: μ equalizes, not concentration

The single most important — and most misremembered — fact about chemical potential is the equilibrium condition. When two systems can exchange particles freely, equilibrium is reached when their chemical potentials are equal:

μ₁ = μ₂        (diffusive / particle-exchange equilibrium)

It is not "concentration equal everywhere." Concentration uniformity is only the special case where nothing else affects μ. In general μ also depends on temperature, on external potential energy, and on electric potential, so equilibrium can leave a perfectly stable concentration gradient in place. Three real examples:

  • The atmosphere. Air is denser at sea level than at altitude, yet it is in equilibrium. Gravity adds a term mgh to μ, so μ = kT·ln(n) + mgh = const, which gives the barometric formula n(h) = n₀·exp(−mgh/kT). The concentration gradient is exactly what keeps μ flat.
  • A battery at open circuit. Electrons sit at very different concentrations in the two electrodes but do not flow, because the electrochemical potential — μ plus the electric term qφ — is balanced. The mismatch in chemical potential alone is precisely the cell voltage.
  • A semiconductor junction. p-type and n-type silicon have wildly different carrier densities, yet when joined the Fermi level (the electron chemical potential) is flat across the device. The leftover difference shows up as the built-in voltage of the diode.

Chemical potential vs. its thermodynamic siblings

PotentialConjugate variable it pushesFlow ruleEquilibrium condition
Temperature TEntropy / heat (S)Heat flows hot → coldT₁ = T₂
Pressure PVolume (V)Volume expands high P → low PP₁ = P₂
Chemical potential μParticle number (N)Particles flow high μ → low μμ₁ = μ₂
Voltage φCharge (q)Charge flows high φ → low φφ₁ = φ₂ (combined as μ + qφ)

The symmetry is exact and worth memorizing: each potential is the derivative of energy with respect to its conjugate "amount," and each spontaneous flow always reduces the imbalance until the two sides match.

Where μ comes from: the grand canonical ensemble

In statistical mechanics, chemical potential is the control knob for the grand canonical ensemble — the setup where a system exchanges both energy and particles with a reservoir. The probability of a microstate with energy E and N particles is

P(E, N) ∝ exp( −(E − μN) / kT )

The factor μN biases the system toward more or fewer particles. Crank μ up and the reservoir pushes particles in; turn it down and they leave. This is exactly how chemical potential controls the quantum statistics. In the Fermi–Dirac distribution the average occupation of a state at energy E is

f(E) = 1 / ( exp((E − μ)/kT) + 1 )

At T = 0 this is a sharp step: every state below μ is full, every state above is empty. That μ is the Fermi energy. In a copper wire it sits around 7 eV; "Fermi level" and "electron chemical potential" are two names for the same μ, and lining up Fermi levels across a contact is what equalizes electron chemical potential.

Phases and reactions

A substance always migrates toward whichever phase offers the lower chemical potential. Two phases coexist exactly when their chemical potentials are equal — that equality is the equation of every phase boundary on a phase diagram:

μ_solid(T, P) = μ_liquid(T, P)     defines the melting curve
μ_liquid(T, P) = μ_gas(T, P)       defines the boiling curve

For ice and liquid water at exactly 0 °C and 1 atm, μ_ice = μ_water, so they sit in equilibrium and neither grows. Nudge below 0 °C and μ_ice drops below μ_water, so water freezes. The slope of these coexistence curves is the Clausius–Clapeyron relation, which falls straight out of setting the two μ's equal.

For a chemical reaction with stoichiometric coefficients ν_i (negative for reactants, positive for products), the reaction runs until the weighted sum of chemical potentials — the affinity — vanishes:

Σ ν_i μ_i = 0        (chemical equilibrium)

The familiar relation ΔG° = −RT·ln K and the law of mass action are just this condition rewritten with μ_i = μ_i° + RT·ln(a_i), where a_i is the activity (concentration for dilute solutes, partial pressure for gases).

Python — diffusive equilibrium between two boxes

import math

kT = 0.0259  # eV at 300 K

def mu_ideal_gas(n, nQ=1e30):
    """Chemical potential of an ideal gas (eV) from number density n (per m^3)."""
    return kT * math.log(n / nQ)

# Two boxes, same volume, different particle counts. Let them exchange.
V = 1.0          # arbitrary equal volumes
N1, N2 = 8.0e25, 2.0e25
for step in range(6):
    mu1, mu2 = mu_ideal_gas(N1 / V), mu_ideal_gas(N2 / V)
    print(f"N1={N1:.2e} mu1={mu1:+.4f} eV | N2={N2:.2e} mu2={mu2:+.4f} eV | dmu={mu1-mu2:+.4f}")
    # particles hop down the mu gradient, proportional to the imbalance
    flow = 0.25 * (mu1 - mu2) / kT * (N1 + N2) / 2
    N1 -= flow
    N2 += flow

# Output: dmu shrinks toward 0 as N1 and N2 converge — equilibrium is mu1 == mu2,
# which here means equal density, not because density is the law but because
# nothing else (gravity, charge, T-gradient) is in play.

# Fermi-Dirac occupation: chemical potential as the "fill line"
def fermi(E, mu, kT_=kT):
    return 1.0 / (math.exp((E - mu) / kT_) + 1.0)

mu = 7.0  # eV, copper Fermi level
for E in [6.8, 6.95, 7.0, 7.05, 7.2]:
    print(f"E={E:.2f} eV  occupation f={fermi(E, mu):.3f}")
# f passes through exactly 0.5 at E = mu — the defining property of chemical potential.

Where chemical potential shows up

  • Diffusion and osmosis. Net particle flow always tracks the gradient of μ; osmotic pressure is the μ mismatch of the solvent across a membrane.
  • Phase changes. Melting, boiling, sublimation, and the entire phase diagram are loci of equal chemical potential between phases.
  • Chemistry. Reaction direction, equilibrium constants, and the law of mass action all reduce to Σν_i μ_i = 0.
  • Semiconductors. The Fermi level is the electron chemical potential; doping, junctions, and built-in voltages are all about lining μ up.
  • Batteries and fuel cells. Cell voltage equals the electrochemical-potential difference of the working ion divided by its charge.
  • Astrophysics. Degenerate electron and neutron gases in white dwarfs and neutron stars are described by their (huge) chemical potentials and Fermi pressure.
  • Bose–Einstein condensation. Condensation begins precisely when μ rises to meet the lowest energy level, μ → ε₀.

Common mistakes

  • Thinking equilibrium means equal concentration. Equilibrium means equal μ. With gravity, charge, or a temperature gradient present, equal μ leaves a real concentration gradient (e.g. the atmosphere).
  • Being surprised that μ is negative. For dilute classical gases μ is negative because adding a particle is entropically favorable. That is physically correct, not a sign error.
  • Holding the wrong variables fixed. μ = (∂U/∂N) only at constant S and V; at constant T and P you must use (∂G/∂N). Mixing the conditions gives the wrong derivative.
  • Forgetting the electric term for charged particles. Ions and electrons obey the electrochemical potential μ + qφ. Ignoring qφ misses the entire physics of batteries and junctions.
  • Treating "chemical potential" as something only chemists need. It is a purely thermodynamic quantity; the Fermi level, evaporation, and stellar degeneracy are all μ in disguise.
  • Confusing μ with potential energy. μ is a free energy per particle — it bundles internal energy, entropy, and external potential together; it is not just the potential energy of one particle.

Frequently asked questions

What is chemical potential in simple terms?

Chemical potential μ is the energy it costs to add one more particle to a system, holding temperature and volume fixed. It plays the same role for particle number that temperature plays for heat and pressure plays for volume: just as heat flows from hot to cold, particles flow from high chemical potential to low chemical potential. When two systems can exchange particles, they reach equilibrium when their chemical potentials are equal.

How is chemical potential related to Gibbs free energy?

Chemical potential is the partial derivative of a thermodynamic potential with respect to particle number. Most usefully, at constant temperature and pressure, μ = (∂G/∂N) where G is the Gibbs free energy. For a pure substance this means μ equals the molar Gibbs free energy: μ = G/N. Equivalently μ = (∂U/∂N) at constant S and V, or μ = (∂F/∂N) at constant T and V — the same quantity defined against different potentials.

Why is chemical potential usually negative for a classical gas?

For an ideal gas, μ = kT·ln(n/n_Q) where n is the particle density and n_Q is the quantum concentration. In the classical regime the gas is dilute, so n is much smaller than n_Q, the logarithm is negative, and μ comes out negative. This is correct: adding a particle to a dilute gas increases entropy a lot, and that entropy gain (T·ΔS) outweighs the energy cost, so the net free-energy change of adding a particle is negative. For air at room temperature μ ≈ −0.5 eV.

What is the difference between chemical potential and the Fermi level?

The Fermi level is the chemical potential of electrons in a solid. In the Fermi–Dirac distribution f(E) = 1/(exp((E−μ)/kT)+1), the symbol μ is the chemical potential, and at T = 0 it equals the Fermi energy E_F. In semiconductor physics "Fermi level" is the standard name for μ. When two materials touch (a diode junction, a battery electrode), electrons flow until the Fermi levels — the electron chemical potentials — line up. That alignment is what builds the built-in voltage.

Does chemical potential drive diffusion even without a concentration gradient?

Yes. The true driving force is the gradient of chemical potential, not concentration. Usually higher concentration means higher μ, so they point the same way — but not always. Across a temperature gradient (thermodiffusion), under gravity (the barometric atmosphere), or near charged surfaces, particles can pile up against a concentration gradient because μ also depends on temperature, external potential energy, and electric potential. Equilibrium is always μ uniform, not concentration uniform.

How does chemical potential determine phase changes and reactions?

A substance moves to whichever phase has the lower chemical potential. Two phases coexist (ice and water at 0 °C) exactly when their chemical potentials are equal — that equality, μ_solid = μ_liquid, defines the melting curve. For a reaction, the combination Σν_i·μ_i (stoichiometric coefficients times chemical potentials) is the reaction's free-energy slope; the reaction runs until that sum is zero, which is chemical equilibrium.