Lagrange Multipliers and Constraint Forces
The signature move of Lagrangian mechanics is a disappearing act. Choose independent generalized coordinates and the constraint forces — the normal force on the bead, the tension in the pendulum string, the friction that keeps a wheel from skidding — vanish from the equations entirely. You solve for the motion without ever meeting the forces that shepherd it. For half the problems you will ever face, that is precisely the magic you want. For the other half, the shepherd is the whole point. A skier schussing over an icy dome stays on the snow only while the surface pushes; the instant that push would have to become a pull, she is airborne — and where that happens is a question about the normal force, the very thing the elegant method erased. A string can only pull: whether it goes slack is a question about tension. An engineer sizing the bearings of a robot joint needs the reaction forces themselves, not just the trajectory. Lagrangian mechanics would be a lesser tool if its price were permanent amnesia about constraint forces. The method of Lagrange multipliers is the refund counter. Keep the redundant coordinates, adjoin each constraint to the dynamics with an undetermined function , and solve for coordinates and multipliers together. The reward is a theorem with real cash value: the multiplier term is the generalized force of constraint. The same that closes the equations hands you the normal force, the tension, the static friction — and, by crossing zero, announces the exact moment a one-sided constraint lets go.
- Eliminating holonomic constraints by choosing independent coordinates is elegant but destroys information: the constraint forces disappear from the formalism.
- The multiplier method keeps all redundant coordinates and adjoins each constraint with an undetermined function .
- The equations become , solved simultaneously with the constraints — equations for coordinates and multipliers.
- The right-hand side is exactly the generalized constraint force, : gradients give the direction (normal to the constraint surface), multipliers the time-varying strength.
- One-sided constraints switch off when crosses zero — the particle leaves the surface, the string goes slack; tracking is how you catch the moment.
- Pfaffian velocity constraints cannot be eliminated at all; there the multipliers are not a convenience but the only correct route.
- Key idea: adjoin each constraint to the equations of motion with an undetermined multiplier; the multiplier term in the modified Euler–Lagrange equation IS the generalized force of constraint, .
Where this lives today
Every physics engine and robotics simulator is a Lagrange-multiplier machine running in a loop. Multibody codes — the simulators inside MuJoCo, Drake, and the CAD tools that size actual joints — assemble exactly the system (1)–(2) for thousands of bodies and solve for accelerations and multipliers at every time step; the vector is not a by-product but a deliverable, because bearing loads, joint reactions, and motor torque budgets are read straight from it. Contact adds the one-sided twist this article met on the dome: a foot or gripper can push but not pull, so engines impose the complementarity condition , gap , — a wall of simultaneous skier-takeoff problems — and solving that system fast is a whole subfield (LCP and cone-programming solvers). The numerical drift of under repeated differentiation, and its Baumgarte-style stabilizations, remain everyday concerns; a humanoid robot that face-plants in simulation has, more often than not, suffered a constraint-force solve gone wrong rather than bad physics. At the molecular scale the method runs under different branding. Molecular-dynamics packages hold every rigid bond of a protein at fixed length with SHAKE/RATTLE — iterative solvers for precisely the multipliers of the bond constraints — letting simulations take time steps set by conformational motion instead of bond vibration. A production MD run on a solvated protein enforces hundreds of thousands of constraints, computing that many 's every femtosecond-scale step, trillions of multiplier solves per microsecond of biology. Lagrange's refund counter, opened in 1788 to recover a string tension, now clears more transactions per second than any other idea in classical mechanics.
The physical picture
Picture the configuration of the system as a point in the -dimensional space of all the redundant coordinates. The constraints carve out a surface in that space, and the physical motion is condemned to live on it. The unconstrained dynamics — gravity, springs, whatever encodes — pulls the point off the surface; the surface answers with a push along its normal direction. And the normal direction at any point is exactly the gradient . The multiplier is the one thing geometry cannot supply: how hard the surface pushes, instant by instant. The method's entire content is: add a normal push of unknown strength, then determine the strength from the requirement that the motion stays on the surface.
The physics licensing this picture is the principle the d'Alembert article established: ideal constraint forces do no virtual work. A displacement consistent with the constraints is tangent to the surface; a force that does no work on any such displacement must be perpendicular to all of them — that is, along the normals, a combination . So the multiplier expansion is not an ansatz but the most general ideal constraint force. Conversely, anything the constraint does that is not along the normals (sliding friction, drag from a moving guide) is by definition not ideal and must be booked separately as an applied generalized force.
One more preliminary sharpens the method's scope. For holonomic constraints you always have two options — eliminate coordinates (the route of the Euler–Lagrange article) or keep them and pay with multipliers. For Pfaffian velocity constraints, with no integrating function, elimination is impossible even in principle: the constraint restricts velocities without confining the configuration to any surface, so there is no smaller coordinate set to retreat to. A ball rolling on a plane can reach every position with every orientation — nothing is eliminable — yet its velocities are constrained at every instant. For that entire class, multipliers are the only game in town.
The equations of the method
Everything the method needs fits in three displays. The dynamics: each of the redundant coordinates gets an Euler–Lagrange equation with a constraint-force term on the right,
where: is built in the full redundant coordinate set (never substitute the constraints into it — see the warning below); — the -th holonomic constraint; — its multiplier, an unknown function of time, not a constant. The system is closed by the constraints themselves,
where: equations (1) and (2) together are equations for the unknowns — a closed, determinate system. And the payoff identity, the reason to be here at all:
where: — the generalized force of constraint conjugate to , in exactly the sense of the generalized-forces article: its virtual work is . Once the coupled system is solved, equation (3) converts each multiplier into newtons (or newton-metres, depending on the coordinate) with no further physics. For velocity constraints the same structure holds with the gradient replaced by the velocity coefficients:
where: , — the Pfaffian coefficients; when the constraint happens to be integrable, and (4) collapses to (1). Deep subtleties of genuinely non-integrable constraints — including why one must attach multipliers to the equations of motion rather than naively constraining the variations inside the action (the "vakonomic" trap) — belong to the nonholonomic-systems article; here we note only that (4) is the form validated by experiment for rolling bodies. Finally, energy bookkeeping. Multiplying (1) by and summing gives the balance for the energy function (the Jacobi integral):
where: the second term is the power fed in by moving constraints. A frozen (scleronomic) surface has : it pushes only perpendicular to every actual displacement and does no work — the skier's dome steers her without paying her. A rotating wire or advancing wall has and pumps real energy through the very same .
Eliminate or multiply? The decision table
| situation | eliminate coordinates | keep + multipliers |
|---|---|---|
| only the trajectory wanted | ✓ fewest equations () | works, but wasteful |
| constraint force wanted (tension, normal, friction) | ✗ force is erased | ✓ delivers it via (3) |
| one-sided constraint (surface, string) | ✗ cannot detect release | ✓ watch for |
| Pfaffian, non-integrable | ✗ impossible in principle | ✓ only correct route, eq. (4) |
| many constraints, computer solving | awkward re-parametrization | ✓ uniform structure — the multibody-dynamics standard |
The goal is the full method — equations (1)–(3) — derived from d'Alembert's principle, with the identification of the multiplier term as the ideal constraint force built in rather than bolted on. The strategy is the classic rescue of a stuck argument: d'Alembert gives one scalar equation whose displacement coefficients we may not set to zero individually (the are entangled by the constraints), and the multipliers are precisely the objects that untangle them — free functions spent to kill dependent coefficients, leaving only independent ones. Watch the counting throughout: it is the bookkeeping, not the calculus, that carries this proof, and the same counting closes the final system.
Step 1. Start from d'Alembert's principle in generalized form, established in the d'Alembert article: along the actual motion, with all applied forces derived from the potential inside ,
for every virtual displacement consistent with the constraints. Why we cannot conclude : that inference needs independent , and ours are not — this is exactly the point where redundant coordinates break the usual Euler–Lagrange derivation.
Step 2. State the entanglement. Virtual displacements are taken at frozen time, so staying on the surface demands
Why frozen time: virtual displacements probe the constraint surface as it is now; even for a moving surface the term is deliberately excluded. Only of the are independent.
Step 3. Adjoin with free multipliers. For any functions whatsoever, the combination is zero by Step 2, so it may be subtracted from Step 1 without changing anything:
Step 4. Spend the freedom. Order the coordinates so the last displacements are the dependent ones. Choose the functions to make the last brackets vanish identically — an linear solve, possible whenever the constraint gradients are independent. What remains is a sum over the first brackets multiplying now independent displacements, so each of those brackets must vanish too. Why this trick works: the multipliers convert "coefficients of entangled variations sum to zero" into "every coefficient vanishes" — functions bought dependencies.
Step 5. Conclude and identify. All brackets vanish: , which is equation (1); together with the count is equations for unknowns. Moving the constraint term to the force side and comparing with the Lagrange equations driven by a general applied force identifies — and Step 2 guarantees on allowed displacements: an ideal force, as promised. Verified: for the equations reduce to the ordinary Euler–Lagrange system; the construction matches Goldstein §2.4 and Lanczos Ch. V, and the identification of with the physical reaction is confirmed against elementary statics in the Atwood example below.
Go deeper · Derivation B · 2 minWhen the Skier Leaves the Dome
The goal is the celebrated departure result: a particle sliding from rest off a frictionless sphere of radius leaves the surface at , i.e. — derived by the multiplier method, which hands us the normal force as an explicit function and lets us watch it die. The strategy: keep both polar coordinates about the sphere's centre, impose with a multiplier, use the -equation (or energy conservation, faster) to eliminate , and read the takeoff from . Watch the one-sidedness: the dome can push () but never pull; the mathematics continues happily to , and it is physics that must declare the constraint switched off there.
Step 1. Set up in redundant coordinates, measured from the top:
The gradient is , : the multiplier enters only the radial equation, exactly as a normal force should.
Step 2. Write the two multiplier equations (1):
Why the second has no : the constraint surface is a sphere and -displacements are tangent to it — geometry has already promised the constraint force cannot push along .
Step 3. Impose the constraint: , . The radial equation collapses to an explicit formula for the multiplier:
Why the two terms compete: gravity's radial component presses the skier into the dome, while the centripetal requirement spends some of that press; the surface supplies only the difference. Takeoff is the moment the requirement eats the entire supply.
Step 4. Eliminate by energy conservation from rest at the top (the constraint is scleronomic, so by equation (5) it does no work): , hence . Substitute:
where: at the top, (full weight); the multiplier then falls faster than because speed builds while the geometry steepens.
Step 5. Read off the takeoff: at , i.e. — independent of mass, of , and of the sphere's radius. Beyond it the formula would go negative, a pull the dome cannot supply: the constraint deactivates and the motion switches to free projectile flight with launch speed . Verified: matches Morin Ch. 6 and Taylor Ch. 7; the Newtonian route — radial force balance with the same energy substitution — gives the identical , confirming is the normal force and not a formal shadow.
Go deeper · Derivation C · 2 minRolling Downhill — the Multiplier Is the Static Friction
The goal is the workhorse of rolling problems by the multiplier route: a hoop (and, for contrast, a disk) rolling without slipping down an incline of angle , with the constraint force — here the static friction at the contact — delivered by instead of by a free-body diagram. The strategy is to keep both natural coordinates, the descent distance and the rotation angle , tie them with the rolling constraint , and let the two gradient components distribute one multiplier as a force on and a torque on . Watch that double role: a single appearing in one equation as newtons and in the other as newton-metres is the method displaying the third-law pairing of friction-on-rim and friction-about-axle automatically.
Step 1. Coordinates and Lagrangian, with down the slope and the moment of inertia about the axis:
Gradients: , .
Step 2. The multiplier equations (1):
Why the signs are informative: whatever sign takes, it enters the two equations oppositely — the same contact force that holds back the slide ( on ) is what spins the wheel up ( on ). One unknown, two jobs.
Step 3. Differentiate the constraint, , and eliminate :
Step 4. Specialize. Hoop (): and — fully half the gravitational drive is routed through the contact into spin. Disk (): , . Numbers for , : drive ; hoop with friction ; disk with friction .
Step 5. Extract the physics only could give: rolling survives only while the demanded friction fits the static budget, . For the hoop this requires at ; for the disk . Below budget, the constraint dies — replaced by kinetic sliding friction and genuinely different equations. Verified: accelerations match the standard energy-method results ; the friction values match Newtonian free-body analysis (Taylor Ch. 7), and the thresholds reproduce Morin's rolling-slipping criterion.
Limiting cases
| case | result | meaning |
|---|---|---|
| no constraints, | plain Euler–Lagrange equations | the method degrades gracefully to the unconstrained formalism |
| holonomic, force not wanted | eliminate instead: coordinates | multipliers optional — a cost-benefit choice, per the decision table |
| on a one-sided constraint | surface/string releases | the zero of the multiplier is a physical event: takeoff, slackness |
| scleronomic constraints, | conserved, eq. (5) | frozen surfaces steer without paying; energy shortcuts are legal |
| rheonomic constraint, | moving constraints do real work through the same | |
| Pfaffian non-integrable | eq. (4), multipliers mandatory | no coordinate elimination exists; = contact force (rolling friction) |
Worked examples
1 · Atwood tension without a free-body diagram (confidence builder)
An Atwood machine has and on an ideal string over a massless pulley. Find the acceleration and the string tension by the multiplier method.
Step 1. Keep both downward displacements as coordinates. With the string inextensible, , and
Step 2. Equations (1), with : and . The same appears in both — the method knows a single string carries a single tension.
Step 3. Differentiate the constraint: . Subtracting the two equations: — mass 1 descends, as it must.
Step 4. Extract the multiplier from either equation: . The generalized constraint force on is — negative because it opposes the positive-down coordinate: it is the upward pull of the string. Tension: .
Step 5. Sanity checks. Equal masses: and — static balance. And note sits strictly between the two weights ( and ), as any correct Atwood tension must: it is , the harmonic-mean-flavoured combination, not the average. The reduced treatment in the Euler–Lagrange article gets the acceleration in one line — but only this route surfaces .
2 · The 70 kg skier on a 5 m dome, with numbers all the way down (exam level)
A 70 kg skier starts from rest atop a frictionless hemispherical dome of radius . Using from Derivation B: (a) tabulate the normal force at , and the takeoff; (b) find the takeoff angle, height lost, and speed; (c) verify the takeoff speed against the centripetal condition.
Step 1. The multiplier formula, equation (6): with .
Step 2. Tabulate. At : — the full weight, since at the summit nothing yet moves. At : , so — already down 40% though the skier has dropped only .
Step 3. Takeoff where : , . Height lost: — a third of the radius, always.
Step 4. Takeoff speed from energy (legal: the dome is scleronomic and does no work, eq. 5): , directed along the slope at below horizontal.
Step 5. Cross-check with the centripetal condition at release, where the dome contributes nothing and gravity's radial component alone must bend the path: demands ✓ — the same number from an independent argument, confirming both the multiplier formula and the energy step. Beyond this point the skier is a projectile; the constraint equation (2) simply stops applying, which is the formal meaning of "airborne."
Origins · 1 minJoseph-Louis Lagrange and how this was discovered
Lagrange invented the multiplier method twice over — once for constrained extrema in pure analysis, and once, in its full glory, for mechanics. The Mécanique analytique of 1788, published in Paris after his two decades running the Berlin Academy's mathematics (he was Euler's hand-picked successor), rebuilt the whole science on the principle of virtual work; its treatment of constrained equilibrium introduces the undetermined coefficients and reads off the forces of constraint from them, exactly as this article does with the dynamics. He was proudest of the book's austerity — the preface boasts that not a single figure will be found in it, mechanics reduced to pure analysis. History's small irony is that his coefficients became the most pictorial objects in the theory: every is a normal force you can point to — the push of a dome on a skier, the bite of a rail on a flange. Napoleon made him a count; he is buried in the Panthéon — the same building where, thirty-eight years later, Foucault would hang the pendulum whose tension is itself a Lagrange multiplier.
Going further
References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §1.3–1.4, §2.4 (multipliers and constraint forces) · Morin, Introduction to Classical Mechanics, Ch. 6 (Lagrangian method, constraint forces) · Landau & Lifshitz, Mechanics, 3rd ed., §1–2 (Lagrangian formalism) · Taylor, Classical Mechanics, Ch. 7 (Lagrange's equations with constraints) · Lanczos, The Variational Principles of Mechanics, Ch. V (multipliers and the geometry of constraints)
Provenance. Equations are the standard Lagrange-multiplier form of the equations of motion (Goldstein §1.4, §2.4; Morin Ch. 6; Taylor Ch. 7; Lanczos Ch. V). A verifier should: (i) re-derive the multiplier EOM from d'Alembert's principle and confirm the constraint force does zero virtual work; (ii) recompute the Atwood acceleration and tension , checking the equal-mass limit ; (iii) verify the bead/hoop normal against the centripetal balance at the bottom ; (iv) confirm the Pfaffian rolling constraint is non-integrable. No fabricated numerical constants are used. Worked-example numbers on this page (Atwood / kg: , ; skier kg, m: at , takeoff , drop m, m/s; rolling at , kg: hoop , N, disk , N, budgets ) are illustrative arithmetic recomputed from the displayed formulas.
Builds on: The Euler-Lagrange Equations · Constraints and Their Classification · Virtual Displacements and the Principle of Virtual Work · d'Alembert's Principle · Generalized Coordinates and Configuration Space Leads to: Generalized Forces and Generalized Momenta · The Energy Function and Jacobi Integral · Hamilton's Principle of Stationary Action · Degrees of Freedom
Are these the same Lagrange multipliers I met in multivariable calculus?
The very same idea wearing running shoes. In calculus you make stationary subject to by demanding : the gradient of the objective must be normal to the constraint surface, with measuring how hard the constraint fights the descent. Here the "objective" is the action, the constraint surface lives in configuration space, and stationarity subject to staying on the surface produces the same geometry: the Euler–Lagrange expression (the "gradient" of the action) equals times the constraint gradient — equation (1). Two upgrades distinguish mechanics: the multiplier becomes a function of time, because the strength of the constraint's fight varies along the motion; and it acquires a physical identity — newtons — as the actual reaction force, which calculus multipliers only hint at (there they are shadow prices, sensitivities of the optimum to relaxing the constraint; here that sensitivity is the force).
Why exactly is λ a function of time rather than an unknown constant?
Because it answers a question whose answer changes: "how hard must the surface push right now to keep the motion on it?" On the dome, that push is at the summit and zero at — no single constant does both. Formally, is determined pointwise by the same linear solve as the accelerations: differentiate the constraint twice, substitute the equations of motion, and appears algebraically at each instant. It is an unknown of the same standing as — solved with the motion, not before it and not after. The calculus-class habit of treating as one number is the single most reliable way to butcher these problems: the Atwood machine happens to have constant tension (nothing about its configuration changes the force balance), and that lucky special case is exactly what makes the habit feel safe until the first pendulum, whose string tension oscillates twice per swing.
What physically happens at λ = 0, and why does the mathematics not stop there on its own?
Nothing in equations (1)–(2) knows that your dome cannot pull. A bilateral constraint — a bead threaded on a wire, a rod rather than a string — pushes and pulls as needed, and swings through zero without incident. One-sided constraints carry an extra piece of physics outside the formalism: an inequality, (with the sign convention that positive means push). The multiplier solution remains mathematically valid past the zero; it simply describes a different device — a skier bolted to the dome. The correct procedure is event detection: integrate with the constraint active, watch , and at its zero switch the model — delete the constraint and its multiplier, hand the state over as initial conditions for free flight (or slack-string ballistics). Modern contact solvers encode precisely this as the complementarity condition : at every instant, either the constraint is taut with a non-negative force or it is inactive with zero force, never both.
Is rolling without slipping holonomic or not? I have seen it filed under both.
Both filings are correct, for different problems — dimensionality decides. A wheel rolling along a line (Derivation C) has constraint , which integrates immediately to : holonomic in disguise, so you could have eliminated a coordinate (though you would have lost the friction force). A ball or coin rolling on a plane is the genuine article: the two contact conditions couple to the angular velocities in a way that cannot be integrated into any relation among coordinates alone. The tell is reachability — by rolling a ball around a closed loop you can return it to the same spot with any orientation, so no function confines it, yet every instant's velocities are constrained. For such systems elimination is impossible in principle and the multiplier form (4) is mandatory. The integrability test (does the Pfaffian form admit an integrating factor?) and the beautiful geometry behind reachability belong to the nonholonomic article.
Do multipliers handle friction? Static friction seems to be a constraint force, but sliding friction dissipates.
Split the word "friction" and the confusion dissolves. Static friction at a rolling contact enforces a kinematic condition (no slip) and does no work in any virtual displacement compatible with it — it is an ideal constraint force, and Derivation C shows the multiplier delivering exactly this force, budget check included. Kinetic friction is a different beast: once slipping starts there is no kinematic condition to enforce — the contact point genuinely moves — so there is no constraint, no multiplier, and the force opposing the slip velocity must be booked as an applied generalized force on the right of the ordinary Lagrange equations, where it duly dissipates energy. The boundary between the two regimes is itself multiplier-detected: rolling holds while the solved-for fits the static budget, and the first violation is the handoff point to the sliding model — the frictional cousin of the skier's takeoff.
The article says constraining the variations in the action gives wrong equations for rolling bodies. Why is that not the obvious right thing?
Because "the varied path satisfies the constraint" and "the variation is consistent with the constraint" are different conditions when the constraint involves velocities. For holonomic constraints they coincide, and both routes give (1). For a Pfaffian constraint, demanding that neighbouring comparison paths also satisfy (the vakonomic recipe — vary first, constrain the whole family) restricts the variations differently from d'Alembert's rule, which constrains virtual displacements at each frozen instant, and the resulting equations differ by genuine, measurable terms. Experiment sides with d'Alembert: balls, coins, and skates follow (4), not the vakonomic equations. The vakonomic system is not garbage — it solves a legitimate optimal control problem (steering a car along a shortest path honours it) — but as a model of passive rolling contact it answers the wrong question. The moral generalizes: variational principles are precision instruments, and what class of variations you permit is part of the physics, not a formality.
How do I actually solve these systems — and how do simulations keep the constraint from drifting?
By hand, the standard loop is: write (1), differentiate each constraint twice to get , substitute the accelerations from (1), and solve the resulting linear system for the — then back-substitute for . Linear-in- is the method's quiet kindness: no matter how nonlinear the mechanics, the multipliers at a given state come from an linear solve. Numerically, that same manipulation converts a differential-algebraic system into an ODE — but a treacherous one: only the second derivative of is enforced, so floating-point error lets itself wander, and a simulated pendulum slowly spirals off its circle. The classic fix is Baumgarte stabilization, adding restoring terms so drift decays exponentially; sturdier codes project the state back onto the constraint manifold each step or use structure-preserving integrators. When a simulated linkage explodes at s for no visible reason, drifted constraints or an ill-conditioned multiplier solve are the first suspects.
Can a constraint force change the system's energy? The dome does no work, but my intuition says a moving wall must.
Your intuition is equation (5). An ideal constraint does no work through virtual displacements — tangent to the surface at frozen time — but the actual displacement over includes the surface's own motion, and on that piece the constraint force acts like any other force. The balance sheet reads : for the dome, and the skier's energy is honestly conserved (which Derivation B quietly exploited). For a bead on a wire being cranked around, , and the wire pumps energy in through the very multiplier that holds the bead — the "fictitious-looking" constraint force is the physical agent of the energy transfer. This is also why the safe habit is to check scleronomy before deploying energy conservation as a shortcut in multiplier problems: the shortcut's licence is printed in equation (5), and rheonomic constraints revoke it.