Skip to main content

1  Constrained Minimization

Author
Affiliation

Enrico Bertolazzi

University of Trento, Department of Industrial Engineering

Everything needed to set up and solve a constrained minimization exercise: Lagrange multipliers, definiteness tests, KKT conditions, second-order tests. Colors: \color{CornflowerBlue}\text{objective}, \color{Brown}\text{equality constraints}, \color{DarkOrchid}\text{inequality constraints and complementarity}, \color{Crimson}\text{labels}.

1.1 Lagrange Multipliers

Problem. f\in C^2(\mathbb R^n,\mathbb R), \bm h\in C^2(\mathbb R^n,\mathbb R^m), m\le n. Gradients of scalar functions are row vectors; \bm J=D\bm h has the rows \nabla h_i.

\begin{aligned} \text{minimize:}\quad & {\color{CornflowerBlue}f(\bm x)}\\ \text{subject to:}\quad & {\color{Brown}h_i(\bm x)=0},\quad i=1,\ldots,m \end{aligned}

Lagrangian.

\mathcal L(\bm x,\bm\lambda)={\color{CornflowerBlue}f(\bm x)}-{\color{Brown}\bm\lambda^T\bm h(\bm x)}

Conditions. At a local minimizer with \operatorname{rank}\bm J(\bm x^\star)=m (LICQ, linear independence constraint qualification) the first-order, feasibility and Second-Order Necessary Conditions (SONC) hold:

