# Big picture behind how to use KKT conditions for constrained optimization

What is the point of KKT conditions for constrained optimization? In other words, how is the best way to use them. I have seen examples in different contexts, but miss a short overview of the procedure, in like one or two sentences.

Should we use them to find the optimal solution of a constrained problem? The reason I am very confused is that one of conditions in KKT, already requires the constraints of the original problem to hold. The question is if we knew how to impose constraints in first place, then why look at KKT conditions?

Or should we use another one of KKT conditions first, i.e. only set the gradient of Lagrangian to zero and extract the solutions from that, and then check if the inequality and equality constraints hold?

I deeply appreciate if you could clarify.

• The KKT conditions are not used to find an optimal solution. They are simply necessary (and sometimes sufficient) conditions for optimality. Therefore, given a solution, we can check to make sure it meets the necessary conditions. In general, points that satisfy the KKT conditions can't be solved for immediately. Rather, typical algorithms iteratively move towards points that satisfy KKT conditions (i.e., numerically solving the KKT system of equations). Commented Feb 26, 2017 at 22:28
• To quote Boyd and Vandenberghe, from Convex Optimization: "The KKT conditions play an important role in optimization. In a few special cases it is possible to solve the KKT conditions (and therefore, the optimization problem) analytically. More generally, many algorithms for convex optimization are conceived as, or can be interpreted as, methods for solving the KKT conditions." Commented Feb 26, 2017 at 22:32
• The strategy is the same as the strategy from calculus of minimizing a function by setting the derivative equal to $0$. For unconstrained problems, the optimality condition is just that the derivative is equal to $0$. For constrained problems, the analogous optimality condition is the KKT conditions. Commented Mar 6, 2017 at 20:36
• @David given a problem, is there a sufficient condition that guarantees an analytical solution of the KKT conditions? I mean, which are the situations that allow an analytical solution? Can we encompass them with a statement? It seems that Boyd and Vandenberghe do not elaborate further on it. Commented Feb 14, 2022 at 0:33