# Physics:Partition function (statistical mechanics)

__: Function in thermodynamics and statistical physics__

**Short description**Statistical mechanics |
---|

In physics, a **partition function** describes the statistical properties of a system in thermodynamic equilibrium.^{[citation needed]} Partition functions are functions of the thermodynamic state variables, such as the temperature and volume. Most of the aggregate thermodynamic variables of the system, such as the total energy, free energy, entropy, and pressure, can be expressed in terms of the partition function or its derivatives. The partition function is dimensionless.

Each partition function is constructed to represent a particular statistical ensemble (which, in turn, corresponds to a particular free energy). The most common statistical ensembles have named partition functions. The **canonical partition function** applies to a canonical ensemble, in which the system is allowed to exchange heat with the environment at fixed temperature, volume, and number of particles. The **grand canonical partition function** applies to a grand canonical ensemble, in which the system can exchange both heat and particles with the environment, at fixed temperature, volume, and chemical potential. Other types of partition functions can be defined for different circumstances; see partition function (mathematics) for generalizations. The partition function has many physical meanings, as discussed in Meaning and significance.

## Canonical partition function

### Definition

Initially, let us assume that a thermodynamically large system is in thermal contact with the environment, with a temperature *T*, and both the volume of the system and the number of constituent particles are fixed. A collection of this kind of system comprises an ensemble called a canonical ensemble. The appropriate mathematical expression for the canonical partition function depends on the degrees of freedom of the system, whether the context is classical mechanics or quantum mechanics, and whether the spectrum of states is discrete or continuous.^{[citation needed]}

#### Classical discrete system

For a canonical ensemble that is classical and discrete, the canonical partition function is defined as [math]\displaystyle{ Z = \sum_i e^{-\beta E_i}, }[/math] where

- [math]\displaystyle{ i }[/math] is the index for the microstates of the system;
- [math]\displaystyle{ e }[/math] is Euler's number;
- [math]\displaystyle{ \beta }[/math] is the thermodynamic beta, defined as [math]\displaystyle{ \tfrac{1}{k_\text{B} T} }[/math] where [math]\displaystyle{ k_\text{B} }[/math] is Boltzmann's constant;
- [math]\displaystyle{ E_i }[/math] is the total energy of the system in the respective microstate.

The exponential factor [math]\displaystyle{ e^{-\beta E_i} }[/math] is otherwise known as the Boltzmann factor.

**Derivation of canonical partition function (classical, discrete)**

There are multiple approaches to deriving the partition function. The following derivation follows the more powerful and general information-theoretic Jaynesian maximum entropy approach.

According to the second law of thermodynamics, a system assumes a configuration of maximum entropy at thermodynamic equilibrium. We seek a probability distribution of states [math]\displaystyle{ \rho_i }[/math] that maximizes the discrete Gibbs entropy [math]\displaystyle{ S = - k_\text{B} \sum_i \rho_i \ln \rho_i }[/math]

subject to two physical constraints:

- The probabilities of all states add to unity (second axiom of probability): [math]\displaystyle{ \sum_i \rho_i = 1. }[/math]
- In the canonical ensemble, the average energy is fixed (conservation of energy): [math]\displaystyle{ \langle E \rangle = \sum_i \rho_i E_i \equiv U . }[/math]

Applying variational calculus with constraints (analogous in some sense to the method of Lagrange multipliers), we write the Lagrangian (or Lagrange function) [math]\displaystyle{ \mathcal{L} }[/math] as [math]\displaystyle{ \mathcal{L} = \left( -k_\text{B} \sum_i \rho_i \ln \rho_i \right) + \lambda_1 \left( 1 - \sum_i \rho_i \right) + \lambda_2 \left( U - \sum_i \rho_i E_i \right) . }[/math]