\left\{\begin{aligned} {\color{CornflowerBlue}\nabla f(\bm x^\star)}-{\color{Brown}(\bm\lambda^\star)^T\bm J(\bm x^\star)} &=\bm 0 \quad && \text{\color{Crimson}first order}\\[0.5em] {\color{Brown}\bm h(\bm x^\star)} &=\bm 0 \quad && \text{\color{Crimson}feasibility}\\[0.5em] \bm z^T\nabla^2_{\bm x\bm x}\mathcal L(\bm x^\star,\bm\lambda^\star)\,\bm z &\ge 0,\quad \forall\,\bm z\in\ker\bm J(\bm x^\star) \quad && \text{\color{Crimson}SONC} \end{aligned}\right.

Sufficient. If \bm h(\bm x^\star)=\bm 0, \nabla_{\bm x}\mathcal L(\bm x^\star,\bm\lambda^\star)=\bm 0 and the Second-Order Sufficient Condition (SOSC) holds,

\bm z^T\nabla^2_{\bm x\bm x}\mathcal L(\bm x^\star,\bm\lambda^\star)\,\bm z>0,\quad \forall\,\bm z\in\ker\bm J(\bm x^\star)\setminus\{\bm 0\} \quad {\color{Crimson}\text{SOSC}}

then \bm x^\star is a strict local minimizer (no rank condition needed).

Recipe.

  1. Form \mathcal L; solve \nabla_{\bm x}\mathcal L=\bm 0, \bm h=\bm 0 (n+m equations in n+m unknowns \bm x,\bm\lambda).
  2. At each candidate check \operatorname{rank}\bm J=m.
  3. Also find the feasible points with \operatorname{rank}\bm J<m: multipliers need not exist there, they may be minimizers, and they are studied directly.
  4. Tangent space \ker\bm J (\dim=n-m under LICQ): basis \bm K\in\mathbb R^{n\times r}, r=n-\operatorname{rank}\bm J, \bm J\bm K=\bm 0.
  5. Reduced Hessian \bm H_R=\bm K^T\nabla^2_{\bm x\bm x}\mathcal L(\bm x^\star,\bm\lambda^\star)\bm K\in\mathbb R^{r\times r}.
  6. Classify with the table below.
  7. If the feasible set is compact, compare f at all candidates and at the rank-deficient feasible points: global minimum and maximum.
\bm H_R at (\bm x^\star,\bm\lambda^\star) verdict
\succ0 strict local minimum
\prec0 strict local maximum
indefinite neither minimum nor maximum (saddle); needs \operatorname{rank}\bm J=m
semidefinite, singular inconclusive (SONC holds, SOSC does not)
r=0 test vacuous: isolated feasible point, strict local minimum (and maximum)

Watch out.

  • The second-order object is the Hessian of \mathcal L, not of f: a curved constraint contributes -\sum_i\lambda_i\nabla^2h_i. For linear constraints \nabla^2\mathcal L=\nabla^2f.
  • Definiteness of \bm H_R does not depend on the choice of the basis \bm K.
  • Maximize f: minimize -f (then \bm\lambda and \nabla^2\mathcal L change sign), or read the \prec0 row.
  • No constraints (m=0): \bm K=\bm I, \bm H_R=\nabla^2f. Constraints solvable by substitution: eliminate them and use the unconstrained tests.

1.2 Sylvester’s Criterion

Let \bm A\in\mathbb R^{n\times n} be symmetric. If it is not, only \bm S=\tfrac12(\bm A+\bm A^T) matters (\bm z^T\bm A\bm z=\bm z^T\bm S\bm z): apply every test below to \bm S. \Delta_k=\det\bm A_{1:k,1:k} is the leading principal minor of order k. A principal minor of order k is \det\bm A_{I,I} for any index set I, |I|=k (there are \binom nk of them, 2^n-1 in total).

matrix test
\bm A\succ0 \Delta_k>0, k=1,\ldots,n
\bm A\succeq0 every principal minor \ge0 (all orders, all index sets I)
equivalent eigenvalues: \succ0\iff\lambda_i(\bm A)>0; \succeq0\iff\lambda_i(\bm A)\ge0 for all i

For \bm A=\begin{bmatrix}a&b\\b&c\end{bmatrix}: \ \bm A\succ0\iff a>0,\ ac-b^2>0; \ \bm A\succeq0\iff a\ge0,\ c\ge0,\ ac-b^2\ge0.

Positive semidefinite in practice.

  1. Quick necessary checks: a_{ii}\ge0 and a_{ij}^2\le a_{ii}a_{jj} for all i,j. In particular a_{ii}=0 forces row and column i to be zero: delete them and test the smaller matrix.
  2. If \Delta_1,\ldots,\Delta_{n-1}>0, then \bm A\succeq0\iff\det\bm A\ge0: only the last leading minor may vanish.
  3. Otherwise check all principal minors. For n=3 they are seven: a_{11},a_{22},a_{33}\ge0; \ a_{11}a_{22}-a_{12}^2,\ a_{11}a_{33}-a_{13}^2,\ a_{22}a_{33}-a_{23}^2\ge0; \ \det\bm A\ge0.
  4. Without minors (symmetric elimination, \bm A=\bm L\bm D\bm L^T). Bring any diagonal entry to position 1 by a symmetric permutation and write \bm A=\begin{bmatrix}a&\bm b^T\\\bm b&\bm C\end{bmatrix}:
    • a<0: \bm A\not\succeq0;
    • a=0: need \bm b=\bm0, then continue with \bm C;
    • a>0: continue with the Schur complement \bm C-\bm b\bm b^T/a.
    \bm A\succeq0 iff no negative pivot appears; \bm A\succ0 iff all n pivots are >0.

Recipe. Apply the test to \bm H_R=\bm K^T\nabla^2_{\bm x\bm x}\mathcal L\,\bm K (size r\times r), not to \nabla^2_{\bm x\bm x}\mathcal L.

Watch out.

  • Leading minors \ge0 do not imply \succeq0: \operatorname{diag}(0,-1) has \Delta_1=\Delta_2=0 but is not positive semidefinite (a_{22}=-1<0). Also \begin{bmatrix}1&1&1\\1&1&1\\1&1&0\end{bmatrix} has \Delta_1=1, \Delta_2=\Delta_3=0, yet the principal minor on I=\{1,3\} is -1. For semidefiniteness use all principal minors.
  • \succ0 needs only the leading minors, strictly positive.
  • Positive definiteness on the whole \mathbb R^n is not required: only on \ker\bm J.
  • Leading minors of a non-symmetric matrix prove nothing: \begin{bmatrix}1&3\\-1&1\end{bmatrix} has \Delta_1=1, \Delta_2=4, yet \bm z^T\bm A\bm z=(z_1+z_2)^2 is only semidefinite.

1.3 Inequality Constraints and KKT Conditions

Problem. f,h_i,g_\ell of class C^1 (C^2 for second order). Inequalities are written g_\ell\ge0.

\begin{aligned} \text{minimize:}\quad & {\color{CornflowerBlue}f(\bm x)}\\ \text{subject to:}\quad & {\color{Brown}h_i(\bm x)=0}, && i=1,\ldots,m\\ & {\color{DarkOrchid}g_\ell(\bm x)\ge0}, && \ell=1,\ldots,p \end{aligned}

Lagrangian (sign convention):

\mathcal L(\bm x,\bm\lambda,\bm\mu)={\color{CornflowerBlue}f(\bm x)} -{\color{Brown}\sum_{i=1}^m\lambda_i h_i(\bm x)} -{\color{DarkOrchid}\sum_{\ell=1}^p\mu_\ell g_\ell(\bm x)}

KKT conditions. At a local minimizer where a constraint qualification (LICQ; MFCQ, Mangasarian–Fromovitz constraint qualification; …) holds there are \bm\lambda^\star, \bm\mu^\star with

\left\{\begin{aligned} {\color{CornflowerBlue}\nabla f(\bm x^\star)}-{\color{Brown}\sum_i\lambda_i^\star\nabla h_i(\bm x^\star)}-{\color{DarkOrchid}\sum_\ell\mu_\ell^\star\nabla g_\ell(\bm x^\star)} &=\bm0 \quad && \text{\color{Crimson}stationarity}\\[0.5em] {\color{Brown}h_i(\bm x^\star)} &=0 \quad && \text{\color{Crimson}primal feasibility}\\[0.5em] {\color{DarkOrchid}g_\ell(\bm x^\star)} &\ge0 \quad && \text{\color{Crimson}primal feasibility}\\[0.5em] {\color{DarkOrchid}\mu_\ell^\star} &\ge0 \quad && \text{\color{Crimson}dual feasibility}\\[0.5em] {\color{DarkOrchid}\mu_\ell^\star\,g_\ell(\bm x^\star)} &=0 \quad && \text{\color{Crimson}complementarity} \end{aligned}\right.

Hence g_\ell(\bm x^\star)>0\Rightarrow\mu_\ell^\star=0. The multipliers \lambda_i are unrestricted in sign. Under LICQ the multipliers are unique.

Active set. \mathcal F=\{\bm x:\ \bm h(\bm x)=\bm0,\ \bm g(\bm x)\ge\bm0\} is the feasible set, \mathcal A(\bm x^\star)=\{\ell:\ g_\ell(\bm x^\star)=0\}; inactive constraints do not matter locally.

Recipe (KKT by cases).

  1. Bring the problem to the form above: g\le0 becomes -g\ge0; maximize f becomes minimize -f.
  2. Form \mathcal L with -\mu_\ell g_\ell and \mu_\ell\ge0.
  3. For each guess of the active set: set g_\ell=0 for \ell\in\mathcal A and \mu_\ell=0 for \ell\notin\mathcal A; solve stationarity and \bm h=\bm 0.
  4. Discard solutions with some g_\ell<0 or some \mu_\ell<0.
  5. At each survivor check the CQ (below).
  6. Also find the feasible points where the CQ fails (\bm h=\bm0, g_\ell=0 for \ell\in\mathcal A, dependent gradients): they may be minimizers without multipliers, so examine them directly (feasible curves, bounds).
  7. Second-order test on the critical cone (below).
  8. If the feasible set is compact, compare f at the KKT points and at the CQ-failing points: the global minimum is among them.

Watch out.

  • Sign convention: with g_\ell\ge0 and \mathcal L=f-\sum\lambda_ih_i-\sum\mu_\ell g_\ell the condition is \mu_\ell\ge0. With another sign convention the signs flip consistently.
  • No CQ, no multipliers guaranteed: e.g. two active constraints with \nabla g_1=-\nabla g_2\neq\bm0 (no \bm d with \nabla g_1\bm d>0 and \nabla g_2\bm d>0). Decide by a feasible curve or a bound.
  • Squared slacks g_\ell=\varepsilon_\ell^2 give an equality problem, but first order yields only \mu_\ell\varepsilon_\ell=0: impose \mu_\ell\ge0 separately (it comes from second order in \varepsilon_\ell); at active constraints (\varepsilon_\ell=0) equality regularity may fail.

Constraint qualifications

\bm x^\star feasible.

CQ test
LICQ the gradients \nabla h_i(\bm x^\star) and \nabla g_\ell(\bm x^\star), \ell\in\mathcal A, are linearly independent: the stacked matrix has rank m+\lvert\mathcal A\rvert
MFCQ \nabla h_i(\bm x^\star) linearly independent and \exists\,\bm d: \nabla h_i\bm d=0 for all i, \nabla g_\ell\bm d>0 for \ell\in\mathcal A (the active \nabla g_\ell may be linearly dependent). Equivalently: \sum_{\ell\in\mathcal A}\alpha_\ell\nabla g_\ell+\sum_i\beta_i\nabla h_i=\bm0 with \alpha_\ell\ge0 forces all \alpha_\ell=0, \beta_i=0

LICQ \Rightarrow MFCQ \Rightarrow ACQ \Rightarrow GCQ (defined in the optional table below), no reverse implication; GCQ already gives KKT necessity. Linear constraints satisfy ACQ automatically.

Fritz–John (fallback when no CQ holds). A local minimizer has \mu_0\ge0, \bm\lambda, \bm\mu\ge\bm0, not all zero, with

\left\{\begin{aligned} {\color{CornflowerBlue}\mu_0\nabla f}-{\color{Brown}\sum_i\lambda_i\nabla h_i}-{\color{DarkOrchid}\sum_\ell\mu_\ell\nabla g_\ell} &=\bm0 \quad && \text{\color{Crimson}stationarity}\\[0.5em] {\color{DarkOrchid}\mu_\ell\,g_\ell} &=0 \quad && \text{\color{Crimson}complementarity} \end{aligned}\right.

If \mu_0>0, normalize \mu_0=1 and get KKT; \mu_0=0 is the abnormal case (only constraint gradients appear, no information on f). MFCQ excludes it.

Geometry of the feasible set ^*

Optional. \mathcal K^\circ=\{\bm y:\bm y^T\bm d\le0\ \forall\bm d\in\mathcal K\} is the polar of a cone \mathcal K.

object definition
tangent cone T limits of (\bm x_j-\bm x^\star)/t_j, \bm x_j\in\mathcal F, \bm x_j\to\bm x^\star, t_j\downarrow0; minimizer: \nabla f(\bm x^\star)\bm d\ge0 \forall\bm d\in T
linearized cone \mathcal F_L \{\bm d:\ \nabla h_i\bm d=0,\ \nabla g_\ell\bm d\ge0,\ \ell\in\mathcal A\}; always T\subseteq\mathcal F_L
ACQ / GCQ T=\mathcal F_L / T^\circ=\mathcal F_L^\circ

T\neq\mathcal F_L is possible: g=-x_1^2\ge0 at the origin has \nabla g=\bm0, so \mathcal F_L=\mathbb R^2 while T is the vertical line.

Second-order conditions

Given KKT multipliers, split the active set:

\begin{aligned} \mathcal A^+&=\{\ell\in\mathcal A:\ {\color{DarkOrchid}\mu_\ell^\star>0}\}\ \text{(strongly active)}, \\ \mathcal A^0&=\{\ell\in\mathcal A:\ {\color{DarkOrchid}\mu_\ell^\star=0}\}\ \text{(weakly active)}. \end{aligned}

Critical cone.

\mathcal C(\bm x^\star,\bm\mu^\star)=\left\{\bm d:\ \begin{array}{ll} {\color{Brown}\nabla h_i(\bm x^\star)\bm d=0}, & i=1,\ldots,m,\\[0.5em] {\color{DarkOrchid}\nabla g_\ell(\bm x^\star)\bm d=0}, & \ell\in\mathcal A^+,\\[0.5em] {\color{DarkOrchid}\nabla g_\ell(\bm x^\star)\bm d\ge0}, & \ell\in\mathcal A^0 \end{array} \right\}

Equivalently \mathcal C=\{\bm d\in\mathcal F_L:\ \nabla f(\bm x^\star)\bm d=0\} with \mathcal F_L=\{\bm d:\ \nabla h_i\bm d=0,\ \nabla g_\ell\bm d\ge0,\ \ell\in\mathcal A\}: no choice of multipliers is needed.

Conditions. SONC holds at a local minimizer with LICQ; SOSC at a KKT point gives a strict local minimizer. With \bm H_L=\nabla^2_{\bm x\bm x}\mathcal L(\bm x^\star,\bm\lambda^\star,\bm\mu^\star):

\left\{\begin{aligned} \bm d^T\bm H_L\bm d &\ge0,\quad\forall\,\bm d\in\mathcal C \quad && \text{\color{Crimson}SONC}\\[0.5em] \bm d^T\bm H_L\bm d &>0,\quad\forall\,\bm d\in\mathcal C\setminus\{\bm0\} \quad && \text{\color{Crimson}SOSC} \end{aligned}\right.

Recipe.

  1. Find the KKT point, then \mathcal A, \mathcal A^+, \mathcal A^0.
  2. Strict complementarity (\mathcal A^0=\varnothing): \mathcal C is the kernel of the stacked gradients of equalities and active inequalities (the tangent space of the active constraints).
  3. Take a basis \bm K of that kernel and test \bm K^T\bm H_L\bm K (\succ0 gives SOSC, \succeq0 is SONC); the verdict table of the Lagrange section applies.
  4. Weak activity (\mathcal A^0\neq\varnothing): parametrize the kernel of the equalities and of \mathcal A^+; keep the sign constraints \nabla g_\ell\bm d\ge0, \ell\in\mathcal A^0; test \bm d^T\bm H_L\bm d on that cone only.
  5. If \mathcal C=\{\bm0\} (e.g. a vertex where m+\lvert\mathcal A\rvert=n gradients are independent and all \mu_\ell>0) SOSC holds trivially.
  6. Interior point (no equalities, \mathcal A=\varnothing): \nabla f(\bm x^\star)=\bm0, \mathcal C=\mathbb R^n, \bm H_L=\nabla^2f; \succ0 strict minimum, \prec0 strict maximum, indefinite saddle, semidefinite singular inconclusive.

Watch out.

  • Keep the sign constraints on \mathcal A^0: \min -x^2+y^2 s.t. x\ge0 at (0,0) has \mu^\star=0 and is positive definite on \{d_1=0\}, yet \bm d=(1,0)\in\mathcal C gives \bm d^T\bm H_L\bm d=-2. Conversely, under LICQ, \bm d^T\bm H_L\bm d<0 for some \bm d in the kernel of all active gradients does disprove minimality (that kernel is contained in \mathcal C).
  • Without LICQ the multipliers may be non-unique and SONC is not guaranteed.
  • KKT stationarity is only necessary and SOSC is only sufficient. \bm H_R\succeq0 proves nothing (flat directions, e.g. a whole segment of KKT points). A global statement needs a separate argument (compactness, bounds) or convexity: f convex, \bm h affine, g_\ell concave make every KKT point a global minimizer.

1.4 Summary

  1. Notation \nabla f,\ \nabla h_i,\ \nabla g_\ell\ \text{row vectors},\qquad \bm J=D\bm h\ (\text{rows }\nabla h_i),\qquad \bm H_L=\nabla^2_{\bm x\bm x}\mathcal L

  2. Problem: minimize {\color{CornflowerBlue}f(\bm x)}

  3. Equality constraints: {\color{Brown}h_i(\bm x)=0},\quad i=1,\ldots,m

  4. Inequality constraints: {\color{DarkOrchid}g_\ell(\bm x)\ge0},\quad \ell=1,\ldots,p

  5. Lagrangian: \mathcal L={\color{CornflowerBlue}f}-{\color{Brown}\sum_i\lambda_ih_i}-{\color{DarkOrchid}\sum_\ell\mu_\ell g_\ell}

Master problem

\begin{aligned} \text{minimize:}\quad & {\color{CornflowerBlue}f(\bm x)}\\[0.5em] \text{subject to:}\quad & {\color{Brown}h_i(\bm x)=0}, && i=1,\ldots,m\\[0.5em] & {\color{DarkOrchid}g_\ell(\bm x)\ge0}, && \ell=1,\ldots,p \end{aligned}

KKT system

\left\{\begin{aligned} {\color{CornflowerBlue}\nabla f}-{\color{Brown}\sum_i\lambda_i\nabla h_i}-{\color{DarkOrchid}\sum_\ell\mu_\ell\nabla g_\ell} &=\bm0 \quad && \text{\color{Crimson}stationarity}\\[0.5em] {\color{Brown}h_i} &=0 \quad && \text{\color{Crimson}primal feasibility}\\[0.5em] {\color{DarkOrchid}g_\ell} &\ge0 \quad && \text{\color{Crimson}primal feasibility}\\[0.5em] {\color{DarkOrchid}\mu_\ell} &\ge0 \quad && \text{\color{Crimson}dual feasibility}\\[0.5em] {\color{DarkOrchid}\mu_\ell\,g_\ell} &=0 \quad && \text{\color{Crimson}complementarity} \end{aligned}\right.

Tests

step what to check
cases for each guess of \mathcal A: g_\ell=0 (\ell\in\mathcal A), \mu_\ell=0 (\ell\notin\mathcal A); solve stationarity and \bm h=\bm0; discard any g_\ell<0 or \mu_\ell<0
CQ LICQ: rank of [\nabla h_i;\ \nabla g_\ell,\ \ell\in\mathcal A] is m+\lvert\mathcal A\rvert. MFCQ: \nabla h_i independent and \exists\bm d: \nabla h_i\bm d=0, \nabla g_\ell\bm d>0 on \mathcal A. None: Fritz–John, direct argument
active sets \mathcal A=\{g_\ell=0\}, \mathcal A^+=\{\mu_\ell>0\}, \mathcal A^0=\{\mu_\ell=0\}
critical cone \nabla h_i\bm d=0; \nabla g_\ell\bm d=0 on \mathcal A^+; \nabla g_\ell\bm d\ge0 on \mathcal A^0
reduced Hessian equalities only, or \mathcal A^0=\varnothing: \bm H_R=\bm K^T\bm H_L\bm K, \ \bm J_{\text{act}}\bm K=\bm0, with \bm J_{\text{act}} the stacked \nabla h_i and \nabla g_\ell, \ell\in\mathcal A
interior no equalities, \mathcal A=\varnothing: \nabla f=\bm0, \mathcal C=\mathbb R^n, \bm H_L=\nabla^2f
SONC \bm d^T\bm H_L\bm d\ge0 on \mathcal C (\bm H_R\succeq0 if \mathcal C is the kernel); needs LICQ
SOSC \bm d^T\bm H_L\bm d>0 on \mathcal C\setminus\{\bm0\} (\bm H_R\succ0 if \mathcal C is the kernel); strict local minimizer
definiteness \succ0: leading minors \Delta_k>0; \succeq0: all principal minors \ge0; or eigenvalues