GLOBAL KNOWLEDGE ARK

Mathematics · Article

Multivariable extrema and constrained optimisation

Separate candidates from certified optima, classify stationary points with curvature, search boundaries completely, and use constraint multipliers with the regularity and convexity conditions they require.

Back to Mathematics

After reading, you can

  • Distinguish local, strict local and global extrema relative to an explicitly stated feasible set.
  • Explain why an interior differentiable extremum has zero gradient without treating stationarity as a certificate.
  • Use a C² Hessian to classify nondegenerate stationary points and recognise inconclusive semidefinite cases.
  • Find extrema of a continuous function on a compact region by checking interior candidates, boundary pieces and corners.
  • Derive regular equality-constraint multiplier equations from tangent directions and state their rank condition.
  • Classify a regular constrained stationary point with the Lagrangian Hessian restricted to feasible tangent directions.
  • State a consistent minimisation convention for KKT feasibility, stationarity, multiplier signs and complementary slackness.
  • Separate constraint qualifications for necessary conditions from convexity conditions that make KKT sufficient.
01

Ask which nearby changes are allowed

The functions x²+y² and x²−y² both have gradient zero at the origin. The first increases along every nonzero input displacement and has a strict minimum there. The second increases along the x axis but decreases along the y axis; its stationary point is a saddle. Solving two derivative equations has found a candidate, not settled what kind of point it is.

Now restrict x²−y² to the horizontal line y=0. It becomes x² and has a minimum at the origin relative to that line. The same input point can be a saddle in the plane and a minimum among allowed inputs. An optimisation problem therefore needs both an objective and a feasible set before a derivative can be interpreted.

Preparation is lesson 131 for differentiability, gradients, Hessians and regular level sets, together with the earlier compactness and single-variable extrema ideas. Linear algebra 126–129 supplies eigenvalues, orthogonality and quadratic forms. Coordinates and objectives in the exact examples are dimensionless unless units are explicitly introduced.

02

Define the comparison and establish whether an optimum exists

For a feasible set S⊂Rⁿ and a∈S, a is a local minimum of f on S if some radius δ>0 makes f(a)≤f(x) for every x∈S with ||x−a||<δ. It is strict if the inequality is strict for every such x≠a. It is a global or absolute minimum if the comparison holds for every x∈S. Reverse the inequalities for maxima. Local and strict refer to the feasible set, not automatically to an open part of the ambient space.

A continuous real-valued function on a nonempty compact feasible set attains both its minimum and maximum. In finite-dimensional Euclidean space, closed and bounded sets are compact. This theorem supplies existence; it does not say how many optimisers there are or which derivative candidates attain them. The feasible set must be nonempty, and continuity is required on the whole set being used.

On the open interval (0,1), f(x)=x² has infimum 0 but no minimum and supremum 1 but no maximum. On all of R, eˣ has infimum 0 that is never attained. In contrast, a continuous coercive function on Rⁿ, meaning f(x)→+∞ as ||x||→∞, attains a global minimum: outside a sufficiently large ball its values exceed a known feasible value, and a compact ball then contains a minimiser. An attained optimum and a limiting infimum are different outcomes.

03

Interior first derivatives identify candidates

Suppose f is differentiable on an open neighbourhood of an interior feasible point a and a is a local extremum with no active restriction on small input displacements. Along each coordinate line through a, the corresponding one-variable function has an interior extremum. Its derivative is zero, giving ∇f(a)=0. Equivalently, both v and −v are available directions, so a nonzero directional rate would allow an improving sign of displacement.

The conclusion does not apply unchanged at a boundary, at a nondifferentiable point or when only a lower-dimensional set is feasible. For f(x,y)=x on the half-plane x≥0, every point with x=0 is a global minimum, although the gradient is (1,0). For f(x,y)=√(x²+y²), the origin is a global minimum but the function is not differentiable there.

A critical-point search must therefore include places where the required derivative fails to exist, not merely solutions of ∇f=0. In an open C¹ problem, every local extremum is stationary; stationary points can still be maxima, minima, saddles, or points requiring a higher-order analysis.

04

The Hessian tests the leading nonzero curvature

Assume f is C² near a stationary point a. Taylor’s expansion gives f(a+h)−f(a)=(1/2)hᵀHf(a)h+o(||h||²). The Hessian is symmetric under this hypothesis. If the quadratic form is positive definite, it has a positive lower bound c||h||² on all displacements for some c>0. The smaller remainder cannot reverse its sign sufficiently near a, so a is a strict local minimum.

A negative definite Hessian similarly gives a strict local maximum. If the quadratic form takes both positive and negative values, fixed directions with those signs produce values above and below f(a) arbitrarily close to a; a is a saddle. For a symmetric matrix, positive definiteness means all eigenvalues are positive, negative definiteness means all are negative, and indefiniteness means both signs occur.

