KKT and interior-point methods: when constraints enter the picture
From Lagrangians and KKT conditions to barrier methods and the Convex QP Solver.
Learning goal
Write KKT conditions for a constrained problem, interpret multipliers, and explain the main idea of interior-point methods.
Prerequisites
- Multivariable derivatives
- Basic linear algebra
- Optimization basics
Constrained optimization
With constraints, ∇f=0 alone is not enough. The feasible region becomes part of the optimality conditions.
The Lagrangian
The multipliers describe how the constraints interact with the objective and become part of the KKT system under suitable assumptions.
KKT conditions
- Primal feasibility: the original constraints hold.
- Dual feasibility: inequality multipliers are non-negative.
- Stationarity: the Lagrangian gradient with respect to x is zero.
- Complementary slackness: λᵢgᵢ(x)=0.
A one-dimensional example
The unconstrained minimum is x=0, but the constraint excludes it. The constrained optimum is x*=1 on the boundary.
Barrier and interior-point idea
For μ>0, approaching an inequality boundary increases the barrier cost. Reducing μ gradually brings the barrier problem toward the original constrained problem.
Connection to the Convex QP Solver
The Convex QP Solver uses primal-dual interior-point and a Mehrotra predictor-corrector method. This is where KKT becomes a numerical system inside actual solver code.
Exercises
- Write KKT conditions for minimize x² subject to x≥2.
- Identify the active constraint.
- Explain stationarity versus feasibility with an example.
Related project
Convex Quadratic Programming Solver
KKT, numerical diagnostics, and interior-point methods are part of the solver core.
Open sourceRelated solutions
Working on constrained optimization?
We can move from the model and constraints to the numerical method and implementation.