Varying and extremizing [math]\displaystyle{ \mathcal{L} }[/math] with respect to [math]\displaystyle{ \rho_i }[/math] leads to [math]\displaystyle{ \begin{align} 0 & \equiv \delta \mathcal{L} \\ &= \delta \left( - \sum_i k_\text{B} \rho_i \ln \rho_i \right) + \delta \left( \lambda_1 - \sum_i \lambda_1 \rho_i \right) + \delta \left( \lambda_2 U - \sum_i \lambda_2 \rho_i E_i \right) \\ &= \sum_i \bigg[ \delta \Big( - k_\text{B} \rho_i \ln \rho_i \Big) + \delta \Big( \lambda_1 \rho_i \Big) + \delta \Big( \lambda_2 E_i \rho_i \Big) \bigg] \\ &= \sum_i \left[ \frac{\partial}{\partial \rho_i } \Big( - k_\text{B} \rho_i \ln \rho_i \Big) \, \delta ( \rho_i ) + \frac{\partial}{\partial \rho_i } \Big( \lambda_1 \rho_i \Big) \, \delta ( \rho_i ) + \frac{\partial}{\partial \rho_i } \Big( \lambda_2 E_i \rho_i \Big) \, \delta ( \rho_i ) \right] \\ &= \sum_i \bigg[ -k_\text{B} \ln \rho_i - k_\text{B} + \lambda_1 + \lambda_2 E_i \bigg] \, \delta ( \rho_i ) . \end{align} }[/math]

Since this equation should hold for any variation [math]\displaystyle{ \delta ( \rho_i ) }[/math], it implies that [math]\displaystyle{ 0 \equiv - k_\text{B} \ln \rho_i - k_\text{B} + \lambda_1 + \lambda_2 E_i . }[/math]

Isolating for [math]\displaystyle{ \rho_i }[/math] yields [math]\displaystyle{ \rho_i = \exp \left( \frac{-k_\text{B} + \lambda_1 + \lambda_2 E_i}{k_\text{B}} \right) . }[/math]

To obtain [math]\displaystyle{ \lambda_1 }[/math], one substitutes the probability into the first constraint:
[math]\displaystyle{ \begin{align}
1 &= \sum_i \rho_i \\
&= \exp \left( \frac{-k_\text{B} + \lambda_1}{k_\text{B}} \right) Z ,
\end{align} }[/math]
where **[math]\displaystyle{ Z }[/math] is a constant number defined as the canonical ensemble partition function**:
[math]\displaystyle{ Z \equiv \sum_i \exp \left( \frac{\lambda_2}{k_\text{B}} E_i \right) . }[/math]

Isolating for [math]\displaystyle{ \lambda_1 }[/math] yields [math]\displaystyle{ \lambda_1 = - k_\text{B} \ln(Z) + k_\text{B} }[/math].

Rewriting [math]\displaystyle{ \rho_i }[/math] in terms of [math]\displaystyle{ Z }[/math] gives [math]\displaystyle{ \rho_i = \frac{1}{Z} \exp \left( \frac{\lambda_2}{k_\text{B}} E_i \right) . }[/math]

Rewriting [math]\displaystyle{ S }[/math] in terms of [math]\displaystyle{ Z }[/math] gives [math]\displaystyle{ \begin{align} S &= - k_\text{B} \sum_i \rho_i \ln \rho_i \\ &= - k_\text{B} \sum_i \rho_i \left( \frac{\lambda_2}{k_\text{B}} E_i - \ln(Z) \right) \\ &= - \lambda_2 \sum_i \rho_i E_i + k_\text{B} \ln(Z) \sum_i \rho_i \\ &= - \lambda_2 U + k_\text{B} \ln(Z) . \end{align} }[/math]

To obtain [math]\displaystyle{ \lambda_2 }[/math], we differentiate [math]\displaystyle{ S }[/math] with respect to the average energy [math]\displaystyle{ U }[/math] and apply the first law of thermodynamics, [math]\displaystyle{ dU = T dS - P dV }[/math]: [math]\displaystyle{ \frac{dS}{dU} = -\lambda_2 \equiv \frac{1}{T} . }[/math]

