# Partition function (statistical mechanics)

Partition function (statistical mechanics)

Partition function describe the statistical properties of a system in thermodynamic equilibrium. It is a function of temperature and other parameters, such as the volume enclosing a gas. 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.

There are actually several different types of partition functions, each corresponding to different types of statistical ensemble (or, equivalently, different types of free energy.) 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.

## Canonical partition function

### Definition

As a beginning assumption, assume that a thermodynamically large system is in constant thermal contact with the environment, with a temperature  T , and both the volume of the system and the number of constituent particles fixed. This kind of system is called a canonical ensemble. Let us label with  s  ( s = 1, 2, 3, ...) the exact states (microstates) that the system can occupy, and denote the total energy of the system when it is in microstate  s  as  Es . Generally, these microstates can be regarded as analogous to discrete quantum states of the system.

The canonical partition function is

$Z = \sum_{s} e^{- \beta E_s}$ ,

where the "inverse temperature", β, is conventionally defined as

$\beta \equiv \frac{1}{k_BT}$

with  kB  denoting Boltzmann's constant. The term  exp(–β·Es)  is known as the Boltzmann factor. In systems with multiple quantum states  s  sharing the same  Es , 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:

$Z = \sum_{j} g_j \cdot e^{- \beta E_j}$ ,

where  gj  is the degeneracy factor, or number of quantum states  s  which have the same energy level defined by  Ej = Es .

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 classical statistical mechanics, it is not really correct to express the partition function as a sum of discrete terms, as we have done. In classical mechanics, the position and momentum variables of a particle can vary continuously, so the set of microstates is actually uncountable. In this case we must describe the partition function using an integral rather than a sum. For instance, the partition function of a gas of  N  identical classical particles is

$Z=\frac{1}{N! h^{3N}} \int \, \exp[-\beta H(p_1 \cdots p_N, x_1 \cdots x_N)] \; \mathrm{d}^3p_1 \cdots \mathrm{d}^3p_N \, \mathrm{d}^3x_1 \cdots \mathrm{d}^3x_N$

where

pi indicate particle momenta
xi indicate particle positions
d3 is a shorthand notation serving as a reminder that the pi and xi are vectors in three dimensional space, and
H  is the classical Hamiltonian.

The reason for the  N!  factor is discussed below. For simplicity, we will use the discrete form of the partition function in this article. Our results will apply equally well to the continuous form. The extra constant factor introduced in the denominator was introduced because, unlike the discrete form, the continuous form shown above is not dimensionless. To make it into a dimensionless quantity, we must divide it by h3N where  h  is some quantity with units of action (usually taken to be Planck's constant).

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):

$Z=\operatorname{tr} ( e^{-\beta\hat{H}} )$ ,

where $\hat{H}$ 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, one inserts under the trace for each degree of freedom a resolution of the identity

$\boldsymbol{1} = \int |x,p\rangle\,\langle x,p|~\frac{\mathrm{d}x\,\mathrm{d}p}{h}$

where $|x,p\rangle$ is a normalised Gaussian wavepacket centered at position x and momentum p. Thus,

$Z = \int \operatorname{tr} \left( e^{-\beta\hat{H}} |x,p\rangle\,\langle x,p| \right) \frac{\mathrm{d}x\,\mathrm{d}p}{h} = \int\langle x,p|e^{-\beta\hat{H}}|x,p\rangle ~\frac{\mathrm{d}x\,\mathrm{d}p}{h}$

A coherent state is an approximate eigenstate of both operators $\hat{x}$ and $\hat{p}$, hence also of the Hamiltonian $\hat{H}$, with errors of the size of the uncertainties. If Δx and Δp can be regarded as zero, the action of $\hat{H}$ reduces to multiplication by the classical Hamiltonian, and Z reduces to the classical configuration integral.

### Meaning and significance

It may not be obvious why the partition function, as we have defined it above, is an important quantity. First, let us consider what goes into it. The partition function is a function of the temperature T and the microstate energies E1, E2, E3, 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 Ps that the system occupies microstate s is

