# Degrees of freedom (physics and chemistry)

In physics and chemistry, a degree of freedom is an independent physical parameter in the chosen parameterization of a physical system. More formally, given a parameterization of a physical system, the number of degrees of freedom is the smallest number n{\textstyle n} of parameters whose values need to be known in order to always be possible to determine the values of all parameters in the chosen parameterization. In this case, any set of n{\textstyle n} such parameters are called degrees of freedom.
The location of a particle in three-dimensional space requires three position coordinates. Similarly, the direction and speed at which a particle moves can be described in terms of three velocity components, each in reference to the three dimensions of space. So, if the time evolution of the system is deterministic (where the state at one instant uniquely determines its past and future position and velocity as a function of time), such a system has six degrees of freedom. If the motion of the particle is constrained to a lower number of dimensions – for example, the particle must move along a wire or on a fixed surface – then the system has fewer than six degrees of freedom. On the other hand, a system with an extended object that can rotate or vibrate can have more than six degrees of freedom.
In classical mechanics, the state of a point particle at any given time is often described with position and velocity coordinates in the Lagrangian formalism, or with position and momentum coordinates in the Hamiltonian formalism.
In statistical mechanics, a degree of freedom is a single scalar number describing the microstate of a system. The specification of all microstates of a system is a point in the system's phase space.
In the 3D ideal chain model in chemistry, two angles are necessary to describe the orientation of each monomer.
It is often useful to specify quadratic degrees of freedom. These are degrees of freedom that contribute in a quadratic function to the energy of the system.
Depending on what one is counting, there are several different ways that degrees of freedom can be defined, each with a different value.

## Thermodynamic degrees of freedom for gases

By the equipartition theorem, internal energy per mole of gas equals c$_v$ T, where T is absolute temperature and the specific heat at constant volume is c$_v$ = (f)(R/2). R = 8.314 J/(K mol) is the universal gas constant, and "f" is the number of thermodynamic (quadratic) degrees of freedom, counting the number of ways in which energy can occur.
Any atom or molecule has three degrees of freedom associated with translational motion (kinetic energy) of the center of mass with respect to the x, y, and z axes. These are the only degrees of freedom for a monoatomic species, such as noble gas atoms.
For a structure consisting of two or more atoms, the whole structure also has rotational kinetic energy, where the whole structure turns about an axis. A linear molecule, where all atoms lie along a single axis, such as any diatomic molecule and some other molecules like carbon dioxide (CO$_2$), has two rotational degrees of freedom, because it can rotate about either of two axes perpendicular to the molecular axis. A nonlinear molecule, where the atoms do not lie along a single axis, like water (H$_2$O), has three rotational degrees of freedom, because it can rotate around any of three perpendicular axes. In special cases, such as adsorbed large molecules, the rotational degrees of freedom can be limited to only one.
A structure consisting of two or more atoms also has vibrational energy, where the individual atoms move with respect to one another. A diatomic molecule has one molecular vibration mode: the two atoms oscillate back and forth with the chemical bond between them acting as a spring. A molecule with N atoms has more complicated modes of molecular vibration, with 3N − 5 vibrational modes for a linear molecule and 3N − 6 modes for a nonlinear molecule. As specific examples, the linear CO$_2$ molecule has 4 modes of oscillation, and the nonlinear water molecule has 3 modes of oscillation Each vibrational mode has two energy terms: the kinetic energy of the moving atoms and the potential energy of the spring-like chemical bond(s). Therefore, the number of vibrational energy terms is 2(3N − 5) modes for a linear molecule and is 2(3N − 6) modes for a nonlinear molecule.
Both the rotational and vibrational modes are quantized, requiring a minimum temperature to be activated. The "rotational temperature" to activate the rotational degrees of freedom is less than 100 K for many gases. For N$_2$ and O$_2$, it is less than 3 K. The "vibrational temperature" necessary for substantial vibration is between 10$^3$ K and 10$^4$ K, 3521 K for N$_2$ and 2156 K for O$_2$. Typical atmospheric temperatures are not high enough to activate vibration in N$_2$ and O$_2$, which comprise most of the atmosphere. (See the next figure.) However, the much less abundant greenhouse gases keep the troposphere warm by absorbing infrared from the Earth's surface, which excites their vibrational modes. Much of this energy is reradiated back to the surface in the infrared through the "greenhouse effect."
Because room temperature (≈298 K) is over the typical rotational temperature but lower than the typical vibrational temperature, only the translational and rotational degrees of freedom contribute, in equal amounts, to the heat capacity ratio. This is why γ≈⁠5/3⁠ for monatomic gases and γ≈⁠7/5⁠ for diatomic gases at room temperature.
Since the air is dominated by diatomic gases (with nitrogen and oxygen contributing about 99%), its molar internal energy is close to c$_v$ T = (5/2)RT, determined by the 5 degrees of freedom exhibited by diatomic gases. See the graph at right. For 140 K < T < 380 K, c$_v$ differs from (5/2) R$_d$ by less than 1%. Only at temperatures well above temperatures in the troposphere and stratosphere do some molecules have enough energy to activate the vibrational modes of N$_2$ and O$_2$. The specific heat at constant volume, c$_v$, increases slowly toward (7/2) R as temperature increases above T = 400 K, where c$_v$ is 1.3% above (5/2) R$_d$ = 717.5 J/(K kg).
Component degrees of freedom for N atoms (3N total coordinate motions) :
| | Monatomic | Linear molecules | Non-linear molecules |
| Translation (x, y, and z) | 3 | 3 | 3 |
| Rotation (x, y, and z) | 0 | 2 | 3 |
| Vibration (high temperature) | 0 | 2 (3N − 5) | 2 (3N − 6) |

