Energy and Equipartition

The internal energy is the sum of all the energy associated with molecular motion:
translation, rotation, and vibration.

Equipartition of Energy: 
Each degree of freedom contributes kT/2 to the internal energy.

What is a degree of freedom?

Each independent energy storage mode is a degree of freedom:

For a monatomic ideal gas, there is only translation and the internal energy is:
E =
3
2
NkT =
3
2
nRT monatomic ideal gas

Diatomic molecule: 3 translational and 2 rotational degrees of freedom. Thus:
E =
5
2
NkT diatomic ideal gas (intermediate temperatures)

Careful! This result applies at intermediate temperatures. At low temperatures only translation contributes, and at high temperatures two additional degrees of freedom arise associated with vibration (kinetic & potential energy). Thus:
E =
7
2
NkT diatomic ideal gas (high temperatures)