Lagrangian Mechanics

Author

John Robin Inston

Published

September 25, 2026

1 Motivation

Lagrangian mechanics is a reformulation of Classical Mechanics that describes a mechanical system through a single scalar function of positions and velocities, instead of forces. It is equivalent to Newton’s laws and to Hamiltonian Mechanics, but takes the same form in any system of coordinates.

Recall that a system of \(N\) point masses \(m_{1},\dots,m_{N}\) with Cartesian positions \(\vec{r}_{i}\in\mathbb{R}^3\) and velocities \(\vec{v}_{i}=\dot{\vec{r}}_{i}\) obeys Newton’s second law \[ \vec F_i=m_i\ddot{\vec{r}}_i, \] which is a system of \(3N\) second-order Ordinary Differential Equations. Lagrangian mechanics avoids forces and considers energies. In the absence of an electromagnetic field the non-relativistic Lagrangian is the difference of kinetic energy \(K\) and potential energy \(U\), \[ \mathcal{L}=K-U,\qquad K=\frac{1}{2}\sum_{k=1}^{N}m_{k}\lVert\vec v_{k}\rVert^2. \] The kinetic energy depends only on velocities, and for conservative forces (e.g. gravity) the potential energy depends only on positions.

2 Configuration Space and Action

Rather than Cartesian coordinates we use generalised coordinates \(\boldsymbol{q}\) and their rates of change \(\dot{\boldsymbol{q}}\). For \(N\) particles in \(\mathbb{R}^3\) the configuration space is a smooth manifold \(Q\subseteq\mathbb{R}^{3N}\), each point \(q\in Q\) specifying the admissible positions of all particles at one instant. A trajectory is a smooth function \(q:[t_{0},t_{1}]\to Q\). The tangent bundle \(TQ\) of \(Q\) contains the pairs \((q,\dot q)\) of positions and velocities.

A Lagrangian is a smooth function \(\mathcal{L}:TQ\times\mathbb{R}\to \mathbb{R}\), \((q,\dot q,t)\mapsto\mathcal{L}(q,\dot q,t)\), with units of energy.

The action of a trajectory \(q\) is the integral of the Lagrangian along it, \[ \mathscr{A}[q]=\int_{t_{0}}^{t_{1}}\mathcal{L}(q(t),\dot{q}(t),t)~dt. \] It is a functional: a map from functions to real numbers (see Calculus of Variations).

The laws of motion follow from Hamilton’s principle of stationary action: among all trajectories between two given configurations, the one actually taken is a critical point (often, but not necessarily, a minimum) of the action. By the Calculus of Variations this is equivalent to the Euler-Lagrange Equation.

A trajectory \(q\) that is a critical point of \(\mathscr{A}\) satisfies, for each coordinate \(q_i\), \[ \frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot q_i} =\frac{\partial\mathcal{L}}{\partial q_i}. \]

The quantity \(p_i=\partial\mathcal{L}/\partial\dot q_i\) is the generalised momentum and \(\partial\mathcal{L}/\partial q_i\) the generalised force, so the equations read “rate of change of momentum equals force”, recovering Newton’s second law. In particular, if \(\mathcal{L}\) does not depend on \(q_i\) (a cyclic coordinate) then \(p_i\) is conserved. The map from \((q,\dot q)\) to \((q,p)\) leads to Hamiltonian Mechanics.

3 Example: The Pendulum

Consider a frictionless pendulum: a mass \(m\) on a rigid massless rod of length \(l\), with \(\theta\) the angle from the downward vertical. The arc length is \(s=l\theta\), so the kinetic energy is \[ K=\frac{1}{2}m\dot s^2=\frac{1}{2}ml^2\dot\theta^2. \] Measuring height from the pivot, the bob is at height \(-l\cos\theta\), so \(U=-mgl\cos\theta\) and \[ \mathcal{L}=\frac{1}{2}ml^2\dot\theta^2+mgl\cos\theta. \] Then \[ \frac{\partial\mathcal{L}}{\partial\theta}=-mgl\sin\theta,\qquad \frac{\partial\mathcal{L}}{\partial\dot\theta}=ml^2\dot\theta \ \Longrightarrow\ \frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot\theta} =ml^2\ddot\theta, \] and the Euler-Lagrange equation gives \(ml^2\ddot\theta=-mgl\sin\theta\), i.e. \[ \ddot\theta=-\frac{g}{l}\sin\theta, \] the familiar pendulum equation, obtained with no mention of the tension in the rod. Here \(ml^2\dot\theta\) is the angular momentum and \(-mgl\sin\theta\) the torque.

Back to top