Quadratic changes retain or change sign with directionFor unit u=(cosθ,sinθ), plot q(u)=one half u-transpose H u for three symmetric Hessians: [[4,1],[1,2]], [[-4,1],[1,-2]], and [[2,3],[3,2]]. The corresponding exact quadratics are 2x²+xy+y², -2x²+xy-y², and x²+3xy+y². The horizontal coordinate is angle θ from 0 to 2π, 70 pixels per radian; the vertical scale is 32 pixels per output unit. The first profile stays positive, the second negative, and the third changes sign. The finite curves illustrate sign arguments proved by completing squares or by two exact directions.Compare q(u)=½uᵀHu over all unit directions-2-10120π/2π3π/22πθ2x²+xy+y²: positive definite−2x²+xy−y²: negative definitex²+3xy+y²: indefiniteThe zero line separates signs.
All three origins are stationary and the functions are C². Positive, negative and mixed directional signs distinguish a minimum, maximum and saddle for these exact quadratics.

The first-order term must vanish before this stationary-point test is applied. A positive definite Hessian at a nonstationary point describes curvature but does not make that point a minimum. The test is local and requires a genuine second-order expansion; a matrix of isolated second partial values without adequate regularity does not automatically supply it.

05

Use the determinant test as a special case

For two variables, write the symmetric Hessian at a stationary point as H=[[A,B],[B,C]], and put D=AC−B². When D>0 and A>0, the point is a strict local minimum. When D>0 and A<0, it is a strict local maximum. When D<0, it is a saddle. When D=0, this test is inconclusive.

For A≠0, the quadratic form can be written A(u+(B/A)v)²+(D/A)v². This explains the definite cases directly. If D<0, a real symmetric two-by-two matrix has eigenvalues of opposite signs, so the form is indefinite. For D>0, A cannot be zero; do not add an impossible extra case to the rule.

For f(x,y)=x³−3x+y², stationarity gives x=±1 and y=0. The Hessian is diag(6x,2). At (1,0), it is positive definite and f=−2 is a strict local minimum. At (−1,0), it is indefinite and f=2 is a saddle. The local minimum is not global on R², since f(x,0)→−∞ as x→−∞.

The C² stationary-point test in two dimensions
ConditionConclusionScope
D>0 and A>0Strict local minimumOpen neighbourhood; gradient zero
D>0 and A<0Strict local maximumOpen neighbourhood; gradient zero
D<0SaddlePositive and negative nearby changes
D=0InconclusiveInspect higher-order terms or another argument
06

A semidefinite Hessian does not decide the outcome

The functions x⁴+y⁴, −x⁴−y⁴ and x⁴−y⁴ all have gradient zero and zero Hessian at the origin. They give a strict minimum, a strict maximum and a saddle, respectively. The same second-order data can therefore accompany different outcomes. A zero eigenvalue does not mean that the corresponding direction is constant beyond second order.

Even a nonzero positive semidefinite Hessian is inconclusive. The functions x²+y⁴ and x²−y⁴ both have Hessian diag(2,0) at 0. The first has a strict minimum; the second has a saddle. For f=x², the same Hessian accompanies a nonstrict global minimum along the entire line x=0. One must inspect the terms that the quadratic form does not resolve.

One semidefinite Hessian leaves three possible outcomesRestrict x²+y⁴, x²-y⁴ and x² to the unresolved line x=0. Their profiles are t⁴, -t⁴ and 0. All three have Hessian diag(2,0) at the origin. Horizontal t ranges from −1 to 1 with 200 pixels per unit; vertical values use 90 pixels per output unit. The positive and negative quartic profiles meet the flat profile with zero first and second derivatives. Their signs beyond second order give different classifications.Along the unresolved direction x=0, inspect higher orderAll three full functions have H(0)=diag(2,0).-1-111t=yx²+y⁴: strict minimumx²−y⁴: saddlex²: flat minimum
The same Hessian diag(2,0) accompanies a strict minimum, a saddle and a nonstrict minimum. The zero eigenvalue leaves higher-order behaviour unresolved.

Positive semidefiniteness is a necessary Hessian condition for a C² interior local minimum, but it is not a sufficient pointwise test. There is a different global result: if a C² function has positive semidefinite Hessian throughout an open convex domain, the function is convex there. On that domain, any stationary point is a global minimum. A condition at every point of a convex domain is much stronger than a condition at one candidate.

07

Boundaries and corners are part of the problem

For a continuous function on a compact region with a piecewise smooth boundary, organise the search by dimension. Find interior critical points, restrict the function to each smooth boundary piece and solve its one-variable or lower-dimensional problem, then check endpoints, corners and any singular or nondifferentiable locations. Parameterisations must cover the actual boundary, and restrictions retain their endpoint domains.

Consider f=x²+y²−2x −4y on the rectangle 0≤x≤3, 0≤y≤2. Its unconstrained stationary point is (1,2), which lies on the boundary rather than in the rectangle’s interior. On the edges y=0 and y=2, the restricted x derivative vanishes at x=1. On the vertical edges, the restricted y derivative reaches zero at y=2, an endpoint. Include all four corners as well.

Completing squares gives f=(x −1)²+(y −2)²−5. On this rectangle, the first square lies in [0,4] and the second in [0,4]. Their sum attains 0 at (1,2) and 8 at (3,0). Hence the global minimum is −5 at (1,2), and the global maximum is 3 at (3,0). These inequalities certify the result; a list of sampled values alone would not.

