Optimization
Optimization is the mathematical study of finding the best element — a minimizer or maximizer of an objective function — from a set of feasible alternatives, possibly subject to constraints. Key result: at an interior optimum of a smooth function the gradient vanishes (); under constraints, the gradient of the objective is a linear combination of constraint gradients (Lagrange/KKT conditions). Applies in: economics, engineering design, machine learning, operations research, physics (least action), statistics. Foundations: Fermat (1630s), Lagrange (1788), Karush (1939) & Kuhn–Tucker (1951), Dantzig (1947).
At an unconstrained optimum, no direction is "downhill" — so the first-order rate of change in every direction is zero, forcing . With constraints, you may only move along the feasible set, so the objective's gradient need not vanish; it need only have no component that improves the objective while staying feasible. That residual must therefore be "absorbed" by the constraint gradients — the geometric origin of Lagrange multipliers and the KKT conditions.
Formal Statement
A mathematical optimization problem is written
Derivation hint: This is a definition, not a theorem; maximization is recovered by minimizing , and any constraint is negated to fit the convention. Symbols: is the decision variable (vector of unknowns); is the objective (or cost) function; are inequality constraint functions; are equality constraint functions. The feasible set is
Derivation hint: Intersection of the sublevel sets and the level sets ; emptiness of means the problem is infeasible. A point is a global minimizer if for all , and a local minimizer if this holds only for in some neighborhood . The optimal value is .
Problem [1] is convex if and all are convex functions and all are affine (). A function is convex iff
Derivation hint: The chord between any two points lies on or above the graph; equivalently, for twice-differentiable , the Hessian (positive semidefinite).
If is differentiable and is a local minimizer of over an open set, then
Derivation hint: Along any line , the scalar function has a local min at , so for all . Points satisfying [4] are stationary points. The second-order sufficient condition adds (positive definite) to guarantee a strict local minimum.
Suppose are differentiable and a constraint qualification holds at . If is a local minimizer of [1], there exist multipliers and such that
Derivation hint: Stationarity of the Lagrangian with respect to . together with primal feasibility (, ), dual feasibility (), and complementary slackness:
Derivation hint: An inactive constraint () exerts no force, so its multiplier must be zero; only active constraints () can have . For convex problems, the KKT conditions are also sufficient for global optimality.
Why It Holds / Derivation
We derive [5] for equality constraints only (the inequality case adds the sign and slackness conditions). 1. Feasible directions. At a minimizer on the surface , consider any smooth curve in with . Its velocity is tangent to , meaning for all (differentiate at ). 2. No first-order decrease. Since has a local min at , differentiating gives for every tangent . 3. Orthogonality. Thus is orthogonal to the entire tangent space . But that tangent space is exactly the orthogonal complement of . 4. Conclusion. Therefore lies in , i.e. there exist scalars with , which rearranges to [5].
∎1. Let be convex on convex and let be a local minimizer. Suppose for contradiction some has . 2. By convexity [3], for : . 3. As , the point enters every neighborhood of , yet has strictly smaller objective value. 4. This contradicts being a local minimizer. Hence for all : the local minimum is global.
∎The Turin-born, Berlin- and Paris-active analyst introduced the method of multipliers in his Mécanique analytique (1788), recasting mechanics entirely in terms of stationarity of a single functional. His insight that constrained extrema can be found by adjoining constraints with undetermined coefficients turned a geometric puzzle into pure algebra and remains, two centuries later, the conceptual backbone of constrained optimization, control theory, and economics.
Building Intuition
Picture standing on a hillside (the graph of ) in fog. To minimize you walk where the ground slopes down. At the bottom of a valley, every direction is uphill or flat — that flatness in all directions is . Now add a fence you must stay on (a constraint). You can no longer roam freely; you walk only along the fence. You stop descending when the fence stops going downhill — i.e. where the downhill direction of the terrain () points straight through the fence, perpendicular to it (). At that spot the two gradients are parallel: that is exactly equation [5]. The multiplier measures how hard the fence is "pushing back" — equivalently, how much the optimal value would improve if you relaxed the constraint by one unit (its shadow price).
Worked Examples
Given: Minimize over .
Steps: 1. Gradient: . 2. Set : and . 3. From the first, . Substitute: , so . 4. Hessian has eigenvalues ⇒ positive definite ⇒ strict local (and, since is convex, global) minimum. 5. Value: .
Given: A box with no top, surface area fixed at , maximize volume . Constraint: .
Steps: 1. Lagrangian: . 2. Stationarity:
3. By symmetry of the first two, . Substituting and dividing yields . 4. Plug into constraint: with : , so . 5. Volume: . The multiplier is the marginal volume gain per unit of extra material.
Common Misconceptions
Stationary points are not always minima. Solving yields candidates — they may be maxima, minima, or saddle points. Always check the second-order condition (Hessian) or compare boundary/limit behavior. Also, is necessary only at interior optima; a minimum on the boundary of the feasible set may have (the boundary constraint absorbs it via KKT).
A solution to the KKT equations need not be optimal for nonconvex problems. KKT is necessary (given a constraint qualification) but sufficient only when the problem is convex. In nonconvex problems a KKT point can be a local max or saddle.
Consider on . Then gives as the only stationary point — yet is neither a local minimum nor maximum; it is an inflection point. Blindly trusting would falsely flag as an extremum. The second-order test fails (), and inspection shows decreases through .
Minimize subject to (i.e. ). The minimizer is , on the boundary, where . There is no contradiction: KKT gives , with complementary slackness satisfied. The "missing" gradient is supplied entirely by the active constraint.
Connections
Optimization sits at the crossroads of several fields. The unconstrained conditions [4] rest on Multivariable Calculus and the Gradient; the second-order test invokes Definite Matrices and the Hessian Matrix. Convexity theory connects to Convex Sets and Convex Functions. The Lagrangian dual generalizes through Duality (Optimization), linking primal minima to dual maxima via Weak and Strong Duality. In statistics, Maximum Likelihood Estimation is optimization of a log-likelihood; in machine learning, Gradient Descent and Stochastic Gradient Descent are the workhorse algorithms. The continuous-time analogue underlies the Calculus of Variations and Optimal Control, while the linear special case is Linear Programming.
Real-World Applications
Historical Development
Subtleties & Limits
Nonconvex global optimization remains computationally hard: certifying that a candidate is the global minimum of a general nonconvex (or NP-hard combinatorial) problem can require exponential effort, and no efficient universal algorithm is known (this is intertwined with P vs NP). Even for smooth problems, the landscape of saddle points and spurious local minima in high dimensions — central to deep learning — is incompletely understood: why gradient methods so often find good solutions despite nonconvexity is an active research frontier. Constraint qualifications are another subtlety: KKT necessity can fail at irregular points (e.g. where constraint gradients are linearly dependent), requiring weaker conditions (Fritz John, MFCQ). Finally, duality gaps can be nonzero for nonconvex problems, breaking the clean primal–dual correspondence that convexity guarantees.
See Also
Lagrange Multipliers · KKT Conditions · Convex Functions · Gradient Descent · Linear Programming · Duality (Optimization) · Calculus of Variations · Maximum Likelihood Estimation · Optimal Control