Convex optimization Created 2026-09-24 Updated 2026-10-13
Convex optimization is a minimization problem with a convex function as its objective function and a convex set of feasible points. For a finite-valued , the problem is to find with for every . The displayed infimum describes its value even when no minimizing point exists. The two convexity requirements concern different objects: the allowed decisions and the scores assigned to them.
A convex set contains the whole line segment between any two of its points:
A convex function lies below the interpolation of its endpoint values:
Thus mixing two allowed decisions preserves feasibility, and the mixed score is no worse than the same mixture of endpoint scores. The objective function may have flat regions or corners. For a strictly convex function, the second inequality is strict when and .
A useful constraint representation is
where are convex functions on a common convex set , and the equalities are affine functions. Each inequality defines a convex sublevel set; their intersection with and the equality set is a convex set. An equality involving a general convex function need not preserve this geometry: allows and but excludes their midpoint . See Boyd and Vandenberghe, Convex Optimization (2004), §4.2.1 for the standard problem form.
Why local information can certify a global answer. Every local minimum of a convex optimization problem is a global minimum, including minima on the boundary. If a feasible point had , points would remain feasible and have value strictly below for every . Taking arbitrarily small contradicts a local minimum at . This argument explains the special power of convexity: a better distant decision would reveal an improving direction immediately nearby.
If a minimizer exists and the objective function is strictly convex on , it is unique. Two distinct minimizers of value would have a feasible midpoint with value strictly below . Existence is a separate question: the exponential function is strictly convex on , but its infimum is approached only as . Even a bounded convex set need not suffice: on also has unattained infimum . A continuous function on a nonempty compact set attains its minimum by the extreme value theorem.
Nor does strict convexity imply differentiability. For , the squared term gives the strict inequality while the triangle inequality gives the weak inequality for the absolute value. At zero the left and right derivatives are and , so no derivative exists there, although zero is the unique minimizer. Such objectives require subgradients or proximal operators rather than an ordinary gradient at every point.
For a differentiable convex function on an open convex set containing , the constrained first-order condition is
Indeed, the subgradient inequality makes this sufficient; taking the one-sided derivative along feasible line segments makes it necessary. At an interior minimizer, both directions are feasible and the gradient must vanish. At a boundary minimizer it can be nonzero: it only needs to make every feasible direction nondecreasing. See Boyd and Vandenberghe, §§3.1.3 and 4.2.3.
A fully computed nearest-point problem. Project onto the half-space by minimizing half the squared Euclidean distance:
The Hessian matrix is the identity matrix, so the objective function is strictly convex. The unconstrained minimizer violates the inequality. With the convention , the optimization Lagrangian is , where the Lagrange multiplier satisfies . Its Karush-Kuhn-Tucker conditions are
The last two equations give , . The choice is infeasible, so complementary slackness forces . Consequently , giving , and . The Euclidean distance is , rather than the objective function value . The gradient at the answer balances ; the displacement from to is a normal vector to the boundary.
Figure 1.
The nearest feasible point is where an objective contour first touches the half-space boundary
. Details.
There is an exact certificate independent of numerical search. Completing squares gives
For every feasible point, implies . Thus every feasible objective is at least , and attains this bound. More generally the Lagrangian dual problem has objective for . Its maximum is also , illustrating strong duality through matching computed bounds. This makes the example a model for Euclidean projection onto a convex set and the projection step in projected gradient descent.
What the multiplier conditions require. For differentiable convex functions on an open convex set and equalities defined by affine functions, the KKT conditions combine feasibility, , complementary slackness , and stationarity
with unrestricted equality Lagrange multipliers . They suffice to certify a global minimum without an additional regularity assumption: the optimization Lagrangian is convex, stationarity minimizes it, and feasibility with complementary slackness gives the same certificate as above. To guarantee their necessity at an attained finite optimum, a regularity hypothesis suffices: Slater's condition requires some with and . The projection example has the strictly feasible point . See Boyd and Vandenberghe, §§5.2.3 and 5.5.3. This hypothesis guarantees suitable multipliers, not existence of a primal minimizer.
Without regularity, necessity can fail even for convex functions: minimize subject to . The sole feasible point is optimal, but stationarity would require . No Lagrange multiplier works. There is no strictly feasible point, and the gradient of the constraint vanishes at the answer.
The nonconvex contrast. The polynomial has derivative and second derivative . Numerically solving the cubic gives stationary points , , and . Their objective values are respectively , , and , with second derivatives , , and . Hence both outer points are local minima, and the middle point is a local maximum. Since at both ends, its global minimum exists and must be one of the stationary minima: it is the left one. A method stopping at the right local minimum misses a better value by approximately .
Figure 2.
A strictly convex quadratic has one minimum; a tilted quartic has two local minima with different values
. Details.
The practical appeal of convex optimization is the ability to check an answer globally using geometry and matching Lagrangian duality bounds. The projection certificate certifies every feasible alternative at once; the tilted quartic shows why a zero gradient alone cannot do that for general nonlinear optimization.
Historically, an early landmark is Kuhn and Tucker's [ref]. Its §3 explicitly states a regularity hypothesis for inequality-constrained Lagrange multipliers; its discussion of saddle points explains how concave functions support global conclusions for maximization. This documents an early formulation of the multiplier approach; it does not establish sole discovery of today's KKT conditions or of convex optimization as a whole.
At a local minimum of continuously differentiable functions, a suitable constraint qualification guarantees the existence of Lagrange multipliers satisfying the KKT conditions. One sufficient local regularity assumption is that the gradients of the equality optimization constraints and the active constraints are jointly linearly independent. This assumption concerns the description of the feasible set, not just the smoothness of the objective function.[ref]
To see why a hypothesis is needed, minimize subject to . The feasible set is the singleton , so is a global minimum. Yet for every finite Lagrange multiplier . Thus this convex optimization problem has an attained optimum without a KKT multiplier. The zero gradient of the active constraint has hidden the actual restriction from its first-order equation. Rewriting it as the equality yields the unrestricted Lagrange multiplier .
For convex optimization, Slater's condition requires strict inequalities and affine equalities at a point in the relative interior of the common domain of a function. A finite optimum value then gives strong duality and dual attainment. Primal attainment and differentiability yield KKT multipliers. Affine inequalities may be nonstrict in the refined version.[ref]
Slater's condition is sufficient, and need not hold for an optimum to exist. The singular example above also shows that mere primal attainment is not a substitute for a constraint qualification.
Lagrangian duality Created 2026-10-06 Updated 2026-10-18
A feasible point gives an upper bound on a minimization problem's best value; a suitable Lagrange multiplier gives a lower bound. Lagrangian duality searches for the strongest bound obtainable this way. Matching bounds certify a global minimum.
Let be a nonempty decision domain on which the objective function and the constraint functions are finite. Write the primal problem and its optimization Lagrangian as
The inequality Lagrange multipliers obey ; the equality Lagrange multipliers are unrestricted real numbers. Define the Lagrange dual function and dual optimal value by
The inner infimum keeps , but releases the displayed optimization constraints. It can be , giving an uninformative lower bound. A different domain changes the bound.[ref]
Here is the entire weak duality argument. For any feasible point and allowable Lagrange multipliers,
The first inequality is the definition of an infimum; the second uses and . Taking the infimum over feasible , then the supremum over allowable Lagrange multipliers, gives . No convexity is used.
The Lagrange dual function is a concave function, since each fixed decision makes an affine function of the Lagrange multipliers.[ref] Explicitly, write and choose two points where is finite. For and every ,
Taking the infimum over proves the defining concavity inequality. Thus even a difficult primal problem supplies a dual with useful geometry, although evaluating can itself be difficult.
For finite optimal values, strong duality means , or zero duality gap. It need not imply dual attainment. For convex optimization, Slater's condition is a sufficient constraint qualification for both when is finite.[ref] The Strong Lagrangian property requires an actual finite Lagrange multiplier achieving equality. Convex perturbation duality interprets such a bound as a supporting slope of the perturbed value function.
Choose the one-variable quadratic program
Without the optimization constraint, the global minimum is at . On the feasible set , write with : then . Hence is the unique primal optimizer and .
For any , completing the square in the optimization Lagrangian gives
The inner minimization problem is over all real numbers, so its unique optimizer is . Therefore
The best lower bound is , attained at . At , the inner optimizer is , which is infeasible for the primal problem; nevertheless is a valid lower bound. At , the inner optimizer is , which is feasible, but is weaker than . Feasibility of an inner optimizer alone does not make the bound exact.
Figure 1.
Lagrangian duality finds the quadratic's exact lower bound at multiplier 6
. Left: the objective function, three optimization Lagrangians, and the shaded feasible set . Dots mark the global minima of the optimization Lagrangians over all real numbers; each yields a horizontal lower bound. Right: the concave Lagrange dual function reaches the primal value . All parameters are chosen for this worked example. Details.
At , the Karush-Kuhn-Tucker conditions reduce to
The last equality is complementary slackness. The strongest certificate is visible without solving another optimization problem: , so every feasible point satisfies
The same Lagrange multiplier simultaneously makes the inner optimizer feasible and removes the slack between and . This is a convex KKT optimality certificate; also verifies Slater's condition.
The domain in the inner infimum is essential. If one mistakenly keeps when computing , the restricted minimum becomes , whereas the actual Lagrange dual function has value . Constraints deliberately retained in are allowed in a Lagrangian relaxation, but that is a different choice of which restrictions to dualize.
For a proper cone , suppose a point satisfies and is finite. This generalized Slater condition gives strong duality and attainment of the conic dual problem's optimum. It does not by itself assert primal attainment.[ref]
The two worked examples have strict primal points: has slack in the interior of the nonnegative orthant, and has slack in the interior of the second-order cone. Both optima were already certified by explicit feasible pairs. Slater's condition explains why a matching optimal dual variable can be expected under these hypotheses; checking a supplied zero-gap pair needs only weak duality.
Changing cone geometry preserves the bound mechanism. For a positive semidefinite cone, the dual cone pairing is the Frobenius inner product of two matrices. This connects the same certificate idea to semidefinite programming, while the central path uses strictly interior primal and dual points to approach vanishing gap.
In 1995, Lieven Vandenberghe and Stephen Boyd presented a primal-dual interior-point method for convex optimization with matrix inequalities. Their algorithmic study included exploiting problem structure and allowing incomplete Conjugate gradient method solves within an iteration. This illustrates how the primal-dual viewpoint guides computation as well as checking a final answer.[ref]
Consider an objective function that is a quadratic polynomial, with a singular optimization constraint:
Its only feasible point is , giving . For , completing the square yields
Every finite Lagrange multiplier gives , but as . Thus : strong duality holds, and the primal optimum is attained, yet dual attainment fails. The inner minimizers approach without ever becoming feasible at finite .
Both the objective function and the constraint function are convex functions. However, Slater's condition fails because is impossible. At the optimum, stationarity would require , which no finite Lagrange multiplier satisfies. Compare KKT regularity at a local minimum: a zero gradient of an active constraint can prevent a multiplier certificate. This example has zero duality gap without the Strong Lagrangian property.