Search all four rectangle edges and retain every cornerThe feasible rectangle is 0≤x≤3 and 0≤y≤2, with 70 pixels per coordinate unit on both axes. The objective is (x-1)²+(y-2)²-5. Blue contour arcs centred at (1,2) are clipped to the feasible rectangle. Four corners and the two horizontal-edge critical points (1,0) and (1,2) are marked. The unconstrained stationary point is on the top boundary. The minimum is −5 at (1,2); the maximum is 3 at (3,0). The full-region square bounds, not the finite point markers, certify exhaustiveness.The feasible rectangle includes its full boundary(0,2)(3,2)(0,0)(3,0)(1,2)(1,0)f=(x−1)²+(y−2)²−5Minimum: −5at (1,2), on the top edgeMaximum: 3at the corner (3,0)0≤(x−1)²≤40≤(y−2)²≤4No interior critical point: (1,2) belongs to the boundary.Equal input-axis scales: 70 pixels/unit. The inequalities certify the whole region.
On the entire rectangle, 0≤(x−1)²≤4 and 0≤(y−2)²≤4. Their sum lies in [0,8], and both bounds are attained.

An objective with positive definite Hessian can still have a constrained maximum on a compact boundary. The stationary-point Hessian test is an interior local statement, whereas this rectangle problem compares only feasible inputs.

08

At a regular equality constraint, first-order improvement is tested tangentially

Suppose f and g are C¹ near a feasible point a satisfying g(a)=c, with ∇g(a)≠0. The implicit function theorem makes the nearby level set a smooth hypersurface. Its tangent displacements v satisfy ∇g(a)·v=0. At a local extremum relative to that surface, the objective’s derivative must vanish in every tangent direction: ∇f(a)·v=0.

The orthogonal complement of that tangent space is the line spanned by ∇g(a). Therefore there is a scalar λ such that ∇f(a)=λ∇g(a), together with g(a)=c. These are Lagrange multiplier equations. They are necessary conditions at a regular constrained extremum, not a guarantee that every solution is an optimum or that it is global.

Using L(x,λ)=f(x)−λ(g(x)−c), the equations are ∇ₓL=0 and g=c. The equality multiplier has no sign restriction. Changing the sign convention for the equality term changes the multiplier’s sign, not the feasible optimiser. The constraint itself remains part of the system; differentiating the Lagrangian is not permission to compare infeasible points.

09

Compare candidate values and supply a global reason

Maximise and minimise f(x,y)=xy on the unit circle g=x²+y²=1. The gradient of g is nonzero everywhere on this feasible set. The equations y=2λx and x=2λy, together with x²+y²=1, force x and y to be nonzero and 4λ²=1. At λ=1/2 we have y=x; at λ=−1/2 we have y=−x.

The candidates are (1/√2,1/√2), (−1/√2,−1/√2), (1/√2,−1/√2), and (−1/√2,1/√2). The first two give f=1/2 and the other two give f=−1/2. Continuity on the compact circle ensures global extrema exist, and regularity ensures any extremum occurs among the complete multiplier candidates.

There is also a direct certificate: 2|xy|≤x²+y²=1. It proves −1/2≤xy≤1/2 on every feasible point. Equality in the appropriate signed bound occurs at the candidates above. The geometric picture and numerical samples illustrate these values, while the inequality or the exhaustive regular-constraint argument establishes their global scope.

Regular circle candidates align the objective and constraint normalsThe unit circle has equal 90-pixel-per-unit input scales. A=(1,1)/sqrt(2) and B=(-1,-1)/sqrt(2) attain xy=1/2; C=(1,-1)/sqrt(2) and D=(-1,1)/sqrt(2) attain xy=-1/2. At A, the green objective gradient equals A and the orange unit tangent equals (−1,1)/sqrt(2); both arrows use the same coordinate scale. The constraint gradient is 2A, so the multiplier is 1/2 for the minus-sign equality convention. The constraint gradient never vanishes on the circle.On x²+y²=1, a regular normal identifies candidatesABCD1−1xyA,B: xy=1/2λ=1/2C,D: xy=−1/2λ=−1/2At A: ∇f=A, ∇g=2AOrange: unit tangent∇f·v=0Every candidate is (±1,±1)/√2. The normal is nonzero on the circle.Input coordinates and both arrows use 90 pixels per unit.
The inequality 2|xy|≤x²+y²=1 certifies both global bounds. Compactness and regularity also justify a complete multiplier search.

For a linear objective ax+by on the unit circle, Cauchy–Schwarz similarly bounds its value by √(a²+b²). If (a,b)≠0, the maximum is attained in direction (a,b)/√(a²+b²), with the minimum at the opposite point. This gives a second interpretation of a constraint normal lining up with the objective gradient.

10

Keep the constraint-rank hypothesis

For equality constraints g₁(x)=c₁,…,gₖ(x)=cₖ, assume their gradients are linearly independent at a and the functions are C¹ nearby. The constraint Jacobian then has row rank k, and the feasible tangent space is its kernel. The same orthogonality argument gives ∇f(a)=Σⱼλⱼ∇gⱼ(a). There is one multiplier per independent constraint, not one multiplier per coordinate.

If the rank condition fails, the usual multiplier equations may miss a genuine optimum. For f(x,y)=x subject to x²+y²=0, the only feasible point is (0,0), so it is both a global minimum and maximum relative to the feasible set. But ∇f=(1,0) cannot equal λ(0,0). The constraint gradient vanishes there, and the regular-surface argument does not apply.

