Lagrange multipliers
Lagrange multipliers are a mathematical tool for optimizing functions subject to constraints. They allow solving problems like:
"Find the maximum/minimum of
, given ."
The method augments the original problem into a new system:
We solve
Geometric Interpretation
At the solution point:
- Since
we have and , or and , are parallel (the constraint surface is tangent to the objective's level set). , so the point satisfies the constraint. measures how much changes if is relaxed.
Possible motivation for Lagrange definition of
Step 1: The Problem, Visualized
Imagine you are a hiker trying to find the highest point on a mountain, but you are forced to stay on a specific trail.
- The Mountain: This is your objective function,
. The altitude at any point is given by . - The Trail: This is your constraint,
. It's a specific path on the map. - Level Curves: The contour lines on a map, where the altitude is constant (e.g.,
, , etc.).
You are walking along the trail (). When are you at a local maximum or minimum altitude?
You are at an optimum point when the trail becomes tangent to a contour line of the mountain. - Why? Think about it: If your trail crosses a contour line, it means you are moving from a lower altitude to a higher one (or vice-versa). If you can still move along the trail and increase your altitude, you're not at the maximum yet!
- The only place where you can't increase or decrease your altitude by moving a tiny step along the trail is the exact point where the trail direction is momentarily parallel to the contour line direction—the point of tangency.
At a constrained optimum, the gradient of the objective function (
) must be parallel to the gradient of the constraint function ( ).
If two vectors are parallel, one must be a scalar multiple of the other. We'll call that scalar
Step 3: The Stroke of Genius – Creating
So, at this point, Lagrange knows he has to solve a system of two conditions for a simple 2D problem:
(The geometric tangency condition) (The original constraint)
The first condition can be rewritten as
And the constraint is:
Lagrange's genius was to see that this entire system of equations is exactly what you get if you define a single function and find its unconstrained critical points.
He asked: "What function, if I take its partial derivatives with respect to
This leads directly to the definition of the Lagrangian:
2. Coming from Mercury perihelion problem:
Lagrange Multipliers: Constraint Enforcement
When you have constraints like:
(normalization of 4-velocity), (mass conservation),
you can impose them in two ways:- Restrict the space of fields to only those satisfying the constraints (as you mentioned).
- Use Lagrange multipliers to dynamically enforce the constraints via the action principle.
We write a Modified Action with Multipliers:
where:
, are Lagrange multiplier fields (scalar functions over spacetime). - The original action
is extended to such that: - Varying
enforces , - Varying
enforces .
- Varying
Example: Normalization Constraint
For the 4-velocity normalization:
- Add a term
. - The variation with respect to
gives back the constraint:
- The variation with respect to
now includes :
This modifies the dust equations to dynamically preserve the constraint.