---
title: "Karush-Kuhn-Tucker (KKT) Conditions for Constrained Optimization"
author:
  - name: "Fan Wang"
    affiliation: "Department of Economics, University of Houston"
    url: "https://fanwangecon.github.io/"
date: "2026-11-30"
---

**Part of [Math Camp: An Introduction to Mathematics and Statistics with Applications in Economics](https://fanwangecon.github.io/Stam4Econ/).**  
[Main Stam4Econ site](https://fanwangecon.github.io/Stam4Econ/) | [View this section in the book](https://fanwangecon.github.io/Stam4Econ/optimization_continuous/overview.html#karush-kuhn-tucker-kkt-conditions-for-constrained-optimization) | [Author: Fan Wang](https://fanwangecon.github.io/) | [DOI: 10.5281/zenodo.24696926](https://doi.org/10.5281/zenodo.24696926)  
Date: 2026-11-30 | [HTML](https://fanwangecon.github.io/Stam4Econ/htmlpdfq/optimization_continuous/karush_kuhn_tucker_conditions.html) | [PDF](https://fanwangecon.github.io/Stam4Econ/htmlpdfq/optimization_continuous/karush_kuhn_tucker_conditions.pdf) | [QMD](https://fanwangecon.github.io/Stam4Econ/htmlpdfq/optimization_continuous/karush_kuhn_tucker_conditions.qmd)

## Karush-Kuhn-Tucker (KKT) Conditions for Constrained Optimization

### Equality constrained optimization

Let $f:\mathbb{R}^n\to\mathbb{R}$ and $g:\mathbb{R}^n\to\mathbb{R}^m$ be continuously differentiable, and consider the equality-constrained maximization problem:

\begin{align}
\max_{x} & \quad f(x) \\
\text{subject to} & \quad g(x) = c
\end{align}

We combine the constraint into the objective function using a Lagrange multiplier $\lambda \in R^m$, and form the lagrangian:

$$
\mathcal{L}(x, \lambda) = f(x) - \lambda^T (g(x) - c)
$$

At a local optimum $x^\ast$, the first-order condition is

$$
\nabla_x \mathcal{L}(x^{\ast},\lambda^{\ast})=0,
\qquad
g(x^{\ast})=c.
$$

These conditions are necessary under a suitable constraint qualification, such as full row rank of the equality-constraint Jacobian at $x^\ast$. They are not sufficient for a maximum in a general nonconcave problem.

The multiplier converts the constrained problem into a Lagrangian first-order system; it does not by itself guarantee that a candidate is an optimum.

### Inequality constrained optimization

For the inequality-constrained problem

\begin{align}
\max_{x} & \quad f(x) \\
\text{subject to} & \quad g(x) \le c
\end{align}

We combine the constraint into the objective function using a Lagrange multiplier $\lambda \in R^m$, and form the lagrangian:

$$
\mathcal{L}(x, \lambda) = f(x) - \lambda^T (g(x) - c)
$$

the KKT conditions at a candidate $(x^\ast,\lambda^\ast)$ are:

$$
    \nabla_x \mathcal{L}(x^{\ast},\lambda^{\ast}) = 0
$$

$$
    g(x^{\ast}) \le c
$$

$$
    \lambda^{\ast} \ge 0
$$

$$
    \left(\lambda^{\ast}\right)^T (g(x^{\ast}) - c) = 0
$$

For a local maximum, these conditions are necessary under a constraint qualification (for example, the linear independence constraint qualification). They express stationarity, feasibility, multiplier sign, and complementary slackness, respectively.

Note that we can express the gradient of the Lagrangian with respect to $x$ as:

\begin{align}
\nabla_x \mathcal{L}(x^{\ast},\lambda^{\ast}) &= 0 \\
\nabla_x f(x^{\ast}) - J_g(x^{\ast})^T \lambda^{\ast} &= 0 \\
\nabla_x f(x^{\ast}) &= J_g(x^{\ast})^T \lambda^{\ast}
\end{align}

where $J_g(x^{\ast})$ is the Jacobian matrix of the constraint function $g$ evaluated at $x^{\ast}$.

Equality constraints can also be represented by two inequalities, $g(x)\le c$ and $-g(x)\le -c$, though it is often clearer to retain their unrestricted multipliers explicitly. KKT conditions are sufficient for a global maximum when the objective is concave, the inequality constraint functions are convex, and any equality constraints are affine. Without such conditions, KKT candidates must be checked further.