$P_s = \frac{1}{Z} e^{- \beta E_s}.$

$e^{- \beta E_s}$ is the well-known Boltzmann factor. (For a detailed derivation of this result, see canonical ensemble.) The partition function thus plays the role of a normalizing constant (note that it does not depend on s), ensuring that the probabilities sum up to one:

$\sum_s P_s = \frac{1}{Z} \sum_s e^{- \beta E_s} = \frac{1}{Z} Z = 1.$

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. The letter Z stands for the German word Zustandssumme, "sum over states". This notation also implies another important meaning of the partition function of a system: it counts the (weighted) number of states a system can occupy. Hence if all states are equally probable (equal energies) the partition function is the total number of possible states. Often this is the practical importance of Z.

### 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:

$\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}$

or, equivalently,

$\langle E\rangle = k_B T^2 \frac{\partial \ln Z}{\partial T}.$

Incidentally, one should note that if the microstate energies depend on a parameter λ in the manner

$E_s = E_s^{(0)} + \lambda A_s \qquad \mbox{for all}\; s$

then the expected value of A is

$\langle A\rangle = \sum_s A_s P_s = -\frac{1}{\beta} \frac{\partial}{\partial\lambda} \ln Z(\beta,\lambda).$

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.

### 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

$\langle E \rangle = - \frac{\partial \ln Z}{\partial \beta}.$

The variance in the energy (or "energy fluctuation") is

$\langle (\Delta E)^2 \rangle \equiv \langle (E - \langle E\rangle)^2 \rangle = \frac{\partial^2 \ln Z}{\partial \beta^2}.$

The heat capacity is

$C_v = \frac{\partial \langle E\rangle}{\partial T} = \frac{1}{k_B T^2} \langle (\Delta E)^2 \rangle.$

The entropy is

$S \equiv -k_B\sum_s P_s\ln P_s= k_B (\ln Z + \beta \langle E\rangle)=\frac{\partial}{\partial T}(k_B T \ln Z) =-\frac{\partial A}{\partial T}$

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

$A = \langle E\rangle -TS= - k_B T \ln Z.$

### Partition functions of subsystems

Suppose a system is subdivided into N sub-systems with negligible interaction energy. 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:

$Z =\prod_{j=1}^{N} \zeta_j.$

If the sub-systems have the same physical properties, then their partition functions are equal, ζ1 = ζ2 = ... = ζ, in which case

Z = ζN.

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):

$Z = \frac{\zeta^N}{N!}.$

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.

### Examples

A specific example of the partition function, expressed in terms of the mathematical formalism of measure theory, is presented in the article on the Potts model.

## Grand canonical partition function

### Definition

In a manner similar to the definition of the canonical partition function for the canonical ensemble, we can define a grand canonical partition function for a grand canonical ensemble, a system that can exchange both heat and particles with the environment, which has a constant temperature  T , and a chemical potential  μ . The grand canonical partition function, although conceptually more involved, simplifies the theoretical handling of quantum systems because it incorporates in a simple way the spin-statistics of the particles (i.e. whether particles are bosons or fermions). A canonical partition function, which has a given number of particles is in fact difficult to write down because of spin statistics.

The grand canonical partition function $\mathcal{Z}$ for an ideal quantum gas (a gas of non-interacting particles in a given potential well) is given by the following expression:

$\mathcal{Z} = \sum_{N=0}^\infty\,\sum_{\{n_i\}}\,\prod_i\ e^{-\beta n_i(\epsilon_i-\mu)}$

where  N  is the total number of particles in the gas, index  i  runs over every microstate (that is, a single particle state in the potential) with  ni  being the number of particles occupying microstate  i  and εi being the energy of a particle in that microstate. The set  { ni }  is the collection of all possible occupation numbers for each of these microstates such that  Σ ni = N .