Thus the canonical partition function [math]\displaystyle{ Z }[/math] becomes [math]\displaystyle{ Z \equiv \sum_i e^{-\beta E_i} , }[/math] where [math]\displaystyle{ \beta \equiv 1/(k_\text{B} T) }[/math] is defined as the thermodynamic beta. Finally, the probability distribution [math]\displaystyle{ \rho_i }[/math] and entropy [math]\displaystyle{ S }[/math] are respectively [math]\displaystyle{ \begin{align} \rho_i & = \frac{1}{Z} e^{-\beta E_i} , \\ S & = \frac{U}{T} + k_\text{B} \ln Z . \end{align} }[/math]

#### Classical continuous system

In classical mechanics, the position and momentum variables of a particle can vary continuously, so the set of microstates is actually uncountable. In *classical* statistical mechanics, it is rather inaccurate to express the partition function as a sum of discrete terms. In this case we must describe the partition function using an integral rather than a sum. For a canonical ensemble that is classical and continuous, the canonical partition function is defined as
[math]\displaystyle{ Z = \frac{1}{h^3} \int e^{-\beta H(q, p)} \, \mathrm{d}^3 q \, \mathrm{d}^3 p, }[/math]
where

- [math]\displaystyle{ h }[/math] is the Planck constant;
- [math]\displaystyle{ \beta }[/math] is the thermodynamic beta, defined as [math]\displaystyle{ \tfrac{1}{k_\text{B} T} }[/math];
- [math]\displaystyle{ H(q, p) }[/math] is the Hamiltonian of the system;
- [math]\displaystyle{ q }[/math] is the canonical position;
- [math]\displaystyle{ p }[/math] is the canonical momentum.