The same feasible set can sometimes be described by better regular constraints. For instance, the isolated point above can instead be specified by x=0 and y=0, whose gradients are independent in R². The optimiser did not change; the failed description did. When a rank check fails, analyse the feasible set directly or use an appropriate different theorem rather than discarding the point as a solver error.

11

Use the Lagrangian Hessian on the feasible tangent space

A constrained minimum need not have a positive ambient Hessian of f, because most directions may be infeasible. Assume f and the equality constraints are C² near a, the constraint gradients are independent, and the multiplier equations hold. For L=f−Σⱼλⱼ(gⱼ−cⱼ), the relevant second-order form is vᵀHₓL(a,λ)v on nonzero tangent vectors satisfying Dg(a)v=0.

If this restricted form is positive definite, a is a strict local minimum relative to the regular feasible surface; negative definiteness gives a strict local maximum. If it takes both signs on tangent directions, nearby feasible curves show that the point is not an extremum. Semidefinite cases require further analysis. With a zero-dimensional regular feasible set, local isolation supplies the comparison directly; there are no nonzero tangent directions to classify.

Why HₓL? Along a C² feasible curve x(t) with x(0)=a and velocity v, differentiate gⱼ(x(t))=cⱼ twice. The acceleration term in the second derivative of f cancels against Σλⱼ times those constraint equations, leaving (f∘x)″(0)=vᵀ(Hf−ΣλⱼHgⱼ)v. A regular local parameterisation then gives the ordinary stationary-point Taylor test in the allowed coordinates. The ambient Hessian Hf alone omits the constraint’s curvature.

For xy on the unit circle at a=(1/√2,1/√2), λ=1/2. Then HₓL=[[-1,1],[1,−1]]. The unit tangent v=(−1/√2,1/√2) gives vᵀHₓLv=−2, a strict constrained maximum. At a=(1/√2,−1/√2), λ=−1/2 and the unit tangent (1/√2,1/√2) gives 2, a strict constrained minimum. Hf=[[0,1],[1,0]] is indefinite at both points, illustrating why the restriction matters.

Feasible curvature differs from the ambient objective HessianUse the unit-speed circle parameterisation x=cosθ,y=sinθ. The restricted objective is xy=(1/2)sin2θ. The angle spans 0 to 2π with 70 pixels per radian, and outputs use 130 pixels per unit. The maxima at π/4 and 5π/4 have second derivative −2; the minima at 3π/4 and 7π/4 have second derivative 2. Since the circle radius is 1, the angular derivative here is also the unit-speed feasible-curve derivative. These values match the Lagrangian Hessian restricted to its unit tangent, although the ambient Hessian [[0,1],[1,0]] is indefinite.Follow a feasible curve before judging curvaturef(cosθ,sinθ)=½sin2θ on the unit circle−1/201/20π/4π/23π/4π5π/43π/27π/42πθAt maxima: vᵀHₓLv=−2At minima: vᵀHₓLv=2The ambient Hf is indefinite. This graph follows allowed, unit-speed motion.
A constraint bends the allowed path. At a constrained stationary point, its second derivative uses Hf−λHg on tangent vectors, including the constraint-curvature correction.
12

An active inequality adds a multiplier sign and complementary slackness

For a minimisation problem with inequalities gᵢ(x)≤0 and equalities hⱼ(x)=0, use the convention L=f+Σᵢλᵢgᵢ+Σⱼνⱼhⱼ. The Karush–Kuhn–Tucker conditions are primal feasibility, stationarity ∇f+Σλᵢ∇gᵢ+Σνⱼ∇hⱼ=0, dual feasibility λᵢ≥0, and complementary slackness λᵢgᵢ=0. Equality multipliers νⱼ are unrestricted. This plus-sign convention for equalities corresponds to the opposite sign of the earlier λ when h=g−c.

An inequality is active when gᵢ(a)=0 and inactive when gᵢ(a)<0. Complementary slackness forces an inactive inequality’s multiplier to be zero. An active inequality may also have multiplier zero; activity and a strictly positive multiplier are not equivalent. The multiplier conditions do not remove the need to keep the original feasible set.

For C¹ objectives and constraints, KKT conditions are necessary at a local minimiser under a suitable constraint qualification. A sufficient qualification is linear independence of all equality gradients and active inequality gradients at that point. Without a qualification the equations can fail: minimising f(x)=x subject to x²≤0 has the unique feasible optimiser 0, but stationarity would demand 1+λ·0=0.

KKT conditions by themselves do not certify an optimum in a nonconvex problem. For example, unconstrained stationary saddles satisfy the stationarity part with no multipliers at all. Additional geometry or second-order reasoning is required. The next section states a setting in which the conditions become a global certificate.

