2.1.10 · D2Analytical Mechanics

Visual walkthrough — Constraints using Lagrange multipliers

2,416 words11 min readBack to topic

Before we start, one honest promise: everything below is geometry. The whole derivation is the story of arrows and the flat sheets they are allowed to slide on. Keep that image.


Step 1 — A configuration is a single point in a made-up space

WHAT: we replace "a moving system" with "a moving dot in coordinate space."

WHY: because once everything is a dot in a space, constraints become shapes and forces become arrows. That turns physics into geometry — which we can draw.

PICTURE: the figure draws two axes (we use so it fits on paper) and one orange dot — the whole machine, right now.


Step 2 — A constraint is a curve the dot must live on

WHAT: we drew the equation as a green curve through the plane.

WHY: the whole point of this method is to keep the constraint visible instead of hiding it inside clever coordinates. So we must literally see the surface the dot is trapped on.

PICTURE: green curve = . The orange dot sits on it. Off the curve is forbidden territory (shaded gray). Example to hold in mind: hoop of radius , so — the curve is the circle itself.


Step 3 — The gradient: an arrow pointing straight off the surface

WHAT: at the dot, we drew the red arrow .

WHY perpendicular? Move a tiny step along the surface — doesn't change, so its slope in that direction is zero. The only direction with nonzero slope is across the surface. The gradient collects the slopes, so it lines up with that across-direction. That is the whole reason a normal force can only point one way.

PICTURE: green curve, red gradient arrow shooting perpendicularly outward, and a faint blue arrow lying flat along the curve (the allowed direction — Step 4).

Recall Why "

" and not ""? Because depends on several 's at once. means "wiggle only , freeze the rest." That single-variable wiggle is exactly what "slope in the direction" needs. ::: partial derivative = slope along one axis with the others held still.


Step 4 — Allowed wiggles: virtual displacements tangent to the surface

WHAT: we drew as a short blue arrow lying flat on the green curve.

WHY the freeze-time move? Real motion may drag the surface around; we want to test "of the moves available right now, which stay legal?" Freezing isolates the geometry from the clock.

PICTURE: blue tangent to the curve; red perpendicular. They meet at — that right angle is the key fact of the next step.


Step 5 — d'Alembert hands us a second perpendicular arrow

WHAT: we name the whole bracket — the "leftover" of the equations of motion. Stack them into an arrow .

WHY does this equal zero? For a free system every is independent, so each would have to vanish by itself — that's the ordinary Euler–Lagrange equation. But under a constraint the are chained together (Step 4), so we may only conclude the whole sum is zero.

WHAT IT LOOKS LIKE: the sum being zero is — the arrow is also perpendicular to the blue allowed direction.


Step 6 — Two arrows ⟂ the same line must be parallel — and is born

WHAT: we set , component by component.

WHY this is forced (not chosen): parallelism is a theorem here, not an assumption. The only freedom left is the length ratio, and that single unknown number is the Lagrange multiplier.

PICTURE: red and a slightly longer red drawn on the same line; a bracket labels their length ratio .


Step 7 — Counting: equations, unknowns — the constraint pays the rent

WHAT: we add the green curve's own equation back into the pile.

WHY: every unknown needs an equation. The extra unknown we invented is exactly balanced by the extra equation we had been carrying all along. Balanced ledger.

PICTURE: a small tally — EL rows in blue, constraint row in green, coordinate unknowns + multiplier unknown — arrows matching them up.


Step 8 — Edge & degenerate cases (never leave the reader stranded)

Case B — the gradient vanishes (). Then the "off-surface" direction is undefined — the constraint is degenerate at that point (e.g. at ). The method has nothing to point along, so and no force can be recovered there. Fix: rewrite so its gradient is nonzero (use , not ).

Case C — you already eliminated the coordinate. If you embedded the constraint into independent coordinates, then (there's no redundant left to differentiate), multiplies zero and is meaningless. Fix: keep the redundant coordinate whenever you want the constraint force.

Case D — velocity-only (non-holonomic) constraints. If the constraint is and cannot be integrated into any , there is no surface and no gradient. You use the velocity form with the coefficients playing the role the gradient played. See Holonomic vs Non-holonomic Constraints.

Recall Where have I seen "gradient = λ · gradient" before?

This is the exact skeleton of constrained optimization: at a constrained extremum, . That's the KKT Conditions with equality constraints. Mechanics and optimization share the geometry: the leftover is parallel to the constraint's normal. ::: same parallel-gradients picture, different words.


The one-picture summary

Everything above is this one image: a green surface, a blue allowed-direction tangent to it, and two red arrows ( from physics, from geometry) forced to lie on the same perpendicular line — their length ratio is , and is the push the surface delivers.

Recall Feynman: the whole walkthrough for a 12-year-old

Picture a marble in a curved rail. The rail is a green line the marble can never leave. Right now the marble can only slide along the rail — call that the blue direction. Two different arrows turn out to point straight across the rail: one is the "physics leftover" (what the marble's motion demands), the other is the rail's own "which way is off me" arrow. In flat 2D there is only one direction straight across the rail, so both arrows must lie on it — they just have different lengths. That length ratio is a little honest number . And here's the payoff: the rail can only push the marble sideways, straight across itself — the same red direction — so is literally how hard the rail pushes. Watch : when it drops to zero, the rail stops pushing and the marble leaps off.


Active Recall