### Counting the minimum number of co-ordinates to specify a position

One can also count degrees of freedom using the minimum number of coordinates required to specify a position. This is done as follows:
* For a single particle we need 2 coordinates in a 2-D plane to specify its position and 3 coordinates in 3-D space. Thus its degree of freedom in a 3-D space is 3.
* For a body consisting of 2 particles (ex. a diatomic molecule) in a 3-D space with constant distance between them (let's say d) we can show (below) its degrees of freedom to be 5.
Let's say one particle in this body has coordinate (x$_1$, y$_1$, z$_1$) and the other has coordinate (x$_2$, y$_2$, z$_2$) with  z$_2$ unknown. Application of the formula for distance between two coordinates
    $d={\sqrt {(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}+(z_{2}-z_{1})^{2}}}$
results in one equation with one unknown, in which we can solve for z$_2$. One of x$_1$, x$_2$, y$_1$, y$_2$, z$_1$, or z$_2$ can be unknown.
Contrary to the classical equipartition theorem, at room temperature, the vibrational motion of molecules typically makes negligible contributions to the heat capacity. This is because these degrees of freedom are frozen because the spacing between the energy eigenvalues exceeds the energy corresponding to ambient temperatures (k$_B$T).

## Independent degrees of freedom

The set of degrees of freedom X$_1$, ... , X$_N$ of a system is independent if the energy associated with the set can be written in the following form:
    $E=\sum _{i=1}^{N}E_{i}(X_{i}),$
where E$_i$ is a function of the sole variable X$_i$.
example: if X$_1$ and X$_2$ are two degrees of freedom, and E is the associated energy:
* If $E=X_{1}^{4}+X_{2}^{4}$, then the two degrees of freedom are independent.
* If $E=X_{1}^{4}+X_{1}X_{2}+X_{2}^{4}$, then the two degrees of freedom are not independent. The term involving the product of X$_1$ and X$_2$ is a coupling term that describes an interaction between the two degrees of freedom.
For i from 1 to N, the value of the ith degree of freedom X$_i$ is distributed according to the Boltzmann distribution. Its probability density function is the following:
    $p_{i}(X_{i})={\frac {e^{-{\frac {E_{i}}{k_{B}T}}}}{\int dX_{i}\,e^{-{\frac {E_{i}}{k_{B}T}}}}}$,
In this section, and throughout the article the brackets $\langle \rangle$ denote the mean of the quantity they enclose.
The internal energy of the system is the sum of the average energies associated with each of the degrees of freedom:
    $\langle E\rangle =\sum _{i=1}^{N}\langle E_{i}\rangle .$

## Quadratic degrees of freedom

A degree of freedom X$_i$ is quadratic if the energy terms associated with this degree of freedom can be written as
    $E=\alpha _{i}\,\,X_{i}^{2}+\beta _{i}\,\,X_{i}Y$,
where Y is a linear combination of other quadratic degrees of freedom.
example: if X$_1$ and X$_2$ are two degrees of freedom, and E is the associated energy:
* If $E=X_{1}^{4}+X_{1}^{3}X_{2}+X_{2}^{4}$, then the two degrees of freedom are not independent and non-quadratic.
* If $E=X_{1}^{4}+X_{2}^{4}$, then the two degrees of freedom are independent and non-quadratic.
* If $E=X_{1}^{2}+X_{1}X_{2}+2X_{2}^{2}$, then the two degrees of freedom are not independent but are quadratic.
* If $E=X_{1}^{2}+2X_{2}^{2}$, then the two degrees of freedom are independent and quadratic.
For example, in Newtonian mechanics, the dynamics of a system of quadratic degrees of freedom are controlled by a set of homogeneous linear differential equations with constant coefficients.

### Quadratic and independent degree of freedom

X$_1$, ... , X$_N$ are quadratic and independent degrees of freedom if the energy associated with a microstate of the system they represent can be written as:
    $E=\sum _{i=1}^{N}\alpha _{i}X_{i}^{2}$

### Equipartition theorem

In the classical limit of statistical mechanics, at thermodynamic equilibrium, the internal energy of a system of N quadratic and independent degrees of freedom is:
    $U=\langle E\rangle =N\,{\frac {k_{B}T}{2}}$
Here, the mean energy associated with a degree of freedom is:
    $\langle E_{i}\rangle =\int dX_{i}\,\,\alpha _{i}X_{i}^{2}\,\,p_{i}(X_{i})={\frac {\int dX_{i}\,\,\alpha _{i}X_{i}^{2}\,\,e^{-{\frac {\alpha _{i}X_{i}^{2}}{k_{B}T}}}}{\int dX_{i}\,\,e^{-{\frac {\alpha _{i}X_{i}^{2}}{k_{B}T}}}}}$
    $\langle E_{i}\rangle ={\frac {k_{B}T}{2}}{\frac {\int dx\,\,x^{2}\,\,e^{-{\frac {x^{2}}{2}}}}{\int dx\,\,e^{-{\frac {x^{2}}{2}}}}}={\frac {k_{B}T}{2}}$
Since the degrees of freedom are independent, the internal energy of the system is equal to the sum of the mean energy associated with each degree of freedom, which demonstrates the result.

## Generalizations

The description of a system's state as a point in its phase space, although mathematically convenient, is thought to be fundamentally inaccurate. In quantum mechanics, the motion degrees of freedom are superseded with the concept of wave function, and operators which correspond to other degrees of freedom have discrete spectra. For example, intrinsic angular momentum operator (which corresponds to the rotational freedom) for an electron or photon has only two eigenvalues. This discreteness becomes apparent when action has an order of magnitude of the Planck constant, and individual degrees of freedom can be distinguished.