Activity and a positive multiplier are different conditionsThree coordinate-plane crops show x≤b for b=1,2,3 and objective (x-2)²+y². Each panel uses 35 pixels per coordinate unit on both axes; shading is only a crop of the unbounded feasible half-plane. The objective centre is (2,0). For b=1 the minimiser is (1,0) and λ=2. For b=2 the minimiser is (2,0), the constraint is active, and λ=0. For b=3 the same minimiser is interior to the half-plane, with inactive constraint and λ=0. Below, the scalar constraint x²≤0 has only the feasible point 0, yet the objective f=x has derivative 1 and the constraint derivative 0: no multiplier can satisfy stationarity.The minimiser can be active with a zero multiplierMinimise (x−2)²+y² over x≤b; shading is a half-plane crop.b=102Active; λ=2a=(1,0), f=1b=202Active; λ=0a=(2,0), f=0b=302Inactive; λ=0a=(2,0), f=0Filled point: minimiser.Ring: objective centre (2,0).Contrast: minimise x with x²≤0Only x=0 is feasible.Stationarity: 1+λ·0=0 is impossible.The constraint qualification fails.The singular problem still has its unique feasible optimiser.
For the regular convex examples, feasibility, stationarity, λ≥0 and λg=0 certify a unique global minimum. In the singular singleton example the optimum exists while LICQ and strict feasibility fail.
13

Convexity separates a certificate from a candidate

Consider a differentiable convex objective f and differentiable convex inequality functions gᵢ on an open convex domain, with affine equality functions hⱼ. A feasible point satisfying the KKT conditions is a global minimiser. This is a sufficiency statement: it does not require that a constraint qualification be checked again once valid multipliers are already supplied.

To see the reason, convexity gives f(x)≥f(a)+∇f(a)·(x−a) for any feasible x. Substitute stationarity. Affine equality terms vanish because both inputs satisfy the equalities. For each inequality, convexity gives ∇gᵢ(a)·(x−a)≤gᵢ(x)−gᵢ(a). Nonnegative multipliers and complementary slackness then imply f(x)≥f(a)−Σλᵢgᵢ(x)≥f(a). The argument covers every feasible x, so it establishes globality.

Necessity is a separate question. In this convex setting, a point in the domain satisfying all equalities and all inequalities strictly supplies Slater’s condition. If a finite minimum is attained, this condition guarantees KKT multipliers at a minimiser. The strict version stated here is a sufficient form of Slater; refined versions allow certain affine inequalities without strictness. Do not read the existence of a strictly feasible point as a proof that a minimiser is attained.

As an exact example, minimise f(x,y)=(x −2)²+y² subject to x≤1. Put g=x −1. At a=(1,0), ∇f=(−2,0), ∇g=(1,0), and λ=2 gives stationarity and complementary slackness. The objective is convex and the constraint is affine, so KKT certifies a global minimum. Directly, x≤1 implies (x −2)²≥1 and y²≥0, with equality only at a. The minimum value is 1.

14

Check meaning, scaling and whether the answer is certified

Constraint multipliers depend on the stated objective, units and constraint normalisation. Replacing an equality g=c by 10g=10c rescales its multiplier by 1/10 in the same Lagrangian convention. In a regular smoothly varying optimisation problem, a multiplier can describe sensitivity of the optimal value to the constraint level, but that interpretation requires the corresponding differentiability and choice of parameter; it is not automatic from a stationary equation.

For a certified computation, state the feasible set, regularity assumptions, candidate-generation method, omitted singular cases, classification and global argument. A numerical solver returning a point with a small gradient norm has not by itself checked feasibility, existence, boundaries, curvature or globality. A finite explorer serves comparisons; its theorem labels must follow analytic conditions, not the colour of a plot.

The explorer should invite a prediction: can the next point be a minimum when the quadratic form changes sign; which rectangle boundary is active; why does xy have circle maxima although its ambient Hessian is indefinite; and what changes when the inequality becomes inactive? Exact formulas and the complete finite cases check the implementation, while the proofs in the article establish the larger conclusions.

Predict the outcome before asking the Hessian

Start at the stationary origin. Predict what a line probe can reveal, then compare the Hessian’s conclusion with an exact sign argument for the whole polynomial. Keep the feasible set in view when you move to the constrained examples.

All supplied polynomials are C² everywhere and have ∇f(0)=0. The derivative conditions required by the stationary-point Hessian test hold here.

Inspect a line without treating it as an exhaustive testFor the selected displacement v=(0, 1/2), plot f(tv)=(0)t²+(1/16)t⁴ for −1≤t≤1. Blue is the actual polynomial and dashed orange is its quadratic term. Horizontal scale 210 pixels per t-unit; vertical scale 720 pixels per output unit. Both functions vanish at t=0; a constant zero line is defined. Axis scales vary across presets, so compare exact tables rather than visual steepness. A single line can reveal a contrary sign but cannot by itself prove the sign in all directions.Along h=tv, compare actual and second-order changesActual f(tv)Dashed quadratic term-0.125-1000.1251tAt t=1, the selected exact point is v=(0, 1/2).
The plot samples one line. The direct sign certificate below establishes the classification for these full polynomials; the Hessian conclusion retains its own local scope.
Hessian at the origin, with input/output coordinate order x,y
Output rowInput 1Input 2
120
200
Separate Hessian information from the full sign argument
QuantityExact result
Selected displacement v(0, 1/2)
Hessian determinant0
Hessian typePositive semidefinite
Stationary-point testInconclusive
Quadratic term ½vᵀHv0
Actual f(v)−f(0)1/16
Higher-order difference1/16
Classification of this full polynomialStrict global minimum

x²+y⁴ is positive for every nonzero input. This analytic argument supplies the full classification above. A zero determinant leaves the Hessian test inconclusive even when another argument settles the outcome.

