Degree of Freedom
An interactive exploration of degrees of freedom in classical mechanics — from the harmonic oscillator and pendulum through coupled systems to the chaotic double pendulum. Each section presents the equations of motion and an interactive simulation.
A degree of freedom (DoF) is an independent coordinate needed to describe the configuration of a physical system. A particle moving in 3D space has 3 DoF. A pendulum constrained to swing in a plane has 1 DoF. The number of degrees of freedom determines the dimensionality of phase space — and, ultimately, the complexity of the system’s behaviour.
This article builds the concept from the ground up: from the linear harmonic oscillator (1 DoF, fully solvable) through the nonlinear pendulum (1 DoF, requiring numerical integration) and coupled oscillators (2 DoF, normal modes and beats) to the double pendulum (2 DoF, deterministic chaos).
What is a Degree of Freedom?
Formally, the number of degrees of freedom of a mechanical system equals the number of independent generalised coordinates q₁, q₂, …, qₙ required to completely specify its configuration. Constraints reduce the DoF count: a bead on a wire in 3D has 1 DoF, not 3.
In statistical mechanics, DoF acquires a different but related meaning — each quadratic term in the Hamiltonian contributes ½k_BT of energy at thermal equilibrium (equipartition theorem). A 3D harmonic oscillator has 6 DoF (3 kinetic + 3 potential), hence average energy 3k_BT.
Lagrangian Mechanics and Generalised Coordinates
Lagrangian mechanics replaces Newton’s vector force equations with a scalar energy function L = T − V (kinetic minus potential energy). The Euler–Lagrange equations:
d/dt (∂L/∂q̇ᵢ) − ∂L/∂qᵢ = 0
yield one equation per generalised coordinate qᵢ. This formulation is coordinate-free — it works equally well in Cartesian, polar, or any curvilinear coordinates, and constraints can be incorporated by choosing coordinates that automatically satisfy them.
〜 Linear Harmonic Oscillator
A mass attached to a spring with spring constant k and mass m. One degree of freedom: displacement x(t). The restoring force is linear: F = −kx. This is the fundamental building block of oscillatory physics.
Adjust k (stiffness), m (mass), b (damping), and amplitude. Observe the transition from underdamped oscillation to overdamped exponential decay.
⊙ Simple Pendulum
A pendulum of length L and mass m swings under gravity. One degree of freedom: angle θ(t). Unlike the oscillator, the equation of motion is nonlinear — exact solutions require numerical integration. For small angles (θ ≪ 1), it approximates the harmonic oscillator.
Large initial angles show the deviation from harmonic behaviour — the period increases. Phase portrait (right): the separatrix separates libration from full rotation.
⇌ Coupled Oscillators
Two masses connected by springs — three springs total (wall–m₁–coupling–m₂–wall). Two degrees of freedom: x₁(t), x₂(t). Normal modes emerge: symmetric (in-phase) and antisymmetric (out-of-phase). Beat phenomenon and energy exchange between oscillators.
Set k_c ≈ 0 for two independent oscillators. Increase k_c to see energy exchange and beat phenomena. Symmetric initial conditions excite only the symmetric normal mode.
∞ Double Pendulum — Chaotic Behaviour
A pendulum attached to the end of another pendulum. Two degrees of freedom: θ₁(t), θ₂(t). The system is deterministic yet unpredictable — arbitrarily small differences in initial conditions lead to exponentially diverging trajectories. The canonical example of classical chaos.
Click "+Ghost" to add a nearly identical pendulum (Δθ₁ = 0.001°). Watch the trajectories diverge exponentially — this is the signature of chaos. The trail traces the path of the lower bob.