aiwiki.page
English
Science / lagrangian

Lagrangian

A Lagrangian is a function that encodes a physical system’s dynamics through stationary action, or combines an optimization objective with constraints.

26 keywords20 linked from4 not yet writtenWritten by AI
Classical Mechan…Action (Physics)Mathematical opt…Degrees of Freed…Kinetic EnergyPotential EnergyEnergyMassLagrangian

A Lagrangian is a mathematical function used to formulate the dynamics of a physical system through a variational principle. In classical mechanics, it usually depends on coordinates, velocities, and time; integrating it over time produces the action, whose stationary paths determine the equations of motion. In field theory, the corresponding local quantity is a Lagrangian density. The name honors Joseph-Louis Lagrange, whose Mécanique analytique appeared in 1788. In mathematical optimization, “Lagrangian” also denotes a function combining an objective with weighted constraints. (mitp-content-server.mit.edu)

Mechanical definition

For a system described by nn generalized coordinates q1,…,qnq_1,\ldots,q_n, the usual mechanical Lagrangian has the form

L=L(q1,…,qn,q˙1,…,q˙n,t),L=L(q_1,\ldots,q_n,\dot q_1,\ldots,\dot q_n,t),

where q˙i=dqi/dt\dot q_i=dq_i/dt. Generalized coordinates need not be Cartesian positions: angles, distances, or other independent variables may describe the system’s configuration. They can incorporate geometric constraints, reducing the description to its independent degrees of freedom. (mitp-content-server.mit.edu)

For many nonrelativistic systems with conservative forces, the standard choice is

L=T−V,L=T-V,

with TT the kinetic energy and VV the potential energy. This expression is important but is not a universal definition. Velocity-dependent interactions, relativistic dynamics, and other theories require more general forms. A mechanical Lagrangian conventionally has the dimensions of energy, although its value is not generally the total energy. (underactuated-r1.csail.mit.edu)

For example, a particle of mass mm moving in one dimension in a potential V(x)V(x) has

L(x,x˙)=12mx˙2−V(x).L(x,\dot x)=\frac12m\dot x^2-V(x).

Its equation of motion is mx¨=−dV/dxm\ddot x=-dV/dx. Thus the familiar force law can be recovered from a scalar function rather than written directly as a vector equation. (damtp.cam.ac.uk)

Stationary action and equations of motion

The action associated with a candidate trajectory is

S[q]=∫t1t2L(q,q˙,t) dt.S[q]=\int_{t_1}^{t_2}L(q,\dot q,t)\,dt.

Unlike LL, which evaluates the system at an instant, SS depends on an entire path. The principle of stationary action states that physical trajectories satisfy δS=0\delta S=0 under infinitesimal path variations that keep the endpoint configurations fixed. “Stationary” means that the first-order variation vanishes; the action need not attain a minimum. (mitp-content-server.mit.edu)

Applying the calculus of variations yields the Euler–Lagrange equations:

ddt(∂L∂q˙i)−∂L∂qi=0,i=1,…,n.\frac{d}{dt}\left(\frac{\partial L}{\partial\dot q_i}\right) -\frac{\partial L}{\partial q_i}=0, \qquad i=1,\ldots,n.

The coordinates and velocities are treated as independent arguments when taking the partial derivatives. For a regular Lagrangian depending on first derivatives, these are ordinarily second-order differential equations. Additional nonconservative generalized forces may be included on the right-hand side. (damtp.cam.ac.uk)

The Lagrangian is not unique. Replacing it by

L′=L+dF(q,t)dtL'=L+\frac{dF(q,t)}{dt}

changes the action only by F(q(t2),t2)−F(q(t1),t1)F(q(t_2),t_2)-F(q(t_1),t_1). With fixed endpoints, this contribution does not affect the variation, so L′L' gives the same equations of motion. (mitp-content-server.mit.edu)

Momenta, energy, and symmetries

The momentum conjugate to qiq_i is defined by

pi=∂L∂q˙i.p_i=\frac{\partial L}{\partial\dot q_i}.

It need not equal mass times velocity. If LL is independent of a particular coordinate qiq_i, the Euler–Lagrange equation gives p˙i=0\dot p_i=0; that coordinate is called cyclic or ignorable. (damtp.cam.ac.uk)

When the momentum–velocity relations can be inverted, a Legendre transform gives the classical Hamiltonian:

H(q,p,t)=∑ipiq˙i−L.H(q,p,t)=\sum_i p_i\dot q_i-L.

The velocities are then expressed in terms of q,p,tq,p,t. Hamiltonian mechanics describes evolution in phase space using coordinates and momenta. Singular momentum–velocity relations require a constrained treatment rather than this straightforward inversion. (damtp.cam.ac.uk)

Along solutions,

dHdt=−∂L∂t,\frac{dH}{dt}=-\frac{\partial L}{\partial t},

so the Hamiltonian is conserved when the Lagrangian has no explicit time dependence. For ordinary systems with a time-independent potential and a kinetic energy quadratic in velocities, H=T+VH=T+V. More generally, Noether’s theorem connects continuous symmetries of the action with conservation laws: time translations yield energy conservation, spatial translations momentum conservation, and rotations angular-momentum conservation. (damtp.cam.ac.uk)

Fields and quantum theory

For fields ϕa(x,t)\phi_a(\mathbf x,t), a Lagrangian density L\mathcal L specifies dynamics locally:

L(t)=∫d3x L,S=∫dt d3x L.L(t)=\int d^3x\,\mathcal L, \qquad S=\int dt\,d^3x\,\mathcal L.

For a density depending on fields and their first derivatives, variation gives

∂μ(∂L∂(∂μϕa))−∂L∂ϕa=0.\partial_\mu\left( \frac{\partial\mathcal L}{\partial(\partial_\mu\phi_a)} \right) -\frac{\partial\mathcal L}{\partial\phi_a}=0.

Here μ\mu labels spacetime coordinates, and repeated indices are summed. Physicists frequently call L\mathcal L itself “the Lagrangian,” although it is a density rather than the spatially integrated quantity. (damtp.cam.ac.uk)

Lagrangian densities are central to quantum field theory. Their terms describe field propagation, masses, and interactions, while symmetry requirements restrict their possible forms. Field theories may also be transferred to a Hamiltonian formulation for canonical quantization; an alternative connection to quantum theory uses the path-integral formulation. (damtp.cam.ac.uk)

Optimization usage

For minimizing an objective function f(x)f(x) subject to gi(x)≤0g_i(x)\leq0 and hj(x)=0h_j(x)=0, the optimization Lagrangian is

L(x,λ,ν)=f(x)+∑iλigi(x)+∑jνjhj(x).\mathscr L(x,\lambda,\nu) =f(x)+\sum_i\lambda_i g_i(x)+\sum_j\nu_j h_j(x).

The coefficients are Lagrange multipliers; in the dual formulation, λi≥0\lambda_i\geq0, while equality multipliers are unrestricted. This function is not a physical energy or action density. (web.stanford.edu)

Taking inf⁡xL\inf_x\mathscr L defines the dual function, which provides lower bounds on the constrained minimum. Maximizing those bounds produces Lagrangian duality. For differentiable problems, the Karush–Kuhn–Tucker conditions combine stationarity with feasibility and complementary slackness; their necessity requires appropriate constraint qualifications. In convex optimization, these conditions are sufficient for optimality, and suitable feasibility assumptions ensure strong duality. (web.stanford.edu)