For example, consider the  N = 3  term in the above sum. One possible set of occupation numbers would be  ni = 0, 1, 0, 2, 0 ...  and the contribution of this set of occupation numbers to the  N = 3  term would be

$\prod_i e^{-\beta n_i(\epsilon_i-\mu)}=e^{-\beta(\epsilon_1-\mu)}\,e^{-2\beta(\epsilon_3-\mu)}$ .

For bosons, the occupation numbers can take any integer values as long as their sum is equal to  N . For fermions, the Pauli exclusion principle requires that the occupation numbers only be  0  or  1 , again adding up to  N .

### Specific expressions

The above expression for the grand partition function can be shown to be mathematically equivalent to:

$\mathcal{Z} = \prod_i \mathcal{Z}_i$ .

(The above product is sometimes taken over all states with equal energy, rather than over each state, in which case the individual partition functions must be raised to a power  gi  where  gi  is the number of such states.  gi  is also referred to as the "degeneracy" of states.)

For a system composed of bosons:

$\mathcal{Z}_i = \sum_{n_i=0}^\infty e^{-\beta n_i(\epsilon_i-\mu)} = \frac{1}{1-e^{-\beta (\epsilon_i-\mu)}}$

and for a system composed of fermions:

$\mathcal{Z}_i = \sum_{n_i=0}^1 e^{-\beta n_i(\epsilon_i-\mu)} = 1+e^{-\beta (\epsilon_i-\mu)}$ .

For the case of a Maxwell-Boltzmann gas, we must use "correct Boltzmann counting" and divide the Boltzmann factor $e^{-\beta (\epsilon_i-\mu)}$ by  ni! .

$\mathcal{Z}_i = \sum_{n_i=0}^\infty \frac{e^{-\beta n_i(\epsilon_i-\mu)}}{n_i!} = \exp\left( e^{-\beta (\epsilon_i-\mu)}\right)$ .

### Relation to thermodynamic variables

Just as with the canonical partition function, the grand canonical partition function can be used to calculate thermodynamic and statistical variables of the system. As with the canonical ensemble, the thermodynamic quantities are not fixed, but have a statistical distribution about a mean or expected value.

#### Occupation numbers

The most probable occupation numbers are:

$\langle n_i\rangle = -\left(\frac{\partial\ln(\mathcal{Z}_i)}{\partial \alpha} \right)_{\beta,V} = \frac{1}{\beta}\left(\frac{\partial\ln(\mathcal{Z}_i)}{\partial \mu} \right)_{\beta,V}$ ,

where  α = –β·μ .

For Boltzmann particles this yields:

$\langle n_i\rangle = e^{-\beta(\epsilon_i-\mu)}$ .

For bosons:

$\langle n_i\rangle = \frac{1}{e^{\beta(\epsilon_i-\mu)}-1}$ .

For fermions:

$\langle n_i\rangle = \frac{1}{e^{\beta(\epsilon_i-\mu)}+1}$ .

which are just the results found using the canonical ensemble for Maxwell-Boltzmann statistics, Bose-Einstein statistics and Fermi-Dirac statistics, respectively. (The degeneracy  gi  is missing from the above equations because the index  i  is summing over individual microstates rather than energy eigenvalues.)

#### Total number of particles

$\langle N\rangle = -\left(\frac{\partial\ln(\mathcal{Z})}{\partial \alpha} \right)_{\beta,V} = \frac{1}{\beta}\left(\frac{\partial\ln(\mathcal{Z})}{\partial \mu} \right)_{\beta,V}.$ .

#### Variance in total number of particles

$\langle (\delta N)^2 \rangle = \left(\frac{\partial^2\ln(\mathcal{Z})}{\partial \alpha^2} \right)_{\beta,V}$ .

#### Internal energy

$\langle E\rangle = -\left(\frac{\partial \ln(\mathcal{Z})}{\partial \beta} \right)_{\mu,V} + \mu \langle N\rangle$ .

#### Variance in internal energy

