| |||||||||
In statistical mechanics, the partition function Z is used for the statistical description of a system in thermodynamic equilibrium. It depends on the physical system under consideration and is a function of temperature as well as other parameters (such as volume enclosing a gas etc.). The partition function forms the basis for most calculations in statistical mechanics. It is most easily formulated in quantum mechanics:
A system subdivided into N sub-systems, where each sub-system (e.g. a particle) can attain any of the energies <math>\epsilon_j<math> (i.e. <math>\epsilon_1<math>, <math>\epsilon_2<math>, ...) has the partition function given by the sum of its Boltzmann factors:
where <math>\beta = \frac{1}{k_BT}<math> (<math>k_B<math> is Boltzmann's constant and T is the temperature). For a full derivation see the derivation of the partition function. The intepretation of <math>\zeta<math> is that the probability that the particle (sub-system) will have energy <math>\epsilon_j<math> is <math>e^{-\beta\epsilon_j}/\zeta<math>. When the number of energies <math>\epsilon_j<math> is definite (e.g. particles with spin in a crystal lattice under an external magnetic field), then the indefinite sum with <math>\infty<math> is replaced with a definite sum. However, the total partition function for the system containing N sub-systems is of the form
where <math>\zeta_j<math> is the partition function for the j:th sub-system. Another approach is to sum over all system's total energy states,
where <math>E_j = n^{(j)}_1\epsilon_1 + n^{(j)}_2\epsilon_2 + ...<math>, but then the parameter r is from 1 to N·(degrees of freedom). Note that for a system containing N non-interacting sub-system (e.g. a real gas), then the system's partition function is
where N! is the factorial and ζ is the "common" partition function for a sub-system. This equation also has the more general form
where <math>\hat H<math> is the sub-system's energy as
More formally, the partition function Z of a quantum-mechanical system may be written as a trace over all states (which may be carried out in any basis, as the trace is basis-independent):
If the Hamiltonian contains a dependence on a parameter <math>\lambda<math>, as in <math>\hat H=\hat H_0 + \lambda \hat A<math> then the statistical average over <math>\hat A<math> may be found from the dependence of the partition function on the parameter, by differentiation:
If one is interested in the average of an operator that does not appear in the Hamiltonian, one often adds it artificially to the Hamiltonian, calculates Z as a function of the extra new parameter and sets the parameter equal to zero after differentiation.