Consider a crystal of *N* atoms. Each atom has two accessable states: a ground state, of energy 0; and an excited state of energy *ε*. We note that the total energy of the crystal is *nε*, where there are *n* atoms in the excited state and *N*–*n* in the ground state. The number of different ways to achieve this, which gives the degeneracy of the energy level *E _{n}*=

*nε*, is just the binomial coefficient . One could use this, along with the Boltzmann entropy equation to obtain a formula for entropy as a function of energy, and using (along with Stirling’s approximation), one could find the energy

*U*for equilibrium at temperature

*T*. Go read this post to see exactly how this is done (let

*ε*=0 and

_{a}*ε*=

_{b}*ε*).

Instead, this time let’s compute the canonical partition function . Now, the energy is

*E*=

_{n}*nε*, and the degeneracy is . Thus:

Note, however, by the binomial theorem, this is just the expansion of , and so . Note that the partition function for one of the atoms is , so that the total partition function is just the product of the partition functions of the individual atoms.

This is an example of a more general property of the canonical partition function. If a system can be broken into elements, where the total energy is the sum of the energies of the elements, and where each element may occupy any of its particular states independent of the states of the other elements (such as our two-state crystal atoms above), then the partition function of the total system is the product of the partition functions of the individual elements. Considering a more general set of elements with more general states lets us prove this in a manner mathematically similar to the above: let the

*l*th element in its

*m*th particular state be denoted

*ε*. Note that these elements need not be the same, and need not have the same set of individual states. So then we have energies of the form , where

_{lm}*m*

_{1}is the index of individual states for the first element,

*m*

_{2}is the index of individual states for the second element,

*m*

_{3}is the index of individual states for the third element, and so on.

Then our partition function is the sum of the Boltzmann factors for all combinations of allowed values for

*m*

_{1},

*m*

_{2},

*m*

_{3}, etc.:

where

*Z*is the partition function of the

_{l}*l*th element.

Note that since the Helmholtz free energy is given by , this means that the Helmholtz free energy of the system is the sum of the Helmholtz free energies of the elements.

When we consider a molecular gas, as in many previous posts, we usually assume (as it makes a good approximation for normal conditions) that the translational, rotational, and vibrational modes of the molecules are independent, and that intermolecular collisions couple only to the translational modes. This means that we can separate the partition sum:

.

This allows us to more clearly compute how properties such as heat capacity are affected by these internal modes that simply assuming a constant

*f*≥3 accessable degrees of freedom with equipartition of energy, as done here.