The partition function of a system in contact with a thermal bath
at temperature
is the normalization constant of the Boltzmann distribution
function, and therefore its expression is given by
,
where
is the density of states with energy
and
the Boltzmann constant.
The partition function of a system is related to the Helmholtz energy function through the formula

This connection can be derived from the fact that
is the
entropy of a system with total energy
. This is an extensive magnitude in the
sense that, for large systems (i.e. in the thermodynamic limit, when the number of
particles
or the volume
), it is proportional to
or
.
In other words, if we assume
large, then

where
is the entropy per particle in the thermodynamic limit, which is
a function of the energy per particle
. We can
therefore write

Since
is large, this integral can be performed through steepest descent,
and we obtain
,
where
is the value that maximizes the argument in the exponential; in other
words, the solution to

This is the thermodynamic formula for the inverse temperature provided
is
the mean energy per particle of the system. On the other hand, the argument in the exponential
is

the thermodynamic definition of the Helmholtz energy function. Thus, when
is large,

Connection with thermodynamics
We have the aforementioned Helmholtz energy function,

we also have the internal energy, which is given by

and the pressure, which is given by
.
These equations provide a link between classical thermodynamics and
statistical mechanics