Check the complete rectangle search

The feasible set is [0,3]×[0,2]. The stationary point (1,2) lies on its top edge, so there is no interior critical point. Each closed edge retains its endpoints, and all four corners must be included.

Each full edge and its derivative candidate
EdgeParameter domainDerivative-zero parameterLocation
bottom[0, 3]x=1(1, 0) inside this edge
top[0, 3]x=1(1, 2) inside this edge
left[0, 2]y=2(0, 2) at its endpoint
right[0, 2]y=2(3, 2) at its endpoint
All six distinct boundary candidates
PointObjective(x−1)²(y−2)²Kind
(0, 0)014Corner
(3, 0)344Corner
(0, 2)-410Corner
(3, 2)-140Corner
(1, 0)-104Horizontal-edge critical point
(1, 2)-500Horizontal-edge critical point

For every feasible point, 0≤(x−1)²≤4 and 0≤(y−2)²≤4. Thus −5≤f≤3. The minimum −5 is attained at (1,2), and the maximum 3 at (3,0). These full-region inequalities certify the extrema; the finite table checks the completed candidate search.

Compare circle multipliers, tangent curvature and singular constraints

For xy on x²+y²=1, the equality convention is L=xy−λ(x²+y²−1). Coordinates and unit tangents below are exact signed coefficients divided by √2.

All four regular unit-circle candidates
PointxyλUnit tangentvᵀHₓLv
(1/√2, 1/√2)1/21/2(-1/√2, 1/√2)-2
(-1/√2, -1/√2)1/21/2(1/√2, -1/√2)-2
(1/√2, -1/√2)-1/2-1/2(1/√2, 1/√2)2
(-1/√2, 1/√2)-1/2-1/2(-1/√2, -1/√2)2
Ambient objective Hessian: indefinite at all four points
Output rowInput 1Input 2
101
210
Lagrangian Hessian at (1,1)/√2, λ=1/2
Output rowInput 1Input 2
1-11
21-1
Lagrangian Hessian at (1,−1)/√2, λ=−1/2
Output rowInput 1Input 2
111
211
Rational circle probes illustrate the exact global bound
Pointx²+y²xyxy+1/21/2−xy
(1, 0)101/21/2
(3/5, 4/5)112/2549/501/50
(-3/5, 4/5)1-12/251/5049/50
(-1, 0)101/21/2
(-3/5, -4/5)112/2549/501/50
(3/5, -4/5)1-12/251/5049/50
(0, 1)101/21/2
(0, -1)101/21/2

The proof 2|xy|≤x²+y²=1 covers the entire circle. Every listed candidate has nonzero constraint gradient, a unit feasible tangent and zero stationarity residual. Replacing g=1 with 10g=10 divides each equality multiplier by 10.

For the different equality constraint x²+y²=0, the only feasible point is (0,0), so it is both a minimum and maximum of f=x relative to that singleton. Its constraint gradient has rank 0; the required regular rank is 1. The equation (1,0)=λ(0,0) has no solution. This failed description must not erase its optimiser.

Change activity without changing the KKT convention

Minimise f=(x−2)²+y² subject to g=x−b≤0. Use L=f+λg with λ≥0. This panel is independent of the polynomial selector above.

All four KKT requirements and the global certificate
QuantityExact result
Feasible bound b1
Minimiser a(1, 0)
Objective value1
Primal g(a)≤00
Active inequality?Yes
Dual multiplier λ≥02
Stationarity ∇f+λ∇g(0, 0)
Complementary slackness λg0
Independent active gradientsYes
A strictly feasible point(0, 0)
Its constraint value-1
Globality conditionsStrictly convex objective; affine inequality

For every x≤b<2, (x−2)²≥(b−2)²; adding y² preserves the bound. Equality requires (b,0). An active constraint can have multiplier 0, as b=2 shows. Complementary slackness forces an inactive constraint to have multiplier 0. Valid KKT multipliers are globally sufficient here because of convexity; their existence and the attainment argument remain distinct facts.

Contrast minimising x with x²≤0. The only feasible point 0 is the optimiser, but ∇f=1 and the active ∇g=0. Stationarity 1+λ·0=0 is impossible. Active-gradient independence and strict feasibility fail. The optimiser exists despite the absence of KKT multipliers.

Keep a local conclusion local

The original cubic example on R²
Stationary pointValuedet HClassification
(1, 0)-212Strict local minimum, not global
(-1, 0)2-12Saddle

For x³−3x+y², the value tends to −∞ along y=0 and x→−∞. Its strict local minimum is therefore not global. No finite explorer picture substitutes for this unboundedness argument.

Worked examples

Classify two stationary surfaces

Compare x²+y² and x²−y² at 0.

  1. Both gradients vanish at 0.
  2. For x²+y², the Hessian is diag(2,2) and the output is positive at every nonzero input.
  3. For x²−y², the Hessian is diag(2,−2); the x axis gives positive changes and the y axis negative changes.

The bowl has a strict global minimum at 0. The second surface has a saddle there.

Find a local minimum that is not global

Classify stationary points of f=x³−3x+y² on R².

  1. Stationarity gives 3x²−3=0 and 2y=0, so the candidates are (1,0) and (−1,0).
  2. H=diag(6x,2), positive definite at (1,0) and indefinite at (−1,0).
  3. Along y=0 and x→−∞, f→−∞.

