In statistical mechanics, the partition function is the sum of all the Boltzmann factors of a set of particles, which are in turn, values directly related to the count of particles in a given quantum state. Dividing a Boltzmann factor by the partition function gives the fraction of the particles with that quantum state. Lacking the partition function, Boltzmann factors are still useful in determining the relative percents or counts of particles at two quantum states. Statistical mechanics (and astrophysics) uses the partition function to help model the properties of gases based upon the actions of the individual molecules.
For a classical discrete system, a Boltzmann factor is:
and the partition function (Z) is the sum:
Z = Σ e-βEi i
Z is clearly a function of temperature, and also, the possible energy levels Ei depend on the number of particles and volume in which they are contained, i.e., a function, Z(T,N,V). Z is a step in the calculation of a number of properties of a gas, and an equation of state, in effect, depends upon it.
Mathematics also uses the term partition function for other functions. In probability, it is a generalization of the above. In number theory, it is the number of sets of non-zero positive integers that add up to a particular integer.