Conic primal-dual gap 2026-10-14
For a feasible point and a feasible dual variable , weak duality follows from one identity:
The inequality is the defining property of the dual cone. Every feasible pair therefore encloses the optimal objective function value:
Both optima are finite when such a pair exists. Consequently,
These are absolute cost bounds, rather than bounds on distance to an optimizing vector. Zero gap certifies both optima immediately. A small positive gap bounds the remaining improvement even if no strong duality theorem has been invoked.
For the nonnegative-orthant optimality certificate example, is feasible and costs . Pairing it with gives , so its cost exceeds the optimum by at most . Here the optimum is known to be , and the bound is exact. Pairing the same with the weaker certificate gives : a valid but less informative guarantee.
The identity assumes exact primal and dual feasibility. With a dual linear-system residual , it becomes
The second term has no guaranteed sign. Checking only a small linear-system residual and the cone dot product is insufficient when is large; a separate bound follows from the Cauchy-Schwarz inequality. Approximate cone membership likewise needs a quantified correction before claiming a certificate.
For an exact arithmetic example, minimize subject to . The point is optimal. A proposed multiplier is nonnegative and gives zero cone dot product because the slack is zero, but violates by . Its purported lower bound is , exceeding the optimum. The missing term explains the failure.
For differentiable functions that are convex functions on an open convex set and affine functions , the KKT conditions certify a global minimum. Once Lagrange multipliers satisfy them, no extra Slater condition is needed.[ref]
The certificate is a short chain of inequalities. Nonnegative Lagrange multipliers and affine equalities make a convex function. Its zero gradient gives a global minimum at by the first-order optimality condition. For every feasible point ,
The first equality uses feasibility and complementary slackness; the last inequality uses and . Equivalently, the Lagrange dual function attains the same value as the primal objective function, proving strong duality. A strictly convex function makes the primal optimum unique, although the Lagrange multipliers need not be unique.
Affine equality optimization constraints matter: an arbitrary signed multiple of a nonlinear equality can destroy convexity of the optimization Lagrangian. For example, minimizing subject to the affine equality gives and for . This equality Lagrange multiplier is positive for , zero at , and negative for . Completing the square gives the certificate for every real number .
Outside convex optimization, KKT stationarity alone does not certify an optimum: minimizing with no optimization constraints gives the stationary candidate , which is a global maximum. The Lagrangian sufficiency theorem remains applicable whenever a global minimum of the optimization Lagrangian can be proved directly.
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.
Derivative Created 2026-09-24 Updated 2026-10-14
The derivative measures the instantaneous rate at which a function changes. For a real function defined near , it exists when the difference quotient has a finite two-sided limit:
The quotient is the slope of the straight line joining two nearby points of the graph. Its limit is the slope of the tangent line. Thus a derivative describes a local rate without choosing a particular finite measurement interval.
For , expanding the numerator gives
At , the increments , and give secant line slopes , and . The limit is , and the tangent line is . The picture makes the limiting process visible.
Figure 1.
Secant lines to x squared approach its tangent line at x = 1
. Details.
The same calculation shows why the derivative is useful for approximation:
This is a local linear approximation. Near , replacing by makes the exact error , smaller than the leading change when is small. A curved graph can therefore be studied locally using a straight line.
If the function records position against time, its derivative is velocity. If it records an objective function, its derivative tests local changes that matter in optimization; in several variables, the gradient collects these directional rates and guides gradient descent. The interpretation comes from the function and its units, rather than from a new rule for each application.
Existence matters. For the absolute value function , the one-sided derivatives at zero are and , so there is no single tangent line described by a finite derivative there. Nor does a zero derivative alone identify a maximum or minimum: has but keeps increasing through zero.
Adding an optimization constraint removes possibilities: if it permits a set , the new feasible region is . It can leave unchanged when all its members already satisfy the added restriction. For a fixed objective function, restricting the feasible set cannot lower a minimization problem's infimum. In the equality slice of a feasible triangle, it raises the attained value from to .
Instead add to the feasible triangle with a squared-distance objective. No point can have both and . The resulting feasible set is the empty set, so there is no feasible point and no optimizing decision. Under the extended-value convention for a minimization problem, its infimum is .[ref]
A nonempty feasible set can also lack an optimizing decision. With domain , minimize subject to the strict inequality . The feasible region is an open set. Its infimum is , approached by the feasible points , but is excluded. Every feasible point is beaten by , so no minimum is attained. Replacing by includes the missing optimum. Open feasible regions do not always prevent attainment: minimizing on the same open set attains value at . A useful sufficient condition is instead the extreme value theorem: a continuous objective function on a nonempty compact set attains its minimum.
Keep the feasible triangle with a squared-distance objective, but add the equation . An equality requires an exact relation, whereas an inequality allows a range. Here the equality selects a line, and intersecting that line with the original feasible region leaves just the line segment from to :
The lower bound comes from ; the upper bound comes from . This is a nonempty closed set even though it has empty interior in the plane. An equality can reduce the dimension of the allowed decisions without making the feasible region empty.
The old optimum violates the added equality. On the surviving line segment, the objective function is
The derivative shows that the unique global minimum is at , giving and value . The nearest point on the entire equality line would be , at with value , but it violates . Both the equality and the original inequalities must hold simultaneously.
Figure 1.
Equality slice of a feasible triangle: the allowed line segment ends at the optimum (2,1), while the nearest point on the entire line is infeasible
. Details.
Use and to fix the multiplier sign convention in the optimization Lagrangian ; the Lagrange multipliers of and are again zero. At , Karush-Kuhn-Tucker conditions hold with and :
The Lagrange multiplier of an equality has no nonnegativity restriction. For an independent global certificate, completing the square gives . On the feasible set, and , so , with equality exactly at .
Extreme value theorem Created 2026-09-24 Updated 2026-10-14
A real-valued function that is continuous on a nonempty compact space attains both a global minimum and a global maximum. In particular, for a continuous function on a nonempty closed interval, there are points such that
The important word is “attains”: the best values occur at actual allowed inputs, rather than merely being approached. The interval version is [ref].
For a worked example, take on . Its global minimum is , and its global maximum is . Nonnegativity gives the first answer; on the specified closed interval gives the second. The endpoint is essential: looking only for a zero derivative would find the minimum and miss the maximum.
Figure 1.
An attained minimum and maximum on a closed interval, compared with excluded endpoints and a discontinuous endpoint value
. Details.
For comparison, the continuous function on the open interval has infimum and supremum , but neither is a value of . Even a closed domain is insufficient without continuity: define for , and . On , its supremum is , approached by for , but every function value is strictly less than . This endpoint change makes discontinuous, preventing attainment. On the unbounded real line, the continuous function has neither a global minimum nor a global maximum. These examples show what can fail when a hypothesis is dropped; functions outside the hypotheses may still have extrema.
The extreme value theorem is an existence tool for optimization: first establish that a continuous objective function on a nonempty compact feasible set has a best value, then investigate where it occurs. It neither locates the optimizing point nor promises uniqueness or differentiability. For example, the absolute value function on has its global minimum at zero although no derivative exists there; a constant function has every input as a minimizer. This role in optimization is explained in University of Toronto MAT237 notes, section 1.4: compactness and the extreme value theorem.
A short proof outline identifies the mechanism. The continuous image of a compact space is compact; a nonempty compact subset of the real line contains its infimum and supremum. For a closed interval, one can instead choose inputs whose outputs approach the supremum, extract a convergent subsequence by the Bolzano-Weierstrass theorem, and use continuity to make its limiting output equal that supremum. The closed interval retains the limiting input. Repeating the argument for the infimum supplies the minimum.
Farkas certificate for linear inequalities Created 2026-10-07 Updated 2026-10-14
Let and . For unrestricted , the system of linear inequalities has no feasible point if and only if there is a vector with
The entries are nonnegative Lagrange multipliers for the rows. Multiplying inequalities by them preserves their direction; the condition cancels every variable, leaving the contradiction
This is a Farkas' lemma alternative for non-strict inequalities; no strict-feasibility assumption is needed. See Boyd and Vandenberghe, Convex Optimization (2004), §5.8.3, pp. 261–262.
Three individually possible requirements, jointly impossible. Suppose two unrestricted real coordinates , drawn as in the diagram, must satisfy
Write every row in the same direction:
Then and . The nonnegative weighted sum, with Lagrange multipliers , is visibly
Each individual requirement defines a half-space in the plane. Even every pair has a feasible point: satisfies the first two, the first and third, and the second and third. Their common intersection is empty, because the first two force , while the third demands at most .
Figure 1.
Each half-plane is nonempty, but their three constraints add to the contradiction
. The first three panels shade each half-space separately. The final panel compares the simultaneous requirements with ; the two regions are disjoint. The points , and satisfy only pairs of constraints. Details.
Why cancellation is necessary for unrestricted variables. A nonzero linear functional can be made arbitrarily positive or negative by varying unrestricted , so alone would not yield a contradiction. Equality is essential here. If is also imposed, the sufficient certificate becomes , , , because then . This is the sign convention used in robust infeasibility under uniform constraint relaxation. One can instead append the rows and use the equality certificate on the enlarged system. Reversing all constraints to reverses the scalar sign to , as in the normalized integer Farkas infeasibility gap.
Checking a solver's infeasibility claim. A returned Farkas certificate for linear inequalities gives a short verification procedure: compute and , and check the three displayed conditions against the original constraints. Any positive multiple is another certificate; division by normalizes to . With rational numbers as data and certificate, the tests can be exact. With floating-point arithmetic, a small residual is a diagnostic rather than an exact cancellation: unrestricted can amplify a nonzero residual without bound. A rigorous certificate therefore needs exact cancellation or justified error bounds and additional bounds on the variables. The strict negative scalar is the margin of contradiction.
The same weighted sums give dual bounds. For the linear program maximizing over unrestricted with , any satisfying gives
for every feasible point. Minimizing over these multipliers is the dual linear program; the bound itself is weak duality. For example, maximize subject to , , . The multipliers give the upper bound , attained at . The infeasibility example above uses the same row directions, but lower bounds of on both coordinates. Its multipliers cancel the objective function as well as the variables: with would bound zero by a negative number. Thus impossibility and linear programming optimality certificates use the same arithmetic. See Boyd and Vandenberghe, Convex Optimization slides, §§5.32–5.35 for infeasibility as a dual alternative.
Why every inconsistent system has such a certificate. Introduce a slack variable vector and write . Split the unrestricted vector as with . Applying Farkas' lemma to the column matrix gives , , and . The first two conditions together are exactly . This reduction explains both the equality and the nonnegative row multipliers.
Feasible point 2026-10-13
A feasible point satisfies every optimization constraint of an optimization problem. For the budget constraint example, the feasible set is exactly
It is the line segment from to , a compact set and a convex set. The point is feasible, with product ; has a larger product but violates the budget constraint. Feasibility answers whether a decision is allowed; optimality asks whether any allowed decision is better. The extreme value theorem guarantees that this continuous objective function attains its maximum on this nonempty compact set.
Eliminating gives a one-variable objective function:
By completing the square, , with equality exactly at . Alternatively its derivative is , which vanishes at ; the endpoint values are both zero. Completing the square proves global optimality directly, whereas the first-order optimality condition only identifies a candidate. It also quantifies the cost of imbalance: moving to with loses exactly units of product. The arithmetic-geometric mean inequality gives another short certificate: , with equality exactly when .
For a transportation problem with capacity inequalities, feasibility requires nonnegative shipments, row totals no greater than factory capacities and column totals equal to shop demands. Feasibility alone does not prove minimal cost: a matching transportation dual certificate with capacity inequalities provides an optimality proof. The feasible set can be empty, and a finite infimum need not be attained even when the set is nonempty.
Feasible region Created 2026-10-14 Updated 2026-10-14
The set of all feasible points of an optimization problem. It depends on the optimization constraints and the decision domain; the objective function ranks its members.
Think of three successive questions. Which decisions can be represented in the model? Which satisfy every optimization constraint? Which of those receive the best objective function value? For decisions in a domain , inequalities and equations define the feasible region
The domain must be contained in the domain of a function for every function being evaluated; choosing integers rather than real numbers as decisions can also change the feasible set. Constraint satisfaction determines membership of . Minimizing an objective function then compares its members by , with optimal value . Changing the scores while keeping and the optimization constraints fixed leaves unchanged, provided the new objective function is defined throughout . These distinctions separate an allowed decision from a best decision.[ref]
Take the decision domain and minimize the objective function
Each inequality permits a closed half-space; their intersection is the filled triangle with vertices , and , including its edges. The feasible region is a compact set and a convex set. The point is a feasible point, but its objective function value will not be best. Without the optimization constraints, the unique global minimum is at with value . That point is infeasible because .
The objective function is the squared Euclidean distance from . Its positive level sets are circles centered there. Expanding a circle from that center, the first contact with the feasible region is at , with objective function value . Thus the optimum is the Euclidean projection onto a convex set of the target . Squaring a nonnegative Euclidean distance preserves which point is nearest.[ref]
Here is a direct certificate, without relying on the picture. Put and . The objective function becomes
Equality requires and , so the unique optimum is . At this point is an active constraint, while and are strict. An active constraint identifies a tight restriction at a specified point; it alone does not establish optimality. For example, has the same tight sum restriction but objective function value .
For a check using the Karush-Kuhn-Tucker conditions, write the inequalities as , , . Their Lagrange multipliers at the optimum are . The gradient equation is
Feasibility, nonnegative Lagrange multipliers and complementary slackness also hold. With this strictly convex function and affine optimization constraints, the Karush-Kuhn-Tucker conditions certify the unique global minimum.[ref]