$\langle (\delta E)^2 \rangle = \left(\frac{\partial^2 \ln(\mathcal{Z})}{\partial \beta^2} \right)_{\mu,V}$ .

#### Pressure

$P V = k_B T \ln \mathcal{Z}$ .

#### Mechanical equation of state

$\langle PV\rangle=\frac{\ln\mathcal{Z}}{\beta}$ .

### Relation to potential V

For the case of a non-interacting gas, using the "Semiclassical Approach" we can write (approximately) the inverse of the potential in the form:

$\frac{1}{2i\pi}\int_{c-i\infty}^{c+i\infty}\mathrm{d}s\frac{Z(s)}{\sqrt (\pi s)}e^{st} \sim V^{-1} (t)$

$s= \frac{1}{k_{B} T}$ (valid for high T )

supposing that the Hamiltonian of every particle is H=T+V .

### Discussion

Before specific results can be obtained from the grand canonical partition function, the energy levels of the system under consideration need to be specified. For example, the particle in a box model or particle in a harmonic oscillator well provide a particular set of energy levels and are a convenient way to discuss the properties of a quantum fluid. (See the gas in a box and gas in a harmonic trap articles for a description of quantum fluids.)

These results may be used to construct the grand partition function to describe an ideal Bose gas or Fermi gas, and can be used as well to describe a classical ideal gas. In the case of a mesoscopic system made of few particles like a quantum dot in a semiconductor, the finite quantum grand partition ensemble is required, for which the limit of a small finite N is maintained.

## References

1. ^ J. R. Klauder, B.-S. Skagerstam, Coherent States --- Applications in Physics and Mathematical Physics, World Scientific, 1985, p. 71-73.

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Partition function — may refer to:*Partition function (number theory) *Partition function (mathematics), which generalizes its use in statistical mechanics and quantum field theory: **Partition function (statistical mechanics) **Partition function (quantum field… …   Wikipedia

• Statistical mechanics — is the application of probability theory, which includes mathematical tools for dealing with large populations, to the field of mechanics, which is concerned with the motion of particles or objects when subjected to a force.Statistical mechanics …   Wikipedia

• Partition function (mathematics) — The partition function or configuration integral, as used in probability theory, information science and dynamical systems, is an abstraction of the definition of a partition function in statistical mechanics. It is a special case of a… …   Wikipedia

• Partition function (quantum field theory) — In quantum field theory, we have a generating functional, Z [J] of correlation functions and this value, called the partition function is usually expressed by something like the following functional integral::Z [J] = int mathcal{D}phi e^{i(S… …   Wikipedia

• Statistical ensemble (mathematical physics) — In mathematical physics, especially as introduced into statistical mechanics and thermodynamics by J. Willard Gibbs in 1878, an ensemble (also statistical ensemble or thermodynamic ensemble)cite book |last=Kittel |first=Charles… …   Wikipedia

• Partition — Generally, a partition is a splitting of something into parts. The term is used in a variety of senses: Law *Partition (law), to divide up a piece of land into separate portions representing the proportionate interests of the tenants. It may also …   Wikipedia

• Quantum statistical mechanics — is the study of statistical ensembles of quantum mechanical systems. A statistical ensemble is described by a density operator S , which is a non negative, self adjoint, trace class operator of trace 1 on the Hilbert space H describing the… …   Wikipedia

• Microstate (statistical mechanics) — In statistical mechanics, a microstate is a specific microscopic configuration of a thermodynamic system that the system may occupy with a certain probability in the course of its thermal fluctuations. In contrast, the macrostate of a system… …   Wikipedia

• Translational partition function — In statistical mechanics, the translational partition function is that part of the partition function resulting from the movement (translation) of the center of mass. It is derived in the same way as the partition function for the canonical… …   Wikipedia

• Fonction de partition — En physique statistique, la fonction de partition Z est une grandeur fondamentale qui englobe les propriétés statistiques d un système à l équilibre thermodynamique. C est une fonction de la température et d autres paramètres, tels que le volume… …   Wikipédia en Français