With three translational degrees of freedom, the average translational energy per molecule of a gas is

where m is the mass of the molecule and vx , vy and vz are the x-, y- and z-components of the molecular velocity.
A diatomic molecule has two rotational degrees of freedom. If ω1 and ω2 are the angular speeds about the two axes and I1 and I2 are the corresponding moments of inertia, the rotational energy of a diatomic molecule,

A diatomic molecule is regarded to have two degrees of vibrational freedom for the vibrational mode in which the two atoms vibrate relative to, and without affecting, the centre of mass of the molecule. Comparing this system with a vibrating body of mass m connected to a spring of force constant k, the vibrational energy has two terms corresponding to the kinetic and potential energies :

where x is the displacement from the mean position.
From Eqs. (1), (2) and (3), each translational and rotational degree of freedom contributes only one quadratic term to the average energy of a gas molecule while one vibrational mode contributes two quadratic terms.
Note : For a gas at an absolute temperature T, the average kinetic energy molecule, <KE> = <\(\frac{1}2\)mvx2> + <\(\frac{1}2\)mvy2> + <\(\frac{1}2\)mvz2> = \(\frac{3}2\)kBT
As there is no preffered direction x or y or z, we have,
<\(\frac{1}2\)mvx2> = <\(\frac{1}2\)mvy2> = <\(\frac{1}2\)mvz2> = \(\frac{3}2\)kBT