How this calculation works
Check an entered polynomial KKT candidate and classify sufficient strict local minima through Lagrangian curvature on the constrained tangent space.
L=f+Σλ_i g_i; verify feasibility, ∇_xL=0, λ_i≥0 and λ_i g_i=0 for g_i≤0. With regularity and strict complementarity, test Zᵀ∇²L Z positive definite for an active-gradient nullspace basis Z.A worked example
Minimize x²+y² subject to x+y=1. At (1/2,1/2), multiplier -1 gives stationarity. Tangent basis Z=(1,-1)ᵀ yields reduced Hessian [4], establishing a strict constrained local minimum.
Good to know
Two or three variables with rational polynomial objective/constraints of degree at most3, up to six constraints, with at most three active equality/inequality gradients, supplied rational point and multipliers. Exact feasibility, stationarity, complementary slackness, LICQ and strict-complementarity checks; rational tangent basis and reduced Hessian inertia. Classify sufficient strict local minima only under the checked hypotheses. Degenerate critical-cone cases stay unresolved; no global-optimality claim.
Reference: Nocedal and Wright, Numerical Optimization, second edition (opens in a new tab) ↗
Enter a candidate rather than search for one
Supply a rational polynomial objective, polynomial constraints, a rational point and one multiplier for each constraint. The page checks this specific candidate; it does not solve the nonlinear optimization problem or locate every stationary point. Variables number two or three, polynomial degree is at most three, and expressions use the displayed variable names consistently.
Equality constraints are written as expressions equal to zero, while inequalities are written as expressions less than or equal to zero. The Lagrangian convention is objective plus multiplier times constraint. Inequality multipliers must therefore be nonnegative, while equality multipliers have no sign restriction. Changing the inequality direction without changing the multiplier convention changes the KKT equations and can reverse an otherwise plausible interpretation.
Compare this with the Lagrange multiplier calculator with an equality constraint. Checks a supplied nonlinear constrained candidate and multipliers, then tests curvature on the constrained tangent space. Existing Lagrange calculator solves one quadratic objective on one line or axis-aligned ellipse; generic convex QP assumes a globally PSD objective and linear constraints. Neither handles a nonconvex polynomial Lagrangian with several nonlinear constraints at a supplied KKT point.
Check first-order conditions exactly
Evaluate every constraint at the supplied point to determine feasibility and the active inequalities. Verify nonnegative inequality multipliers and complementary slackness, then differentiate the Lagrangian and check stationarity. An inactive inequality must have zero multiplier. A candidate that fails one of these checks is not eligible for the sufficient-minimum classification under the stated convention.
Exact rational evaluation makes zero tests reproducible for the entered data, including derivatives of rational-coefficient polynomials. It does not make an approximately measured point exact in the original application. If a decimal point was rounded from a numerical solver, an exact nonzero stationarity residual may reflect that rounding. The tool reports the checked candidate rather than silently adjusting its coordinates or multipliers to a nearby solution.
Understand regularity and the tangent space
The active constraint gradients must be linearly independent for the supported LICQ-based test. This ensures a well-defined constrained tangent space and excludes redundant active equations from this particular sufficient-condition pathway. For active inequalities, strict complementarity requires strictly positive multipliers; a zero active multiplier can make the relevant critical cone larger than the tangent space used here.
Construct a rational basis Z for the nullspace of the active-gradient matrix. Its columns describe first-order feasible tangent directions under the checked hypotheses. The basis need not be orthonormal. A different full-rank basis changes the reduced Hessian by congruence and preserves its inertia, so signs of curvature are meaningful even when raw eigenvalue magnitudes differ between basis choices.
Use the Lagrangian Hessian
The second-order matrix is the Hessian of the entire Lagrangian at the candidate, including multiplier-weighted constraint Hessians. Curved constraints contribute curvature that is absent from the objective Hessian alone. Restrict this matrix to tangent directions through Z transpose H Z. Positive definiteness gives positive curvature along every nonzero allowed tangent direction under the stated regularity assumptions.
An indefinite or singular reduced Hessian does not automatically produce a full classification. Higher-order terms, critical-cone behavior or constraint degeneracy can require further analysis. The page should distinguish a successful sufficient-minimum certificate from an unresolved second-order case. It should also avoid a global-optimality claim: a strict local minimum can coexist with a better feasible point far away.
Verify the equality-constrained default
For objective x²+y² and constraint x+y-1=0, the objective gradient at (1/2,1/2) is (1,1). Adding multiplier minus one times constraint gradient (1,1) gives zero, so stationarity holds. The constraint is satisfied and its nonzero gradient has rank one, establishing LICQ. There are no inequality sign or strict-complementarity checks to fail.
The Lagrangian Hessian is twice the two-by-two identity because the constraint is affine. Using tangent basis (1,-1) gives reduced Hessian equal to four. Direct substitution y=1-x also gives objective 2(x-1/2)²+1/2, independently confirming a strict constrained minimum. This example checks the multiplier sign, tangent construction and reduced curvature with elementary algebra rather than relying only on symbolic matrix output.
Read the tangent-curvature illustration
The figure marks a point on a constraint curve and a tangent direction at that point. Curvature is tested along feasible tangent motion, not along every direction in the ambient plane. An objective can have negative curvature in a normal direction and still satisfy the constrained test when that direction is not available to first order under the regularity conditions.
For a curved constraint, following a straight tangent line leaves the feasible curve at second order. The multiplier-weighted constraint Hessian corrects for that geometry, which explains why the Lagrangian appears. A static drawing conveys the distinction but cannot establish the algebraic hypotheses for edited input. Read feasibility, multiplier signs, active-gradient rank and reduced inertia as a connected chain of checks.
Interpret unresolved and zero-dimensional cases
At most six constraints are accepted, with at most three active equality or inequality gradients in the supported test. Failed LICQ, active zero multipliers, zero reduced curvature or an exact-arithmetic work limit must remain explicitly unresolved for a sufficient-minimum claim. Those outcomes do not prove that the candidate is not a local minimum; they show that this particular certificate does not settle it.
When independent active constraints leave no tangent directions, the regularity and strict-complementarity assumptions still need careful interpretation rather than a fake one-by-one curvature matrix. Report the tangent dimension explicitly. Save the objective, constraint direction convention, point and multipliers with the result. A reduced Hessian alone omits the first-order and regularity conditions that make its positive curvature sufficient for the claimed local conclusion.
A few questions, answered
Does this find the optimizer?
No. It checks a supplied point and supplied multipliers.
Which inequality convention is used?
Constraints are g(x)≤0 and the Lagrangian is f+Σλg, with λ≥0 for inequalities.
Why include constraint Hessians?
Curved constraints affect feasible second-order motion, so the Lagrangian Hessian is required.
Does a failed test prove no minimum?
No. Degenerate or zero-curvature cases can require additional analysis.