To maximize subject to , the Lagrangian is
At an optimum, , which translates to . The constraint and objective gradients must be parallel — there's no remaining freedom to improve while staying on the constraint.
For multiple constraints, add a multiplier per constraint. For inequality constraints, the KKT (Karush-Kuhn-Tucker) conditions extend Lagrange and underpin most modern optimization.
In quant finance, Lagrangians solve the textbook minimum-variance portfolio: minimize subject to . The first-order conditions give a clean closed-form solution proportional to .