The quantity Z defined by
where the sum is taken over all states i of the system. Ei is the energy of the ith state, k is the Boltzmann constant, and T is the thermodynamic temperature. Z is a quantity of fundamental importance in equilibrium statistical mechanics. For a system in which there are nontrivial interactions, it is very difficult to calculate the partition function exactly. For such systems it is necessary to use approximation techniques. The partition function links results at the atomic level to thermodynamics, since Z is related to the Helmholtz free energy F by F = kTlnZ.