There is a strict local minimum of −2 at (1,0), a saddle at (−1,0), and no global minimum on R².

Inspect the unresolved direction

Compare x²+y⁴ and x²−y⁴ at 0.

  1. Both have zero gradient and Hessian diag(2,0) at 0.
  2. For the first, every nonzero input gives a positive value.
  3. For the second, x-axis inputs give positive values and y-axis inputs negative values.

The first has a strict global minimum; the second has a saddle. Their equal semidefinite Hessians do not distinguish them.

Use boundary work and an exact global bound

Find extrema of x²+y²−2x −4y on [0,3]×[0,2].

  1. The stationary point (1,2) lies on the top boundary, not in the open interior.
  2. Restrict to each edge; horizontal edges have a critical x=1, and include all corners.
  3. Write f=(x −1)²+(y −2)²−5. The sum of squares lies between 0 and 8 on the rectangle.
  4. Both bounds are attained: 0 at (1,2), 8 at (3,0).

The global minimum is −5 at (1,2); the global maximum is 3 at (3,0).

Align an objective gradient with the circle normal

Maximise 3x+4y on x²+y²=1.

  1. Cauchy–Schwarz gives 3x+4y≤√(3²+4²)√(x²+y²)=5.
  2. Equality requires (x,y)=(3/5,4/5).
  3. The opposite point gives the minimum −5.

The maximum is 5 at (3/5,4/5), and the minimum is −5 at (−3/5,−4/5).

Certify every multiplier candidate

Find the global extrema of xy on x²+y²=1.

  1. The nonzero constraint gradient permits Lagrange multipliers.
  2. y=2λx and x=2λy force λ=±1/2 and y=±x.
  3. The four unit-circle candidates give ±1/2.
  4. The inequality 2|xy|≤x²+y²=1 proves the same global bounds.

The maximum 1/2 occurs when x=y=±1/√2. The minimum −1/2 occurs when x=−y=±1/√2.

Keep an isolated feasible point even when multipliers fail

Minimise f=x subject to x²+y²=0.

  1. The constraint admits only (0,0).
  2. This point is both a global minimum and maximum relative to that singleton.
  3. The constraint gradient is 0, so (1,0)=λ(0,0) has no solution.

The optimum is not missing. The usual regular-constraint multiplier theorem is inapplicable to this constraint description.

Restrict the Lagrangian curvature

Classify xy on the unit circle near a=(1/√2,1/√2).

  1. The multiplier is λ=1/2 for L=xy−λ(x²+y²−1).
  2. HₓL=[[-1,1],[1,−1]].
  3. The unit feasible tangent is v=(−1/√2,1/√2), and vᵀHₓLv=−2.
  4. Regularity and the negative restricted form give a strict local constrained maximum.

This is a constrained maximum despite the ambient objective Hessian being indefinite.

Verify all four KKT requirements

Minimise (x −2)²+y² with x≤1.

  1. At (1,0), the constraint g=x −1 is active and primal feasibility holds.
  2. Choose λ=2≥0. Then (−2,0)+2(1,0)=0.
  3. Complementary slackness holds because λg=2·0=0.
  4. Convexity gives a global certificate, also seen directly from (x −2)²+y²≥1.

The unique global minimiser is (1,0), with objective 1 and inequality multiplier 2.

Do not assume KKT is necessary without a qualification

Minimise f(x)=x subject to x²≤0.

  1. The only feasible x is 0, which is the minimiser.
  2. The active inequality gradient at 0 is 0.
  3. KKT stationarity would read 1+λ·0=0, impossible for any λ.
  4. No strictly feasible x exists, and the active-gradient independence condition fails.

The solution exists; the usual constraint qualifications fail, so the missing KKT multiplier is not a contradiction.

Track the multiplier convention

If ∇f=λ∇g for g=c, what multiplier applies to the equivalent constraint 10g=10c?

  1. The new gradient is 10∇g.
  2. To keep ∇f unchanged, write ∇f=λ̃(10∇g).
  3. Thus λ̃=λ/10.

The feasible set and optimiser stay unchanged, while the multiplier rescales by 1/10.

