Intuition The big picture (WHY this exists)
In Newtonian mechanics we deal with F ⃗ = m a ⃗ \vec{F} = m\vec{a} F = m a — vectors in real x y z xyz x y z space. But the world has constraints (a bead on a wire, a pendulum, a double pendulum). Lagrangian mechanics replaces awkward Cartesian coordinates r ⃗ i \vec{r}_i r i with generalized coordinates q j q_j q j that already "know" the constraints.
Once you change coordinates, you also need new versions of "momentum" and "force." Those are the generalized momentum p j p_j p j and generalized force Q j Q_j Q j . They are whatever quantities make Newton's law look the same in the new coordinates .
Definition Generalized coordinates
A set of independent variables q 1 , q 2 , … , q n q_1, q_2, \dots, q_n q 1 , q 2 , … , q n that completely specify the configuration of a system with n n n degrees of freedom. Each particle's position is a function:
r ⃗ i = r ⃗ i ( q 1 , … , q n , t ) \vec{r}_i = \vec{r}_i(q_1,\dots,q_n,\,t) r i = r i ( q 1 , … , q n , t )
WHY this form? Because the constraints are baked in: a pendulum bob has r ⃗ = ( ℓ sin θ , − ℓ cos θ ) \vec r = (\ell\sin\theta, -\ell\cos\theta) r = ( ℓ sin θ , − ℓ cos θ ) — one coordinate θ \theta θ , not two Cartesian ones tied by x 2 + y 2 = ℓ 2 x^2+y^2=\ell^2 x 2 + y 2 = ℓ 2 .
The generalized velocity is q ˙ j = d q j / d t \dot q_j = dq_j/dt q ˙ j = d q j / d t . By the chain rule,
v ⃗ i = d r ⃗ i d t = ∑ j ∂ r ⃗ i ∂ q j q ˙ j + ∂ r ⃗ i ∂ t . \vec{v}_i = \frac{d\vec r_i}{dt} = \sum_j \frac{\partial \vec r_i}{\partial q_j}\dot q_j + \frac{\partial \vec r_i}{\partial t}. v i = d t d r i = ∑ j ∂ q j ∂ r i q ˙ j + ∂ t ∂ r i .
The cleanest definition comes from virtual work . Imagine displacing each particle by an infinitesimal virtual amount δ r ⃗ i \delta \vec r_i δ r i consistent with constraints, at fixed time . The work done by the applied forces F ⃗ i \vec F_i F i is
δ W = ∑ i F ⃗ i ⋅ δ r ⃗ i . \delta W = \sum_i \vec F_i \cdot \delta \vec r_i. δ W = ∑ i F i ⋅ δ r i .
Now express δ r ⃗ i \delta \vec r_i δ r i in generalized coordinates (time frozen, so no ∂ / ∂ t \partial/\partial t ∂ / ∂ t term):
δ r ⃗ i = ∑ j ∂ r ⃗ i ∂ q j δ q j . \delta \vec r_i = \sum_j \frac{\partial \vec r_i}{\partial q_j}\,\delta q_j. δ r i = ∑ j ∂ q j ∂ r i δ q j .
Substitute and swap the order of summation:
δ W = ∑ j ( ∑ i F ⃗ i ⋅ ∂ r ⃗ i ∂ q j ⏟ ≡ Q j ) δ q j . \delta W = \sum_j \left( \underbrace{\sum_i \vec F_i \cdot \frac{\partial \vec r_i}{\partial q_j}}_{\equiv\, Q_j}\right)\delta q_j. δ W = ∑ j ≡ Q j i ∑ F i ⋅ ∂ q j ∂ r i δ q j .
Definition Generalized force
Q j = ∑ i F ⃗ i ⋅ ∂ r ⃗ i ∂ q j so that δ W = ∑ j Q j δ q j . \boxed{\,Q_j = \sum_i \vec F_i \cdot \frac{\partial \vec r_i}{\partial q_j}\,}\qquad\text{so that}\qquad \delta W = \sum_j Q_j\,\delta q_j. Q j = i ∑ F i ⋅ ∂ q j ∂ r i so that δ W = ∑ j Q j δ q j .
Q j Q_j Q j really?
Q j Q_j Q j is "the thing that, multiplied by δ q j \delta q_j δ q j , gives work." So its units are (energy / unit of q j q_j q j ).
If q j q_j q j is a length → Q j Q_j Q j is an ordinary force (N).
If q j q_j q j is an angle → Q j Q_j Q j is a torque (N·m)!
The single formula Q j δ q j = Q_j\,\delta q_j = Q j δ q j = work automatically gives you force OR torque depending on the coordinate. That is the magic.
Definition Generalized (canonical) momentum
p j = ∂ L ∂ q ˙ j \boxed{\,p_j = \frac{\partial L}{\partial \dot q_j}\,} p j = ∂ q ˙ j ∂ L
where L = T − V L = T - V L = T − V is the Lagrangian, T T T kinetic energy, V V V potential.
WHY define it this way? Watch what the Euler–Lagrange equation becomes:
d d t ∂ L ∂ q ˙ j − ∂ L ∂ q j = 0 ⟹ p ˙ j = ∂ L ∂ q j . \frac{d}{dt}\frac{\partial L}{\partial \dot q_j} - \frac{\partial L}{\partial q_j}=0 \;\;\Longrightarrow\;\; \dot p_j = \frac{\partial L}{\partial q_j}. d t d ∂ q ˙ j ∂ L − ∂ q j ∂ L = 0 ⟹ p ˙ j = ∂ q j ∂ L .
This is Newton's second law in disguise : rate of change of (generalized) momentum = (generalized) force. Defining p j p_j p j as ∂ L / ∂ q ˙ j \partial L/\partial \dot q_j ∂ L / ∂ q ˙ j is precisely what makes this true.
Worked example Recover ordinary momentum
For a free particle L = 1 2 m x ˙ 2 L = \tfrac12 m\dot x^2 L = 2 1 m x ˙ 2 , p x = ∂ L / ∂ x ˙ = m x ˙ p_x = \partial L/\partial \dot x = m\dot x p x = ∂ L / ∂ x ˙ = m x ˙ . ✓ Ordinary momentum is a special case.
Worked example Angular momentum appears for free
Polar coordinates: T = 1 2 m ( r ˙ 2 + r 2 θ ˙ 2 ) T = \tfrac12 m(\dot r^2 + r^2\dot\theta^2) T = 2 1 m ( r ˙ 2 + r 2 θ ˙ 2 ) . Then
p θ = ∂ L ∂ θ ˙ = m r 2 θ ˙ = L ang . p_\theta = \frac{\partial L}{\partial \dot\theta} = m r^2 \dot\theta = L_{\text{ang}}. p θ = ∂ θ ˙ ∂ L = m r 2 θ ˙ = L ang .
Why this step? The coordinate is an angle, so its conjugate momentum is angular momentum — exactly matching the force/torque pattern from §2.
Intuition Conservation falls out (the 80/20 payoff)
If L L L does not depend on a coordinate q j q_j q j (it's cyclic/ignorable ), then ∂ L / ∂ q j = 0 \partial L/\partial q_j = 0 ∂ L / ∂ q j = 0 , so p ˙ j = 0 \dot p_j = 0 p ˙ j = 0 → p j p_j p j is conserved.
This is the deepest reason momentum is conserved: it's a symmetry . No θ \theta θ in L L L ⇒ angular momentum conserved.
System: mass m m m , rod length ℓ \ell ℓ , gravity g g g , coordinate θ \theta θ .
Step 1 — position. r ⃗ = ( ℓ sin θ , − ℓ cos θ ) \vec r = (\ell\sin\theta,\,-\ell\cos\theta) r = ( ℓ sin θ , − ℓ cos θ ) .
Why: one DOF, θ \theta θ encodes the constraint ∣ r ⃗ ∣ = ℓ |\vec r|=\ell ∣ r ∣ = ℓ .
Step 2 — kinetic energy. v ⃗ = ℓ θ ˙ ( cos θ , sin θ ) \vec v = \ell\dot\theta(\cos\theta,\sin\theta) v = ℓ θ ˙ ( cos θ , sin θ ) , so ∣ v ⃗ ∣ = ℓ θ ˙ |\vec v|=\ell\dot\theta ∣ v ∣ = ℓ θ ˙ , giving T = 1 2 m ℓ 2 θ ˙ 2 T=\tfrac12 m\ell^2\dot\theta^2 T = 2 1 m ℓ 2 θ ˙ 2 .
Step 3 — potential. V = m g y = − m g ℓ cos θ V = mgy = -mg\ell\cos\theta V = m g y = − m g ℓ cos θ .
Step 4 — Lagrangian. L = 1 2 m ℓ 2 θ ˙ 2 + m g ℓ cos θ L = \tfrac12 m\ell^2\dot\theta^2 + mg\ell\cos\theta L = 2 1 m ℓ 2 θ ˙ 2 + m g ℓ cos θ .
Step 5 — generalized momentum.
p θ = ∂ L ∂ θ ˙ = m ℓ 2 θ ˙ . p_\theta = \frac{\partial L}{\partial \dot\theta}= m\ell^2\dot\theta. p θ = ∂ θ ˙ ∂ L = m ℓ 2 θ ˙ .
Why this step? p θ p_\theta p θ is angular momentum about the pivot (units kg·m²/s). ✓
Step 6 — generalized force. Conservative, so Q θ = − ∂ V / ∂ θ = − m g ℓ sin θ Q_\theta = -\partial V/\partial\theta = -mg\ell\sin\theta Q θ = − ∂ V / ∂ θ = − m g ℓ sin θ .
Why this step? θ \theta θ is an angle ⇒ Q θ Q_\theta Q θ is a torque . And − m g ℓ sin θ -mg\ell\sin\theta − m g ℓ sin θ is exactly the restoring torque of gravity. ✓
Step 7 — equation of motion. p ˙ θ = Q θ ⇒ m ℓ 2 θ ¨ = − m g ℓ sin θ ⇒ θ ¨ = − g ℓ sin θ . \dot p_\theta = Q_\theta \Rightarrow m\ell^2\ddot\theta = -mg\ell\sin\theta \Rightarrow \ddot\theta = -\tfrac{g}{\ell}\sin\theta. p ˙ θ = Q θ ⇒ m ℓ 2 θ ¨ = − m g ℓ sin θ ⇒ θ ¨ = − ℓ g sin θ . ✓ The pendulum equation, derived with zero free-body diagrams.
Worked example Bead on a rotating wire
A bead slides on a frictionless straight wire forced to rotate at constant ω \omega ω , so θ = ω t \theta=\omega t θ = ω t . Generalized coordinate: r r r . Here T = 1 2 m ( r ˙ 2 + r 2 ω 2 ) T=\tfrac12 m(\dot r^2 + r^2\omega^2) T = 2 1 m ( r ˙ 2 + r 2 ω 2 ) .
Forecast: Is p r = m r ˙ p_r=m\dot r p r = m r ˙ ? Is there a generalized force even with no real applied force?
Verify: p r = ∂ L / ∂ r ˙ = m r ˙ p_r=\partial L/\partial\dot r = m\dot r p r = ∂ L / ∂ r ˙ = m r ˙ ✓. Euler–Lagrange: m r ¨ = m r ω 2 m\ddot r = m r\omega^2 m r ¨ = m r ω 2 — the centrifugal term appears as an effective generalized force from the q q q -dependence of T T T , not from V V V . That term is ∂ T / ∂ r \partial T/\partial r ∂ T / ∂ r , reminding us Q j Q_j Q j in its general form lives inside ∂ L / ∂ q j \partial L/\partial q_j ∂ L / ∂ q j , not only − ∂ V / ∂ q j -\partial V/\partial q_j − ∂ V / ∂ q j .
Common mistake "Generalized momentum is always
m q ˙ m\dot q m q ˙ ."
Why it feels right: p = m v p=mv p = m v is burned into us. Reality: p θ = m ℓ 2 θ ˙ p_\theta = m\ell^2\dot\theta p θ = m ℓ 2 θ ˙ has units of kg·m²/s, not kg·m/s. Always compute p j = ∂ L / ∂ q ˙ j p_j=\partial L/\partial\dot q_j p j = ∂ L / ∂ q ˙ j ; the mass factor and the units depend on the coordinate.
Common mistake "Generalized force = real force component."
Why it feels right: for Cartesian q = x q=x q = x it literally is. Reality: for an angular coordinate it's a torque; in general Q j = ∑ i F ⃗ i ⋅ ∂ r ⃗ i / ∂ q j Q_j=\sum_i \vec F_i\cdot \partial\vec r_i/\partial q_j Q j = ∑ i F i ⋅ ∂ r i / ∂ q j is a weighted projection with the strange-units weight ∂ r ⃗ i / ∂ q j \partial\vec r_i/\partial q_j ∂ r i / ∂ q j .
Common mistake "If a coordinate is cyclic, the velocity
q ˙ \dot q q ˙ is constant."
Why it feels right: sounds like conservation. Reality: it's the momentum p j p_j p j that's constant. For the pendulum-like case p θ = m r 2 θ ˙ p_\theta=mr^2\dot\theta p θ = m r 2 θ ˙ conserved means θ ˙ \dot\theta θ ˙ changes as r r r changes (figure skater pulling in arms).
Common mistake Forgetting the explicit-time term in
δ r ⃗ i \delta\vec r_i δ r i .
For virtual displacements time is frozen, so we drop ∂ r ⃗ i / ∂ t \partial\vec r_i/\partial t ∂ r i / ∂ t . Confusing virtual (δ \delta δ ) with real (d d d ) displacements corrupts Q j Q_j Q j .
Recall Feynman: explain to a 12-year-old
Imagine pushing a merry-go-round. To describe it you don't track every plank's x , y x,y x , y — you just track one angle. "How hard you push" still matters, but now the useful number is twist (torque) instead of plain push, and "how much it's spinning" (angular momentum) instead of plain speed. Lagrangian mechanics has one master recipe: write down energy, and the force-like and momentum-like numbers for whatever variable you chose pop right out — push for a slider, twist for a spinner, automatically.
"P is partial-velocity, Q is project-onto."
p j = ∂ L / ∂ q ˙ j p_j=\partial L/\partial\dot q_j p j = ∂ L / ∂ q ˙ j (differentiate by the dot ) and Q j = F ⃗ ⋅ ∂ r ⃗ / ∂ q j Q_j=\vec F\cdot\partial\vec r/\partial q_j Q j = F ⋅ ∂ r / ∂ q j (project force onto how position responds to q j q_j q j ). And: "Cyclic coordinate ⇒ conserved momentum."
Define generalized momentum p j p_j p j . p j = ∂ L ∂ q ˙ j p_j=\dfrac{\partial L}{\partial \dot q_j} p j = ∂ q ˙ j ∂ L , the derivative of the Lagrangian w.r.t. generalized velocity.
Define generalized force Q j Q_j Q j from virtual work. Q j = ∑ i F ⃗ i ⋅ ∂ r ⃗ i ∂ q j Q_j=\sum_i \vec F_i\cdot\dfrac{\partial \vec r_i}{\partial q_j} Q j = ∑ i F i ⋅ ∂ q j ∂ r i , defined so
δ W = ∑ j Q j δ q j \delta W=\sum_j Q_j\,\delta q_j δ W = ∑ j Q j δ q j .
For conservative forces, Q j = ? Q_j=? Q j = ? Q j = − ∂ V ∂ q j Q_j=-\dfrac{\partial V}{\partial q_j} Q j = − ∂ q j ∂ V .
Why does an angular coordinate give a torque, not a force? Because
Q j δ q j Q_j\delta q_j Q j δ q j must equal work; if
q j q_j q j is an angle then
Q j Q_j Q j has units energy/radian = N·m = torque.
State the "cancellation of dots" identity. ∂ v ⃗ i ∂ q ˙ j = ∂ r ⃗ i ∂ q j \dfrac{\partial \vec v_i}{\partial \dot q_j}=\dfrac{\partial \vec r_i}{\partial q_j} ∂ q ˙ j ∂ v i = ∂ q j ∂ r i , since
v ⃗ i \vec v_i v i is linear in
q ˙ j \dot q_j q ˙ j .
What is a cyclic (ignorable) coordinate and its consequence? One that doesn't appear in
L L L ; then
p ˙ j = ∂ L / ∂ q j = 0 \dot p_j=\partial L/\partial q_j=0 p ˙ j = ∂ L / ∂ q j = 0 , so
p j p_j p j is conserved.
Generalized momentum of plane-polar θ \theta θ for T = 1 2 m ( r ˙ 2 + r 2 θ ˙ 2 ) T=\frac12 m(\dot r^2+r^2\dot\theta^2) T = 2 1 m ( r ˙ 2 + r 2 θ ˙ 2 ) ? p θ = m r 2 θ ˙ p_\theta=mr^2\dot\theta p θ = m r 2 θ ˙ = angular momentum.
Why isn't p j p_j p j always m q ˙ j m\dot q_j m q ˙ j ? Because
p j = ∂ L / ∂ q ˙ j p_j=\partial L/\partial\dot q_j p j = ∂ L / ∂ q ˙ j ; units and mass factors depend on the coordinate (e.g.
m ℓ 2 θ ˙ m\ell^2\dot\theta m ℓ 2 θ ˙ for a pendulum).
In virtual work, why drop ∂ r ⃗ i / ∂ t \partial\vec r_i/\partial t ∂ r i / ∂ t ? Virtual displacements are taken at frozen time, so the explicit time term vanishes.
How does Euler–Lagrange relate p j p_j p j and Q j Q_j Q j ? p ˙ j = ∂ L / ∂ q j \dot p_j=\partial L/\partial q_j p ˙ j = ∂ L / ∂ q j , i.e. rate of change of generalized momentum equals the generalized "force" term — Newton's law restated.
Lagrangian Mechanics — L = T − V L=T-V L = T − V , the source object for both p j p_j p j and Q j Q_j Q j .
Euler-Lagrange Equation — the equation p ˙ j = ∂ L / ∂ q j \dot p_j=\partial L/\partial q_j p ˙ j = ∂ L / ∂ q j that unifies them.
Generalized coordinates and constraints — where q j q_j q j and r ⃗ i ( q , t ) \vec r_i(q,t) r i ( q , t ) come from.
D'Alembert's Principle — virtual work foundation that defines Q j Q_j Q j .
Noether's Theorem — cyclic coordinate ⇒ conserved p j p_j p j as a special case.
Hamiltonian Mechanics — p j p_j p j becomes an independent variable; Legendre transform.
Angular momentum — the p θ p_\theta p θ special case.
Generalized coordinates qj
Generalized velocity qj dot
Cancellation of dots identity
Virtual displacement delta ri
Intuition Hinglish mein samjho
Dekho, Lagrangian mechanics ka pura idea yeh hai ki ham awkward x , y , z x,y,z x , y , z coordinates chhod kar apne "soch ke chune hue" coordinates q j q_j q j use karte hain — jaise pendulum ke liye sirf angle θ \theta θ . Jab coordinate badla, toh momentum aur force ke bhi naye versions chahiye. Inhi ko bolte hain generalized momentum p j = ∂ L / ∂ q ˙ j p_j=\partial L/\partial \dot q_j p j = ∂ L / ∂ q ˙ j aur generalized force Q j = ∑ i F ⃗ i ⋅ ∂ r ⃗ i / ∂ q j Q_j=\sum_i \vec F_i\cdot \partial \vec r_i/\partial q_j Q j = ∑ i F i ⋅ ∂ r i / ∂ q j .
Sabse mast baat: Q j Q_j Q j ki definition virtual work se aati hai — δ W = ∑ j Q j δ q j \delta W=\sum_j Q_j\,\delta q_j δ W = ∑ j Q j δ q j . Iska matlab agar q j q_j q j length hai toh Q j Q_j Q j normal force (Newton) banta hai, lekin agar q j q_j q j ek angle hai toh Q j Q_j Q j apne aap torque ban jaata hai! Ek hi formula, dono kaam. Same tarah, pendulum ka p θ = m ℓ 2 θ ˙ p_\theta=m\ell^2\dot\theta p θ = m ℓ 2 θ ˙ nikalta hai jo actually angular momentum hai. Isliye yeh mat ratna ki "momentum hamesha m v m v m v hota hai" — units coordinate pe depend karte hain.
Sabse powerful idea (80/20 wala): agar Lagrangian L L L mein koi coordinate q j q_j q j dikhta hi nahi (cyclic coordinate), toh p ˙ j = ∂ L / ∂ q j = 0 \dot p_j=\partial L/\partial q_j=0 p ˙ j = ∂ L / ∂ q j = 0 , yaani p j p_j p j conserved . Yahi figure-skater wala physics hai — haath andar khinche, r r r chhota hua, p θ p_\theta p θ constant raha, toh θ ˙ \dot\theta θ ˙ badh gaya. Exam aur intuition dono ke liye yeh ek line gold hai: symmetry → conservation .
Tip: Hamesha steps follow karo — position r ⃗ ( q ) \vec r(q) r ( q ) likho, T T T aur V V V nikalo, L = T − V L=T-V L = T − V banao, fir p j p_j p j aur Q j Q_j Q j derive karke Euler–Lagrange p ˙ j = Q j \dot p_j=Q_j p ˙ j = Q j laga do. No free-body diagrams ki tension.