To make it into a dimensionless quantity, we must divide it by *h*, which is some quantity with units of action (usually taken to be Planck's constant).

#### Classical continuous system (multiple identical particles)

For a gas of [math]\displaystyle{ N }[/math] identical classical particles in three dimensions, the partition function is [math]\displaystyle{ Z=\frac{1}{N!h^{3N}} \int \, \exp \left(-\beta \sum_{i=1}^N H(\textbf q_i, \textbf p_i) \right) \; \mathrm{d}^3 q_1 \cdots \mathrm{d}^3 q_N \, \mathrm{d}^3 p_1 \cdots \mathrm{d}^3 p_N }[/math] where

- [math]\displaystyle{ h }[/math] is the Planck constant;
- [math]\displaystyle{ \beta }[/math] is the thermodynamic beta, defined as [math]\displaystyle{ \tfrac{1}{k_\text{B} T} }[/math];
- [math]\displaystyle{ i }[/math] is the index for the particles of the system;
- [math]\displaystyle{ H }[/math] is the Hamiltonian of a respective particle;
- [math]\displaystyle{ q_i }[/math] is the canonical position of the respective particle;
- [math]\displaystyle{ p_i }[/math] is the canonical momentum of the respective particle;
- [math]\displaystyle{ \mathrm{d}^3 }[/math] is shorthand notation to indicate that [math]\displaystyle{ q_i }[/math] and [math]\displaystyle{ p_i }[/math] are vectors in three-dimensional space.

The reason for the factorial factor *N*! is discussed below. The extra constant factor introduced in the denominator was introduced because, unlike the discrete form, the continuous form shown above is not dimensionless. As stated in the previous section, to make it into a dimensionless quantity, we must divide it by *h*^{3N} (where *h* is usually taken to be Planck's constant).

#### Quantum mechanical discrete system

For a canonical ensemble that is quantum mechanical and discrete, the canonical partition function is defined as the trace of the Boltzmann factor: [math]\displaystyle{ Z = \operatorname{tr} ( e^{-\beta \hat{H}} ), }[/math] where:

- [math]\displaystyle{ \operatorname{tr} ( \circ ) }[/math] is the trace of a matrix;
- [math]\displaystyle{ \beta }[/math] is the thermodynamic beta, defined as [math]\displaystyle{ \tfrac{1}{k_\text{B} T} }[/math];
- [math]\displaystyle{ \hat{H} }[/math] is the Hamiltonian operator.

The dimension of [math]\displaystyle{ e^{-\beta \hat{H}} }[/math] is the number of energy eigenstates of the system.

#### Quantum mechanical continuous system

For a canonical ensemble that is quantum mechanical and continuous, the canonical partition function is defined as [math]\displaystyle{ Z = \frac{1}{h} \int \langle q, p | e^{-\beta \hat{H}} | q, p \rangle \, \mathrm{d} q \, \mathrm{d} p, }[/math] where:

- [math]\displaystyle{ h }[/math] is the Planck constant;
- [math]\displaystyle{ \hat{H} }[/math] is the Hamiltonian operator;
- [math]\displaystyle{ q }[/math] is the canonical position;
- [math]\displaystyle{ p }[/math] is the canonical momentum.

In systems with multiple quantum states *s* sharing the same energy *E _{s}*, it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by

*j*) as follows: [math]\displaystyle{ Z = \sum_j g_j \cdot e^{-\beta E_j}, }[/math] where

*g*is the degeneracy factor, or number of quantum states

_{j}*s*that have the same energy level defined by

*E*=

_{j}*E*.

_{s}The above treatment applies to *quantum* statistical mechanics, where a physical system inside a finite-sized box will typically have a discrete set of energy eigenstates, which we can use as the states *s* above. In quantum mechanics, the partition function can be more formally written as a trace over the state space (which is independent of the choice of basis):
[math]\displaystyle{ Z = \operatorname{tr} ( e^{-\beta \hat{H}} ), }[/math]
where *Ĥ* is the quantum Hamiltonian operator. The exponential of an operator can be defined using the exponential power series.

The classical form of *Z* is recovered when the trace is expressed in terms of coherent states^{[1]}
and when quantum-mechanical uncertainties in the position and momentum of a particle
are regarded as negligible. Formally, using bra–ket notation, one inserts under the trace for each degree of freedom the identity:
[math]\displaystyle{ \boldsymbol{1} = \int |x, p\rangle \langle x,p| \frac{dx \,dp}{h}, }[/math]
where |*x*, *p*⟩ is a normalised Gaussian wavepacket centered at
position *x* and momentum *p*. Thus
[math]\displaystyle{
Z = \int \operatorname{tr} \left( e^{-\beta\hat{H}} |x, p\rangle \langle x, p| \right) \frac{dx \,dp}{h}
= \int \langle x,p| e^{-\beta\hat{H}} |x, p\rangle \frac{dx \,dp}{h}.
}[/math]
A coherent state is an approximate eigenstate of both operators [math]\displaystyle{ \hat{x} }[/math] and [math]\displaystyle{ \hat{p} }[/math], hence also of the Hamiltonian *Ĥ*, with errors of the size of the uncertainties. If Δ*x* and Δ*p* can be regarded as zero, the action of *Ĥ* reduces to multiplication by the classical Hamiltonian, and *Z* reduces to the classical configuration integral.

### Connection to probability theory

For simplicity, we will use the discrete form of the partition function in this section. Our results will apply equally well to the continuous form.

Consider a system *S* embedded into a heat bath *B*. Let the total energy of both systems be *E*. Let *p _{i}* denote the probability that the system

*S*is in a particular microstate,

*i*, with energy

*E*. According to the fundamental postulate of statistical mechanics (which states that all attainable microstates of a system are equally probable), the probability

_{i}*p*will be inversely proportional to the number of microstates of the total closed system (

_{i}*S*,

*B*) in which

*S*is in microstate

*i*with energy

*E*. Equivalently,

_{i}*p*will be proportional to the number of microstates of the heat bath

_{i}*B*with energy

*E*−

*E*: [math]\displaystyle{ p_i = \frac{\Omega_B(E - E_i)}{\Omega_{(S,B)}(E)}. }[/math]

_{i}Assuming that the heat bath's internal energy is much larger than the energy of *S* (*E* ≫ *E _{i}*), we can Taylor-expand [math]\displaystyle{ \Omega_B }[/math] to first order in

*E*and use the thermodynamic relation [math]\displaystyle{ \partial S_B/\partial E = 1/T }[/math], where here [math]\displaystyle{ S_B }[/math], [math]\displaystyle{ T }[/math] are the entropy and temperature of the bath respectively: [math]\displaystyle{ \begin{align} k \ln p_i &= k \ln \Omega_B(E - E_i) - k \ln \Omega_{(S,B)}(E) \\[5pt] &\approx -\frac{\partial\big(k \ln \Omega_B(E)\big)}{\partial E} E_i + k \ln\Omega_B(E) - k \ln \Omega_{(S,B)}(E) \\[5pt] &\approx -\frac{\partial S_B}{\partial E} E_i + k \ln \frac{\Omega_B(E)}{\Omega_{(S,B)}(E)} \\[5pt] &\approx -\frac{E_i}{T} + k \ln \frac{\Omega_B(E)}{\Omega_{(S,B)}(E)} \end{align} }[/math]

_{i}Thus [math]\displaystyle{ p_i \propto e^{-E_i/(kT)} = e^{-\beta E_i}. }[/math]

Since the total probability to find the system in *some* microstate (the sum of all *p _{i}*) must be equal to 1, we know that the constant of proportionality must be the normalization constant, and so, we can define the partition function to be this constant:
[math]\displaystyle{ Z = \sum_i e^{-\beta E_i} = \frac{\Omega_{(S,B)}(E)}{\Omega_B(E)}. }[/math]

### Calculating the thermodynamic total energy

In order to demonstrate the usefulness of the partition function, let us calculate the thermodynamic value of the total energy. This is simply the expected value, or ensemble average for the energy, which is the sum of the microstate energies weighted by their probabilities: [math]\displaystyle{ \langle E \rangle = \sum_s E_s P_s = \frac{1}{Z} \sum_s E_s e^{- \beta E_s} = - \frac{1}{Z} \frac{\partial}{\partial \beta} Z(\beta, E_1, E_2, \cdots) = - \frac{\partial \ln Z}{\partial \beta} }[/math] or, equivalently, [math]\displaystyle{ \langle E\rangle = k_\text{B} T^2 \frac{\partial \ln Z}{\partial T}. }[/math]

Incidentally, one should note that if the microstate energies depend on a parameter λ in the manner
[math]\displaystyle{ E_s = E_s^{(0)} + \lambda A_s \qquad \text{for all}\; s }[/math]
then the expected value of *A* is
[math]\displaystyle{ \langle A\rangle = \sum_s A_s P_s = -\frac{1}{\beta}
\frac{\partial}{\partial\lambda} \ln Z(\beta,\lambda). }[/math]

This provides us with a method for calculating the expected values of many microscopic quantities. We add the quantity artificially to the microstate energies (or, in the language of quantum mechanics, to the Hamiltonian), calculate the new partition function and expected value, and then set *λ* to zero in the final expression. This is analogous to the source field method used in the path integral formulation of quantum field theory.^{[citation needed]}

### Relation to thermodynamic variables

In this section, we will state the relationships between the partition function and the various thermodynamic parameters of the system. These results can be derived using the method of the previous section and the various thermodynamic relations.

As we have already seen, the thermodynamic energy is [math]\displaystyle{ \langle E \rangle = - \frac{\partial \ln Z}{\partial \beta}. }[/math]

The variance in the energy (or "energy fluctuation") is [math]\displaystyle{ \langle (\Delta E)^2 \rangle \equiv \langle (E - \langle E\rangle)^2 \rangle = \langle E^2 \rangle - \langle E \rangle^2 = \frac{\partial^2 \ln Z}{\partial \beta^2}. }[/math]

The heat capacity is [math]\displaystyle{ C_v = \frac{\partial \langle E \rangle}{\partial T} = \frac{1}{k_\text{B} T^2} \langle (\Delta E)^2 \rangle. }[/math]

In general, consider the extensive variable X and intensive variable Y where X and Y form a pair of conjugate variables. In ensembles where Y is fixed (and X is allowed to fluctuate), then the average value of X will be: [math]\displaystyle{ \langle X \rangle = \pm \frac{\partial \ln Z}{\partial \beta Y}. }[/math]

The sign will depend on the specific definitions of the variables X and Y. An example would be X = volume and Y = pressure. Additionally, the variance in X will be [math]\displaystyle{ \langle (\Delta X)^2 \rangle \equiv \langle (X - \langle X\rangle)^2 \rangle = \frac{\partial \langle X \rangle}{\partial \beta Y} = \frac{\partial^2 \ln Z}{\partial (\beta Y)^2}. }[/math]

In the special case of entropy, entropy is given by
[math]\displaystyle{ S \equiv -k_\text{B}\sum_s P_s \ln P_s = k_\text{B} (\ln Z + \beta \langle E\rangle) = \frac{\partial}{\partial T} (k_\text{B} T \ln Z) = -\frac{\partial A}{\partial T} }[/math]
where *A* is the Helmholtz free energy defined as *A* = *U* − *TS*, where *U* = ⟨*E*⟩ is the total energy and *S* is the entropy, so that
[math]\displaystyle{ A = \langle E\rangle -TS= - k_\text{B} T \ln Z. }[/math]

Furthermore, the heat capacity can be expressed as [math]\displaystyle{ C_v = T \frac{\partial S}{\partial T} = -T \frac{\partial^2 A}{\partial T^2}. }[/math]

### Partition functions of subsystems

Suppose a system is subdivided into *N* sub-systems with negligible interaction energy, that is, we can assume the particles are essentially non-interacting. If the partition functions of the sub-systems are *ζ*_{1}, *ζ*_{2}, ..., *ζ*_{N}, then the partition function of the entire system is the *product* of the individual partition functions:
[math]\displaystyle{ Z =\prod_{j=1}^{N} \zeta_j. }[/math]

If the sub-systems have the same physical properties, then their partition functions are equal, ζ_{1} = ζ_{2} = ... = ζ, in which case [math]\displaystyle{ Z = \zeta^N. }[/math]

However, there is a well-known exception to this rule. If the sub-systems are actually identical particles, in the quantum mechanical sense that they are impossible to distinguish even in principle, the total partition function must be divided by a *N*! (*N* factorial):
[math]\displaystyle{ Z = \frac{\zeta^N}{N!}. }[/math]

This is to ensure that we do not "over-count" the number of microstates. While this may seem like a strange requirement, it is actually necessary to preserve the existence of a thermodynamic limit for such systems. This is known as the Gibbs paradox.

### Meaning and significance

It may not be obvious why the partition function, as we have defined it above, is an important quantity. First, consider what goes into it. The partition function is a function of the temperature *T* and the microstate energies *E*_{1}, *E*_{2}, *E*_{3}, etc. The microstate energies are determined by other thermodynamic variables, such as the number of particles and the volume, as well as microscopic quantities like the mass of the constituent particles. This dependence on microscopic variables is the central point of statistical mechanics. With a model of the microscopic constituents of a system, one can calculate the microstate energies, and thus the partition function, which will then allow us to calculate all the other thermodynamic properties of the system.

The partition function can be related to thermodynamic properties because it has a very important statistical meaning. The probability *P _{s}* that the system occupies microstate

*s*is [math]\displaystyle{ P_s = \frac{1}{Z} e^{- \beta E_s}. }[/math]

Thus, as shown above, the partition function plays the role of a normalizing constant (note that it does *not* depend on *s*), ensuring that the probabilities sum up to one:
[math]\displaystyle{ \sum_s P_s = \frac{1}{Z} \sum_s e^{- \beta E_s} = \frac{1}{Z} Z
= 1. }[/math]

This is the reason for calling *Z* the "partition function": it encodes how the probabilities are partitioned among the different microstates, based on their individual energies. Other partition functions for different ensembles divide up the probabilities based on other macrostate variables. As an example: the partition function for the isothermal-isobaric ensemble, the generalized Boltzmann distribution, divides up probabilities based on particle number, pressure, and temperature. The energy is replaced by the characteristic potential of that ensemble, the Gibbs Free Energy. The letter *Z* stands for the German word *Zustandssumme*, "sum over states". The usefulness of the partition function stems from the fact that the macroscopic thermodynamic quantities of a system can be related to its microscopic details through the derivatives of its partition function. Finding the partition function is also equivalent to performing a Laplace transform of the density of states function from the energy domain to the β domain, and the inverse Laplace transform of the partition function reclaims the state density function of energies.

## Grand canonical partition function

We can define a **grand canonical partition function** for a grand canonical ensemble, which describes the statistics of a constant-volume system that can exchange both heat and particles with a reservoir. The reservoir has a constant temperature *T*, and a chemical potential *μ*.

The grand canonical partition function, denoted by [math]\displaystyle{ \mathcal{Z} }[/math], is the following sum over microstates

- [math]\displaystyle{ \mathcal{Z}(\mu, V, T) = \sum_{i} \exp\left(\frac{N_i\mu - E_i}{k_B T} \right). }[/math]

Here, each microstate is labelled by [math]\displaystyle{ i }[/math], and has total particle number [math]\displaystyle{ N_i }[/math] and total energy [math]\displaystyle{ E_i }[/math]. This partition function is closely related to the grand potential, [math]\displaystyle{ \Phi_{\rm G} }[/math], by the relation

- [math]\displaystyle{ -k_B T \ln \mathcal{Z} = \Phi_{\rm G} = \langle E \rangle - TS - \mu \langle N\rangle. }[/math]

This can be contrasted to the canonical partition function above, which is related instead to the Helmholtz free energy.

It is important to note that the number of microstates in the grand canonical ensemble may be much larger than in the canonical ensemble, since here we consider not only variations in energy but also in particle number. Again, the utility of the grand canonical partition function is that it is related to the probability that the system is in state [math]\displaystyle{ i }[/math]:

- [math]\displaystyle{ p_i = \frac{1}{\mathcal Z} \exp\left(\frac{N_i\mu - E_i}{k_B T}\right). }[/math]

An important application of the grand canonical ensemble is in deriving exactly the statistics of a non-interacting many-body quantum gas (Fermi–Dirac statistics for fermions, Bose–Einstein statistics for bosons), however it is much more generally applicable than that. The grand canonical ensemble may also be used to describe classical systems, or even interacting quantum gases.

The grand partition function is sometimes written (equivalently) in terms of alternate variables as^{[2]}

- [math]\displaystyle{ \mathcal{Z}(z, V, T) = \sum_{N_i} z^{N_i} Z(N_i, V, T), }[/math]

where [math]\displaystyle{ z \equiv \exp(\mu/k_B T) }[/math] is known as the absolute activity (or fugacity) and [math]\displaystyle{ Z(N_i, V, T) }[/math] is the canonical partition function.

## See also

- Partition function (mathematics)
- Partition function (quantum field theory)
- Virial theorem
- Widom insertion method

## References

- ↑ Klauder, John R.; Skagerstam, Bo-Sture (1985).
*Coherent States: Applications in Physics and Mathematical Physics*. World Scientific. pp. 71–73. ISBN 978-9971-966-52-2. - ↑ Baxter, Rodney J. (1982).
*Exactly solved models in statistical mechanics*. Academic Press Inc.. ISBN 9780120831807.

- Huang, Kerson (1967).
*Statistical Mechanics*. New York: John Wiley & Sons. ISBN 0-471-81518-7. - Isihara, A. (1971).
*Statistical Physics*. New York: Academic Press. ISBN 0-12-374650-7. - Kelly, James J. (2002). "Ideal Quantum Gases".
*Lecture notes*. https://www.physics.umd.edu/courses/Phys603/kelly/Notes/IdealQuantumGases.pdf. - Landau, L. D.; Lifshitz, E. M. (1996).
*Statistical Physics*. Part 1 (3rd ed.). Oxford: Butterworth-Heinemann. ISBN 0-08-023039-3. - Vu-Quoc, L. (2008). "Configuration integral (statistical mechanics)". http://clesm.mae.ufl.edu/wiki.pub/index.php/Configuration_integral_%28statistical_mechanics%29.

Original source: https://en.wikipedia.org/wiki/Partition function (statistical mechanics).
Read more |