Try it yourself

  1. Does a positive definite Hessian at a stationary point guarantee a global minimum on an arbitrary domain?

    Show the answer and reasoning

    No.

    It certifies a strict local minimum under C² regularity. Globality needs additional information, such as convexity over a convex domain or a global inequality.

  2. Can f=x have a constrained minimum with gradient (1,0)?

    Show the answer and reasoning

    Yes, on x≥0 every point with x=0 is a global minimum.

    Negative x displacements are forbidden. The unconstrained interior gradient-zero necessity does not apply.

  3. Does f=x² attain its infimum on (0,1)?

    Show the answer and reasoning

    No.

    Its infimum is 0, but 0 is not feasible. Bounded values and a limiting infimum do not establish attainment.

  4. At a C² stationary point, H=[[4,1],[1,2]]. What is the classification?

    Show the answer and reasoning

    A strict local minimum.

    A=4>0 and D=4·2−1=7>0, so the Hessian is positive definite.

  5. At a C² stationary point, H=[[-4,1],[1,−2]]. What follows?

    Show the answer and reasoning

    A strict local maximum.

    D=8−1=7>0 and the first diagonal entry is negative, giving a negative definite Hessian.

  6. At a C² stationary point, H=[[2,3],[3,2]]. What follows?

    Show the answer and reasoning

    A saddle.

    The determinant is 4−9=−5, so the symmetric Hessian has eigenvalues of opposite signs.

  7. If the Hessian determinant is 0, is the point necessarily not an extremum?

    Show the answer and reasoning

    No.

    The test is inconclusive. The zero-Hessian functions x⁴+y⁴, −x⁴−y⁴ and x⁴−y⁴ give a minimum, maximum and saddle.

  8. May H=2I alone classify every input of f=x²+y² as a minimum?

    Show the answer and reasoning

    No.

    Only the origin is stationary. Away from it, a first-order improving direction exists despite positive curvature.

  9. Where is the rectangle example’s global maximum, and why is a sampled table insufficient by itself?

    Show the answer and reasoning

    At (3,0), with value 3.

    The complete boundary analysis or the bound (x −1)²+(y −2)²≤8 proves exhaustiveness. A finite table alone need not contain every possible optimiser.

  10. At a regular local extremum of f subject to g=c, what must hold?

    Show the answer and reasoning

    ∇f=λ∇g and g=c for some scalar λ.

    The derivative of f vanishes in every feasible tangent direction, whose orthogonal complement is spanned by the nonzero constraint gradient.

  11. Must an equality-constraint multiplier be nonnegative?

    Show the answer and reasoning

    No.

    Equality multipliers are unrestricted. Nonnegativity belongs to a stated inequality/minimisation convention, not every Lagrange multiplier.

  12. What direct inequality certifies the extrema of xy on the unit circle?

    Show the answer and reasoning

    2|xy|≤x²+y²=1.

    It gives −1/2≤xy≤1/2 on all feasible inputs, with equality at the stated candidates.

  13. For k equality constraints in Rⁿ, what rank condition underlies the ordinary multiplier theorem?

    Show the answer and reasoning

    Their k gradients must be linearly independent at the point.

    The constraint Jacobian then has row rank k and defines the regular tangent kernel. Singular descriptions need separate analysis.

  14. For regular equality constraints, should the second-order test use Hf on all ambient directions?

    Show the answer and reasoning

    No.

    Use the Hessian of the Lagrangian on the kernel of the constraint derivative, with the stated C² and stationarity hypotheses.

  15. Under the KKT convention g≤0, what does g(a)<0 imply about its multiplier?

    Show the answer and reasoning

    λ=0.

    Complementary slackness gives λg(a)=0. An active constraint can still have λ=0, so the reverse implication is not valid.

  16. Does every KKT point of a nonconvex problem give a global minimum?

    Show the answer and reasoning

    No.

    KKT is generally a necessary first-order system under a qualification. Convex objectives/inequalities and affine equalities provide the stated sufficiency setting.

  17. Does Slater’s strictly feasible point by itself prove that a finite minimum is attained?

    Show the answer and reasoning

    No.

    In the stated convex problem it supports necessity of KKT when a finite minimum is attained. Attainment still needs its own existence argument.

  18. Can numerically different equality multipliers describe the same optimum after a constraint is rescaled?

    Show the answer and reasoning

    Yes.

    For 10g=10c the multiplier becomes λ/10 in the same minus-sign equality convention. Always state units and normalisation.

What to carry forward

  • An optimum is defined relative to a feasible set; local, strict and global describe different comparisons.
  • Continuity on a nonempty compact feasible set guarantees attainment. A stationary equation does not supply existence.
  • A differentiable unconstrained interior extremum has zero gradient, but a zero gradient only identifies a candidate.
  • At a C² stationary point, a definite Hessian gives a strict local extremum and an indefinite Hessian gives a saddle. Semidefinite pointwise data are inconclusive.
  • A complete compact-region search includes interior critical points, smooth boundary pieces, endpoints, corners and singular cases.
  • Lagrange equations are necessary at regular equality-constrained extrema. Retain feasibility and the constraint-rank hypothesis.
  • Constrained second-order curvature comes from the Lagrangian Hessian restricted to feasible tangent directions.
  • KKT conditions combine feasibility, stationarity, sign and complementary slackness under a stated convention. Their necessity requires an appropriate qualification.
  • Convex objectives and inequalities with affine equalities turn valid KKT multipliers into a global certificate. Slater, attainment and uniqueness remain distinct questions.

References

Sources for the concepts and teaching approaches in this article.

  1. Calculus Volume 3OpenStaxOpen textbook · §§4.7–4.8Maxima/minima problems · §4.7Lagrange multipliers · §4.8openstax.org
  2. Nonlinear Optimization · KKT and constraint qualificationsGabriele FarinaMIT OpenCourseWare · Lecture 7, pp. 3–5 · PDFocw.mit.eduRead source
  3. Calculus of Variations and Optimal Control · Constrained second derivativesDaniel LiberzonAuthor’s open textbook · §1.2.2.2liberzon.csl.illinois.eduRead source
  4. Convex Optimization · Optimality and Slater’s conditionStephen Boyd and Lieven VandenbergheAuthors’ open textbook · §§5.2.3 and 5.5.3 · PDFweb.stanford.eduRead source