2. Math Toolkit I: Duality, LMIs & the S-Procedure
Lagrangian duality, semidefinite programming, Schur complements, S-lemma, quadratic constraints, dissipativity
This module assumes:
- Positive definiteness, quadratic forms, matrix square roots, and ellipsoids (Primer A)
- Convex sets and functions, affine functions, and optimality conditions (Primer B)
- Infimum, supremum, argmin, and attainment of an optimum (Primer B)
- Constraints, multipliers, projections, and barrier methods (Primer B)
- KKT conditions, constraint qualifications, and approximate KKT points; gradients and the chain rule (Primer B)
- Block matrices, trace identities, and determinants (Primer A)
- Spectral norms, singular values, and bounds on stretching (Primer A)
- Linear-system stability and quadratic Lyapunov functions (Primer D)
- Transfer functions, frequency response, and signal-energy gains (Primer D)
- Neural-network layers, activations, and their slopes (Primer E)
Core reading. Work through one scalar Lagrangian, PSD matrices and the Lyapunov LMI, the definite-corner Schur complement, and one-constraint S-procedure. Then connect the sector inequality to the walkthrough, and read the elementary energy balance in dissipativity.
Practice route. Try the three readiness checks. If a skill is rusty, use its exact review link, then return. Work through Easy P1–P4, Medium P5–P8, and Hard P9–P12; each has a separate hint and a full worked solution. Reattempt a missed problem later without opening the answer.
Optional research reading. The supporting-hyperplane and Fenchel–Moreau detours, interior-point complexity, full KYP equivalence, and dynamic IQC refinements are research extensions. Learn what each certificate proves before returning to how the general theorem is established.
Try these before opening the answer. The review links lead to earlier material.
- What is the derivative of $(x-2)^2$? Review gradients.
- For $P=\operatorname{diag}(2,3)$, what is $x^\top Px$ at $x=(1,-1)^\top$? Review quadratic forms.
- Does $x=0$ satisfy the constraint $x-1\le0$ strictly? Review feasibility.
Show readiness answers
The derivative is $2(x-2)$. The quadratic form is $2(1)^2+3(-1)^2=5$. At $x=0$, $x-1=-1\lt0$, so the constraint is strictly satisfied. These are the operations underneath the first duality and matrix certificates.
Book contents · Apply this chapter to a real decision · Glossary
Almost every guarantee in this section is produced by the same four moves: dualise a constrained problem, write the certificate as a matrix inequality, use a Schur complement to make a quadratic term linear, and use the S-procedure to trade a "for all signals satisfying a constraint" statement for a single semidefinite condition. The Lagrangian methods of Modules 8–9 are the first move applied to a CMDP; LipSDP, the Sandwich layer, LipKernel, the Zames–Falb and Yin–Seiler–Arcak certificates of Modules 12–14 are the other three applied to a neural network. This page builds the tools slowly enough that those derivations can later be read line by line.
1. Lagrangian Duality & KKT
Start with one price. In $\min (x-2)^2$ subject to $x\le1$, the unconstrained best point 2 is excluded, so the answer is $x=1$ with value 1. Write the constraint as $x-1\le0$ and attach a price $\lambda\ge0$: $L=(x-2)^2+\lambda(x-1)$. At a feasible point the added term is nonpositive, which is why minimizing this relaxed expression gives a lower bound. The sign and the order of the minimization/maximization are the main ideas to track; the graded problems compute the entire example.
In plain words. A constrained minimisation can be hard to solve directly. Duality turns it into an easier question. Attach a price $\lambda_i\ge0$ to each constraint, let the optimiser violate constraints if it pays the price, and see how low the cost can then go. Whatever the prices, this relaxed problem can only do better than the original one, so its value is a lower bound on the true optimum (weak duality). The dual problem looks for the prices that give the best lower bound. When that bound is exact (strong duality) and some prices attain it, those best prices, together with a primal optimum, are KKT multipliers in the sense of Primer B (for differentiable problems on an open domain). Exactness alone is not enough: the example $\min x$ s.t. $x^2\le0$ below has zero gap but no finite optimal price.
- $p^\star$: the optimal value of the original (primal) problem; $f_0$, $f_i\le0$, $h_j=0$: objective and constraints, as in Primer B.
- $L(x,\lambda,\nu)$: the Lagrangian, the cost plus price times violation of each constraint; $\lambda_i\ge0$ prices inequalities, $\nu_j$ (any sign) prices equalities.
- $g(\lambda,\nu)=\inf_xL(x,\lambda,\nu)$: the dual function, the lowest cost reachable when constraints may be violated at their price.
- $d^\star=\sup_{\lambda\ge0,\nu}g(\lambda,\nu)$: the best lower bound; $p^\star-d^\star\ge0$ is the duality gap.
- $\inf$ and $\sup$: greatest lower bound and least upper bound, which need not be attained (Primer 0).
Duality is the art of bounding a hard minimisation from below by an easy maximisation. Nothing in this subsection assumes convexity until strong duality; the first two results hold for any problem, which is why they survive the non-convex policy spaces of Module 8.
Here $f_0$ is the objective, $\mathcal D$ is the set on which all $f_i,h_j$ are defined, and a point $x\in\mathcal D$ satisfying every constraint is feasible (see Primer B).
The Lagrangian attaches a price to each constraint, $$L(x,\lambda,\nu)=f_0(x)+\sum_{i=1}^m\lambda_i f_i(x)+\sum_{j=1}^p\nu_j h_j(x),\qquad \lambda\in\mathbb R^m_+,\ \nu\in\mathbb R^p .$$ The dual function is its infimum over the domain without the original constraints, $g(\lambda,\nu)=\inf_{x\in\mathcal D}L(x,\lambda,\nu)$ (possibly $-\infty$; see Primer B), and the dual problem is $d^\star=\sup_{\lambda\ge0,\ \nu}\ g(\lambda,\nu)$.We define $p^\star$ by an infimum and $d^\star$ by a supremum and write min or max only when an optimiser exists: in the example $\min x$ s.t. $x^2\le0$ below, $d^\star=\sup_{\lambda>0}\big(-1/(4\lambda)\big)=0$, but no finite $\lambda$ attains it. An empty feasible set gives $p^\star=+\infty$.
(i) Concavity. For fixed $x$ the map $(\lambda,\nu)\mapsto L(x,\lambda,\nu)$ is affine (it is $f_0(x)$ plus a linear function of $(\lambda,\nu)$). Take $\theta\in[0,1]$ and two multiplier pairs $\mu=(\lambda,\nu)$, $\mu'=(\lambda',\nu')$. Then
because the infimum of a sum is at least the sum of the infima (each term is bounded below by its own infimum). A pointwise infimum of affine functions is concave; no property of $f_i$ was used.
(ii) Weak duality. Let $\tilde x$ be primal feasible. Since $\lambda_i\ge0$ and $f_i(\tilde x)\le0$ we have $\sum_i\lambda_if_i(\tilde x)\le0$, and $h_j(\tilde x)=0$ kills the equality terms, so $L(\tilde x,\lambda,\nu)\le f_0(\tilde x)$. Therefore
Taking the infimum over feasible $\tilde x$ gives $g(\lambda,\nu)\le p^\star$; maximising over $\lambda\ge0,\nu$ gives $d^\star\le p^\star$. The only place the sign $\lambda\ge0$ enters is the step $\lambda_if_i(\tilde x)\le0$, which is why dual variables of inequalities live on the nonnegative orthant while those of equalities are free. $\blacksquare$
Strong duality and Slater's condition
The affine hull of a set is the smallest affine subspace containing it; the relative interior is the interior measured inside that subspace. A line segment in $\mathbb R^2$ has empty ordinary interior, but every point except its endpoints lies in its relative interior. This matters when $\mathcal D$ is lower-dimensional, e.g. the probability simplex $\{x\ge0,\ \sum_ix_i=1\}$; the equality constraints themselves never need to hold strictly.
In words: for convex problems with a strictly feasible point, the best lower bound is exact and is achieved by a finite multiplier. Why each assumption matters: convexity makes the perturbation function $p^\star(u)$ of the collapsible below convex, so its epigraph has a supporting hyperplane at $u=0$ (theorem below); strict feasibility of every inequality keeps $0$ in the interior of the domain of $p^\star$, which rules out a vertical supporting hyperplane, i.e. an infinite multiplier. The support is then the graph of an affine function $p^\star(0)-(\lambda^\star)^{\top}u$ that never exceeds $p^\star(u)$: its slope is minus the optimal multiplier. The refinement that lets affine inequalities hold only non-strictly needs a separate (polyhedral) argument: the constraints $x\le0$, $-x\le0$ satisfy it at $\bar x=0$, yet the domain of their $p^\star$ is $\{u:u_1+u_2\ge0\}$, with $0$ on its boundary. Slater is sufficient, not necessary: linear programs have zero gap whenever they are feasible and bounded.
A hyperplane is $\{x:a^Tx=c\}$ with $a\ne0$. If nonempty convex sets $C,D\subset\mathbb R^n$ are disjoint and $D$ is open, there are $a\ne0,c\in\mathbb R$ such that $a^Tx\ge c\ge a^Ty$ for every $x\in C,y\in D$. Closedness of $C$ is not required.
For a convex function $f:\mathbb R^m\to\mathbb R\cup\{+\infty\}$, finite somewhere and never $-\infty$, every $u_0$ in the interior of $\{u:f(u)\lt+\infty\}$ admits $b\in\mathbb R^m$ with $f(u)\ge f(u_0)+b^T(u-u_0)$ for all $u$. The relative-interior version measures directions inside the affine hull of that domain.
Intuition. An affine lower bound touches the graph at the point in question. Convexity keeps the graph above it; an interior point prevents a vertical support. Separation is the corresponding statement for two sets, and will be used again in the S-lemma proof.
Drop the equality constraints for readability and define the perturbation function $p^\star(u)=\inf\{f_0(x):f_i(x)\le u_i,\ i=1..m\}$, so $p^\star(0)=p^\star$. It is nonincreasing in $u$ (looser constraints, smaller minimum). The dual function is a Legendre-type transform (see Primer B) of it:
Proof. ($\ge$) For any $x\in\mathcal D$ put $u=f(x)$; then $x$ is feasible for the $u$-perturbed problem, so $f_0(x)\ge p^\star(f(x))$ and $L(x,\lambda)\ge p^\star(u)+\lambda^{\top}u\ge\inf_u[\cdot]$. Take the infimum over $x$. ($\le$) Fix $u$ and any $x$ with $f(x)\le u$; because $\lambda\ge0$, $L(x,\lambda)\le f_0(x)+\lambda^{\top}u$; take the infimum over such $x$ to get $g(\lambda)\le p^\star(u)+\lambda^{\top}u$, then over $u$. $\blacksquare$
So $g(\lambda)$ is the largest intercept $c$ such that the affine function $u\mapsto c-\lambda^{\top}u$ lies below the graph of $p^\star$ everywhere; $d^\star$ is the best such intercept over all slopes $-\lambda\le0$. Because $p^\star$ is nonincreasing (and the primal is feasible), affine minorants with other slopes add nothing, so $d^\star$ is the value at $u=0$ of the closed convex envelope of $p^\star$, the supremum of all its affine minorants. Zero duality gap means the graph of $p^\star$ meets this envelope at $u=0$. A finite optimal multiplier is a further requirement: given zero gap, it exists iff a non-vertical supporting line touches the graph at $u=0$; its slope is then $-\lambda^\star$, which gives the sensitivity interpretation $\lambda^\star_i=-\partial p^\star(0)/\partial u_i$ when $p^\star$ is differentiable. The two can come apart: for $\min x$ s.t. $x^2\le0$ we have $p^\star(u)=-\sqrt u$ for $u\ge0$ and $p^\star=d^\star=0$, but $g(\lambda)=-1/(4\lambda)$ only tends to $0$ as $\lambda\to\infty$, because the tangent at $u=0$ is vertical (exactly what Slater's condition rules out). For a non-convex primal the graph can have a dent at $u=0$; the envelope then passes strictly below and the gap $p^\star-d^\star$ is the depth of the dent. A finite dual optimum can still exist there, but its line supports the envelope at $(0,d^\star)$, below the graph, which is why the touching-line test above presumes zero gap: for $\min x$ over $x\in\{-1,1\}$ s.t. $-x\le0$ we have $p^\star=1$ and $g(\lambda)=-|1-\lambda|$, so $d^\star=0$ is attained at $\lambda^\star=1$ despite a gap of $1$. Dual ascent maximises $g$, which only sees the envelope, so it targets the multiplier of the convexified problem (and converges to it under the step-size conditions above, when it exists); but the primal minimisers $x(\lambda_k)$ need not converge and can oscillate between minimisers on either side of the dent (for one constraint, typically the two points whose mixture the envelope represents), none of which is both feasible and optimal. This "primal recovery" failure motivates the state-augmentation construction discussed in Module 8.
The $x^2\le0$ example in detail. For $\lambda\gt0$ complete the square: $x+\lambda x^2=\lambda\big(x+\tfrac{1}{2\lambda}\big)^2-\tfrac{1}{4\lambda}$, so $g(\lambda)=-1/(4\lambda)$; at $\lambda=0$, $g(0)=\inf_x x=-\infty$. The feasible set is $\{0\}$, so $p^\star=0=\sup_{\lambda\ge0}g(\lambda)=d^\star$, but no finite $\lambda$ attains the supremum.
Let $f:\mathbb R^m\to\mathbb R\cup\{+\infty\}$ be proper (finite somewhere), convex and lower semicontinuous, i.e. its epigraph $\{(u,t):t\ge f(u)\}$ is closed. Define the conjugate $f^*(b)=\sup_u(b^{\top}u-f(u))$ and the biconjugate $f^{**}(u)=\sup_b(b^{\top}u-f^*(b))$, the supremum of all affine lower bounds of $f$. Then $f=f^{**}$. For a proper $f$ that has at least one affine lower bound, $f^{**}$ is its closed convex envelope, the greatest lower-semicontinuous convex function below $f$. For a concave, upper-semicontinuous $P$ apply this to $-P$: affine upper bounds recover $P$.
Intuition. Each slope gives the best affine lower bound with that slope; their supremum fills non-convex dents from below, and convexity plus closedness mean there is no dent to fill. Here $g(\lambda)=\inf_u[p^\star(u)+\lambda^{\top}u]=-(p^\star)^*(-\lambda)$, so $d^\star$ is the closed convex envelope of $p^\star$ evaluated at $u=0$ (Boyd & Vandenberghe 2004, Sec. 3.3.2 and Ch. 5).
For the primal problem of this section, suppose $x^\star$ is feasible, $\lambda^\star\ge0$, $x^\star$ globally minimises $L(\cdot,\lambda^\star,\nu^\star)$ over $\mathcal D$, and $\lambda_i^\star f_i(x^\star)=0$ for every $i$. Then $x^\star$ is primal optimal, $(\lambda^\star,\nu^\star)$ is dual optimal, and the gap is zero. No convexity is needed: $g(\lambda^\star,\nu^\star)=L(x^\star,\lambda^\star,\nu^\star)=f_0(x^\star)$ because the constraint terms vanish, and weak duality $g(\lambda^\star,\nu^\star)\le d^\star\le p^\star\le f_0(x^\star)$ forces equality throughout (Boyd & Vandenberghe 2004, Sec. 5.4–5.5).
Intuition. A multiplier alone is not a solution: a Lagrangian minimiser counts as a recovered primal solution only after feasibility and complementary slackness are checked. In the $\{-1,1\}$ example both minimisers at $\lambda^\star=1$ fail ($x=-1$ is infeasible, $x=1$ violates $\lambda^\star f_1(x)=0$), as they must when there is a gap. Letting a policy depend on extra state, such as the current multiplier, is a different construction with its own assumptions and guarantees; Module 8 develops it.
The one non-convex problem that matters most here has no dent: Paternain et al., NeurIPS 2019 prove that a CMDP with bounded rewards and a Slater point has zero duality gap, because its perturbation function $P(\xi)=\max_\pi V_0(\pi)$ s.t. $V_i(\pi)\ge c_i+\xi_i$ is concave: the set of occupancy measures is convex (see Primer E), so any two feasible policies can be mixed at the level of occupancy measures, and the value is linear in the occupancy measure. Fenchel–Moreau then gives $P^\star=D^\star$ (their Theorem 1). This holds over the class of all policies; for an $\epsilon$-universal parameterised policy class their Theorem 2 only bounds how far the parameterised dual value $D^\star_\theta$ falls below the unrestricted optimum, $0\le P^\star-D^\star_\theta\le(B_{r_0}+\|\lambda^\star_\epsilon\|_1B_r)\,\Delta_\epsilon$, a term linear in $\epsilon$. Here $B_{r_i}$ bound the rewards, $B_r=\max_{i\ge1}B_{r_i}$, $\lambda^\star_\epsilon$ is the optimal multiplier of the unrestricted problem with every constraint tightened by $B_r\Delta_\epsilon$, and $\Delta_\epsilon=\epsilon/(1-\gamma)^2$ for the paper's unnormalised values (the paper prints $\epsilon/(1-\gamma)$, the right scale for returns normalised by $1-\gamma$). The parameterised problem's own duality gap $D^\star_\theta-P^\star_\theta$ is not bounded directly. This is the regime of Module 8, which derives the corrected constant.
Why occupancy measures form a convex set. For a finite discounted MDP with initial distribution $\mu$ and transition probabilities $P(s\mid s',a')$, let $d(s,a)=(1-\gamma)\sum_{t\ge0}\gamma^t\Pr(s_t=s,a_t=a)$. These nonnegative numbers satisfy the linear flow equations $\sum_a d(s,a)=(1-\gamma)\mu(s)+\gamma\sum_{s',a'}P(s\mid s',a')\,d(s',a')$, so a convex combination of two occupancy measures satisfies them too; conversely, every nonnegative solution is the occupancy measure of the stationary policy $\pi(a\mid s)=d(s,a)/\sum_bd(s,b)$ (any action where $\sum_bd(s,b)=0$). Values are linear in $d$: $V(\pi)=(1-\gamma)^{-1}\sum_{s,a}d(s,a)r(s,a)$. Mixing two policies at the level of $d$ therefore mixes their values linearly.
Take finitely many states and actions, a fixed transition law and initial distribution, $0\le\gamma\lt1$, rewards $|r_i|\le B_{r_i}$ and unnormalised values $V_i(\pi)=\mathbb E_\pi\sum_{t\ge0}\gamma^tr_i(s_t,a_t)$, over all stationary randomised policies. (i) If some policy has $V_i(\pi)\gt c_i$ for every constraint $i=1,\dots,m$, then $P^\star=\max\{V_0(\pi):V_i(\pi)\ge c_i\ \forall i\}$ equals $D^\star=\min_{\lambda\ge0}\max_\pi\big[V_0(\pi)+\sum_i\lambda_i(V_i(\pi)-c_i)\big]$, with both optima attained. (ii) Suppose moreover that the class $\{\pi_\theta\}$ is $\epsilon$-universal: for every stationary $\pi$ some $\pi_\theta$ has $\sup_s\sum_a|\pi(a\mid s)-\pi_\theta(a\mid s)|\le\epsilon$. Put $\Delta_\epsilon=\epsilon/(1-\gamma)^2$ and $B_r=\max_{i\ge1}B_{r_i}$, and assume the problem with tightened thresholds $c_i+B_r\Delta_\epsilon$ is feasible with optimal multiplier $\lambda^\star_\epsilon$. Then $D^\star_\theta=\inf_{\lambda\ge0}\sup_\theta\big[V_0(\pi_\theta)+\sum_i\lambda_i(V_i(\pi_\theta)-c_i)\big]$ satisfies
In words: occupancy measures turn the unrestricted problem into a linear program, so there is no dent; restricting to the parameterised class costs at most a term linear in $\epsilon$. Part (ii) does not bound the parameterised problem's own gap $D^\star_\theta-P^\star_\theta$, and the approximation must hold uniformly over all states (Paternain et al. 2019, Theorems 1–2, specialised to finite MDPs with the unnormalised constant).
Proof of (ii). Write $\delta=B_r\Delta_\epsilon$, $D(\lambda)=\max_\pi\big[V_0(\pi)+\lambda^{\top}(V(\pi)-c)\big]$ and $P_\delta$ for the tightened optimum. The tightened problem has dual function $D(\lambda)-\delta\sum_i\lambda_i$, and it is again a linear program in $d$, so its gap is zero: $P_\delta=D(\lambda^\star_\epsilon)-\delta\|\lambda^\star_\epsilon\|_1\ge P^\star-\delta\|\lambda^\star_\epsilon\|_1$, using weak duality $D(\lambda)\ge P^\star$. Now approximate a tightened optimal policy by some $\pi_\theta$. By the return-error bound below, each value moves by at most $B_{r_i}\Delta_\epsilon$, so $\pi_\theta$ still satisfies $V_i\ge c_i$ and has $V_0(\pi_\theta)\ge P_\delta-B_{r_0}\Delta_\epsilon$. Because this $\pi_\theta$ is feasible, every $\lambda\ge0$ gives $\sup_\theta[\cdots]\ge V_0(\pi_\theta)$, hence $D^\star_\theta\ge P_\delta-B_{r_0}\Delta_\epsilon$; restricting the inner supremum to the class gives $D^\star_\theta\le D^\star=P^\star$. Combining the three inequalities gives the display. $\blacksquare$
Where $\epsilon/(1-\gamma)^2$ comes from. Run $\pi$ and $\pi_\theta$ from the same initial distribution and let $e_t$ be the $\ell_1$ distance between their state distributions at time $t$, so $e_0=0$. Adding and subtracting the joint law that pairs the first state distribution with the second policy shows that the state-action distributions differ by at most $e_t+\epsilon$. A transition kernel cannot increase $\ell_1$ distance: if $P_{ji}$ is the probability of moving to state $j$ from state-action pair $i$, then $\sum_j|\sum_iP_{ji}a_i|\le\sum_i|a_i|\sum_jP_{ji}=\sum_i|a_i|$. Hence $e_{t+1}\le e_t+\epsilon$, and by induction the time-$t$ state-action error is at most $(t+1)\epsilon$. With $|r|\le B_r$ the value error is at most $B_r\epsilon\sum_{t\ge0}(t+1)\gamma^t=B_r\epsilon/(1-\gamma)^2$, because $\big(\sum_{k\ge0}\gamma^k\big)^2$ contains each power $\gamma^t$ exactly $t+1$ times. For instance, $\gamma=0.9$, $B_r=1$, $\epsilon=0.01$ already allow a value error of $0.01/0.1^2=1$.
KKT conditions
First time? Primer B builds these conditions up from a picture, with worked examples, constraint qualifications and approximate KKT points.
For differentiable $f_i,h_j$ (see Primer B) on an open domain $\mathcal D$ (e.g. $\mathcal D=\mathbb R^n$; Boyd & Vandenberghe Sec. 5.5.3 assume open domains), a triple $(x^\star,\lambda^\star,\nu^\star)$ is a KKT point if $$\begin{aligned} &\text{primal feasibility:}\quad x^\star\in\mathcal D,\ \ f_i(x^\star)\le0,\ \ h_j(x^\star)=0;\qquad \text{dual feasibility:}\quad \lambda^\star\ge0;\\ &\text{complementary slackness:}\quad \lambda_i^\star f_i(x^\star)=0\ \ \forall i;\\ &\text{stationarity:}\quad \nabla f_0(x^\star)+\sum_i\lambda_i^\star\nabla f_i(x^\star)+\sum_j\nu_j^\star\nabla h_j(x^\star)=0 . \end{aligned}$$ Theorem. (a) If strong duality holds and $x^\star$, $(\lambda^\star,\nu^\star)$ are primal and dual optimal, they form a KKT point. (b) For a convex problem, every KKT point is primal-dual optimal with zero gap. In words: at a primal-dual optimal pair with zero gap, nonnegative prices on the active constraints balance the gradient of the objective; zero gap together with an attained dual optimum (both supplied by Slater's condition when $p^\star$ is finite) is what makes such prices exist (necessity), and convexity is what makes a local balance a global certificate (sufficiency). Zero gap alone is not enough: for $\min x$ s.t. $x^2\le0$ (the vertical-tangent example above) the gap is zero, yet stationarity $1+2\lambda x^\star=1\ne0$ fails for every $\lambda$. If $\mathcal D$ is instead a closed convex set (say $x\ge0$), stationarity must include the boundary of $\mathcal D$: $0\in\nabla_xL(x^\star,\lambda^\star,\nu^\star)+N_{\mathcal D}(x^\star)$ with $N_{\mathcal D}$ the normal cone (see Primer B). Example: $\min x$ over $\mathcal D=[0,\infty)$ has zero gap and $x^\star=0$, yet $f_0'(0)=1\ne0$.Here $N_{\mathcal D}(x)=\{v:v^{\top}(y-x)\le0\ \text{for every}\ y\in\mathcal D\}$ is the set of outward normal vectors of $\mathcal D$ at $x$ (only $v=0$ at interior points, which recovers ordinary stationarity), and $0\in a+N$ means $a+v=0$ for some $v\in N$. In the example $N_{[0,\infty)}(0)=(-\infty,0]$, so the gradient $1$ is balanced by the normal $v=-1$.
(a) Strong duality gives the chain
where the last step uses $\lambda^\star_i\ge0$, $f_i(x^\star)\le0$, $h_j(x^\star)=0$. The two ends are equal, so every inequality is an equality: $x^\star$ minimises $L(\cdot,\lambda^\star,\nu^\star)$ over the open set $\mathcal D$ (hence its gradient vanishes there: stationarity), and $\sum_i\lambda^\star_if_i(x^\star)=0$ with every term $\le0$ (hence each term is zero: complementary slackness).
(b) If the problem is convex, $L(\cdot,\lambda^\star,\nu^\star)$ is convex in $x$ and stationarity says $x^\star$ is its global minimiser, so $g(\lambda^\star,\nu^\star)=L(x^\star,\lambda^\star,\nu^\star)=f_0(x^\star)$ by complementary slackness. Weak duality closes the sandwich: $p^\star\ge d^\star\ge g(\lambda^\star,\nu^\star)=f_0(x^\star)\ge p^\star$. $\blacksquare$
Complementary slackness is the statement students most often misread: a multiplier can only be positive on an active constraint, and an inactive constraint has zero price. In the dual-ascent dynamics below this is exactly the "multiplier decays to zero while the constraint is slack" behaviour.
Dual ascent: what Lagrangian safe RL actually does
For a vector $v$, $[v]_+$ means $([v]_+)_i=\max\{v_i,0\}$, the Euclidean projection onto the nonnegative orthant. The supergradient formula assumes an attained, exact inner minimum. In reward-maximising RL, take gradient ascent steps on $J_r-\lambda J_c$, while keeping the update $\lambda\leftarrow[\lambda+\eta(J_c-d)]_+$. Approximate policy updates do not automatically inherit the exact dual-ascent convergence theorem.
Here $O(\eta)$ means an error bounded by $C\eta$ for sufficiently small $\eta$, with $C$ independent of $\eta$. Later, $O(n^3)$ describes work bounded by a constant times $n^3$ as the matrix size grows. These statements suppress constants; they do not specify an exact error or runtime.
- Initialise $\lambda_0\ge0$, step size $\eta\gt0$.
- for $k=0,1,2,\dots$:
- primal step: $x_k\leftarrow\arg\min_xL(x,\lambda_k)$ // in RL: a few policy-gradient steps (see Primer E) on $J_r-\lambda_kJ_c$ (RCPO, PPO-Lagrangian)
- dual step: $\lambda_{k+1}\leftarrow[\lambda_k+\eta\,f(x_k)]_+$ // in RL: $f(x_k)=J_c(\pi_k)-d$, projection keeps $\lambda\ge0$
- return $(x_k,\lambda_k)$.
Read the dual step as a controller: the multiplier integrates the constraint violation (see Primer D), growing while $J_c\gt d$ and shrinking (until it hits zero) while the constraint is slack. This is precisely the update of Tessler et al., ICLR 2019 (RCPO, with $\lambda$ on the slowest timescale) and the reason Stooke et al., ICML 2020 could add proportional and derivative terms to it. Replacing the exact inner minimisation by one or two gradient steps turns dual ascent into gradient descent–ascent, whose oscillations and overshoot are the subject of Module 8. The same dualisation solves the trust-region subproblem of CPO through its low-dimensional dual (Module 9) and the CBF-QP safety filter in closed form via KKT (Module 10).
Problem (a quadratic program, see Primer B). $\min_{x\in\mathbb R^2}(x_1-2)^2+(x_2-1)^2$ subject to $x_1+x_2\le1$. Convex, and $x=0$ is strictly feasible, so strong duality holds.
KKT. With $f_1(x)=x_1+x_2-1$, stationarity reads $2(x_1-2)+\lambda=0$, $2(x_2-1)+\lambda=0$, i.e. $x_1=2-\lambda/2$, $x_2=1-\lambda/2$. Case $\lambda=0$: $x=(2,1)$, but $f_1=2\gt0$, infeasible. Case $\lambda\gt0$: complementary slackness forces $x_1+x_2=1$, i.e. $3-\lambda=1$, so $\lambda^\star=2$ and $x^\star=(1,0)$ with $p^\star=1+1=2$.
Dual function. Minimising the Lagrangian in closed form (same stationarity equations) gives
a concave parabola maximised at $\lambda=2$ with $d^\star=4-2=2=p^\star$: zero gap, as promised.
Shadow price. Perturb the constraint to $x_1+x_2\le1+u$. The optimum is the squared distance from $(2,1)$ to the line $x_1+x_2=1+u$, $p^\star(u)=(2-u)^2/2$ for $u\le2$, so $-\mathrm dp^\star/\mathrm du\,|_{u=0}=2=\lambda^\star$. Relaxing the constraint by one unit is worth two units of objective, at the margin.
Take the problem from Primer B's KKT examples: minimise $f_0(x)=(x_1-2)^2+(x_2-1)^2$ subject to $f_1(x)=x_1+x_2-1\le0$. Its optimum is $x^\star=(1,0)$ with $p^\star=2$.
Step 1: the Lagrangian. $L(x,\lambda)=(x_1-2)^2+(x_2-1)^2+\lambda(x_1+x_2-1)$.
Step 2: minimise over $x$, ignoring the constraint. Setting the gradient to zero, $2(x_1-2)+\lambda=0$ and $2(x_2-1)+\lambda=0$, gives $x_1=2-\lambda/2$ and $x_2=1-\lambda/2$.
Step 3: substitute back.
Step 4: read off the bounds. Every price gives a lower bound on $p^\star=2$: $g(0)=0$, $g(1)=1.5$, $g(3)=1.5$. The best price maximises $g$: $g'(\lambda)=2-\lambda=0$ gives $\lambda^\star=2$ and $d^\star=g(2)=2=p^\star$. The gap is zero, as the strong duality theorem promises for this convex problem with a strictly feasible point (for example $x=(0,0)$). The best price $\lambda^\star=2$ is exactly the KKT multiplier found in Primer B.
Duality gaps appear when the problem is not convex. Let the decision be yes or no, $x\in\mathcal D=\{0,1\}$, and minimise $f_0(x)=x$ subject to $f_1(x)=0.5-x\le0$. Only $x=1$ is feasible, so $p^\star=1$.
The dual function minimises $L(x,\lambda)=x+\lambda(0.5-x)$ over the two points of $\mathcal D$:
The first term rises with $\lambda$ and the second falls, so the best price is where they cross, $\lambda=1$, with $d^\star=0.5$. The gap is $p^\star-d^\star=0.5$. The dual answers the question as if $x=0.5$ were allowed: it only sees the convex relaxation $x\in[0,1]$ of the yes/no choice. The same mechanism gives a gap when constrained RL optimises over a restricted, non-convex policy class (Module 8).
2. LMIs & Semidefinite Programs
In plain words. A symmetric matrix $M$ is positive semidefinite, $M\succeq0$, if the quadratic form $x^{\top}Mx$ is never negative: picture a bowl that does not dip below zero in any direction. A linear matrix inequality (LMI) asks for unknown numbers that make a matrix, built linearly from those numbers, positive semidefinite. That sounds exotic, but stability, gain and Lipschitz certificates all take this form. And the set of solutions is always convex, so computers can search it reliably.
- $\mathbb S^n$: symmetric $n\times n$ matrices. $M\succeq0$: positive semidefinite (all eigenvalues $\ge0$); $M\succ0$: positive definite (all $\gt0$); $M\preceq0$ means $-M\succeq0$.
- $F(x)=F_0+x_1F_1+\dots+x_mF_m$: a symmetric matrix that depends affinely on the unknowns $x\in\mathbb R^m$; the constraint $F(x)\succeq0$ is an LMI.
- SDP (semidefinite program): minimise a linear function of $x$ subject to LMIs.
- $P$: a matrix unknown, as in a Lyapunov certificate $V(x)=x^{\top}Px$; $\rho(A)$: the spectral radius, the largest absolute value of an eigenvalue of $A$.
A linear matrix inequality is a constraint on a vector of unknowns that says "this symmetric matrix, which depends affinely on the unknowns, is positive semidefinite". Its power comes from a coincidence: the PSD cone is convex, yet it can express Lyapunov, gain, robustness and Lipschitz conditions that look hopelessly nonlinear when written out entrywise.
- Cone. $\mathbb S^n_+$ is a closed convex cone: $\theta A+\mu B\succeq0$ for $A,B\succeq0$ and $\theta,\mu\ge0$, since $x^{\top}(\theta A+\mu B)x=\theta x^{\top}Ax+\mu x^{\top}Bx\ge0$.
- Congruence. For any matrix $R$ of compatible size, $M\succeq0\Rightarrow R^{\top}MR\succeq0$, because $x^{\top}R^{\top}MRx=(Rx)^{\top}M(Rx)$. If $R$ is square and invertible the implication is an equivalence ($Rx$ ranges over all vectors).
For example, a symmetric $2\times2$ unknown $P=\begin{bmatrix}p_1&p_2\\p_2&p_3\end{bmatrix}=p_1E_1+p_2E_2+p_3E_3$ with $E_1=\begin{bmatrix}1&0\\0&0\end{bmatrix}$, $E_2=\begin{bmatrix}0&1\\1&0\end{bmatrix}$, $E_3=\begin{bmatrix}0&0\\0&1\end{bmatrix}$ has three scalar unknowns, and for fixed $A$, $P-A^{\top}PA=\sum_kp_k(E_k-A^{\top}E_kA)$. So $A^{\top}PA-P\prec0$ is the strict LMI $F(p)\succ0$ with $F_0=0$ and $F_k=E_k-A^{\top}E_kA$. In size $n$ there are $n$ diagonal and $n(n-1)/2$ off-diagonal unknowns, $n(n+1)/2$ in total.
Dualise $\min_x c^{\top}x$ s.t. $F(x)\succeq0$ exactly as in Section 1, but with a matrix multiplier $Z\in\mathbb S^n$ and the pairing $\operatorname{tr}(ZF)$: $L(x,Z)=c^{\top}x-\operatorname{tr}\big(ZF(x)\big)=\sum_ix_i\big(c_i-\operatorname{tr}(F_iZ)\big)-\operatorname{tr}(F_0Z)$. This is affine in $x$, so its infimum is $-\infty$ unless every coefficient vanishes, and the dual problem is
Weak duality in one line. For primal-feasible $x$ and dual-feasible $Z$: $c^{\top}x+\operatorname{tr}(F_0Z)=\sum_ix_i\operatorname{tr}(F_iZ)+\operatorname{tr}(F_0Z)=\operatorname{tr}\big(F(x)Z\big)=\operatorname{tr}\big(Z^{1/2}F(x)Z^{1/2}\big)\ge0$. The condition $Z\succeq0$ plays the role of $\lambda\ge0$: the PSD cone is self-dual ($\operatorname{tr}(FZ)\ge0$ for every $F\succeq0$ iff $Z\succeq0$). If the primal is strictly feasible and $p^\star$ is finite, then $p^\star=d^\star$ and the dual optimum is attained (Slater for generalized inequalities, Boyd & Vandenberghe Sec. 5.9, Example 5.11), and an optimal pair satisfies $\operatorname{tr}\big(F(x^\star)Z^\star\big)=0$, i.e. $F(x^\star)Z^\star=0$: complementary slackness as a matrix product.
The two missing steps. Self-duality, converse direction: if $\operatorname{tr}(FZ)\ge0$ for every $F\succeq0$, test with $F=vv^{\top}$ to get $\operatorname{tr}(Zvv^{\top})=v^{\top}Zv\ge0$ for every $v$, i.e. $Z\succeq0$. Complementary slackness: for $F,Z\succeq0$, cyclicity of the trace gives $\operatorname{tr}(FZ)=\operatorname{tr}\big((F^{1/2}Z^{1/2})(F^{1/2}Z^{1/2})^{\top}\big)=\|F^{1/2}Z^{1/2}\|_F^2$, the sum of squared entries (Frobenius norm). If this trace is zero then $F^{1/2}Z^{1/2}=0$, hence $FZ=F^{1/2}(F^{1/2}Z^{1/2})Z^{1/2}=0$.
Why it matters for certificates. Any dual-feasible $Z$ proves the lower bound $c^{\top}x\ge-\operatorname{tr}(F_0Z)$ without trusting the solver, and infeasibility has a certificate too: the strict LMI $F(x)\succ0$ is infeasible iff there is $Z\succeq0$, $Z\ne0$, with $\operatorname{tr}(F_iZ)=0$ for all $i$ and $\operatorname{tr}(F_0Z)\le0$ (Boyd & Vandenberghe, Example 5.14). The easy direction is the same trace argument: $F(x)\succ0$ and $Z\ne0$ would give $0\lt\operatorname{tr}(F(x)Z)=\operatorname{tr}(F_0Z)\le0$.
Feasibility versus optimisation, and the first LMI that matters
Half of the certificates in this section are pure feasibility questions ("does a Lyapunov matrix exist?", see Primer D), the other half are optimisation problems ("what is the smallest Lipschitz bound this method can certify?"). Solvers do not distinguish them: to test strict feasibility of $F(x)\succ0$ one solves $\min t$ s.t. $F(x)+tI\succeq0$ and checks whether $t^\star\lt0$. The objectives we will meet are $\min\rho$ (LipSDP), $\min\gamma^2$ ($\ell_2$ gain) and, for a certified ellipsoid (see Primer A) $\mathcal E(P)=\{x:x^{\top}Px\le1\}$, $\min\operatorname{tr}P$, the linear proxy for "large $\mathcal E(P)$" that Yin, Seiler & Arcak and Pauli et al. use for regions of attraction. The volume of $\mathcal E(P)$ is proportional to $(\det P)^{-1/2}$, so $\max\log\det P$ would find the smallest ellipsoid; the largest one needs $\min\log\det P$, which is not convex in $P$. When the constraints permit it, a remedy is the variable $S=P^{-1}$ (constraints rewritten as LMIs in $S$, usually by a congruence) and $\max\log\det S$ (see Primer B): a concave objective over LMIs, i.e. a determinant-maximisation problem rather than an SDP with a linear objective, still solved efficiently by interior-point methods (Boyd et al. 1994, Sec. 2.2.4).
Two details. First, a negative feasible margin is all that is needed: any feasible pair $(x,t)$ with $t\lt0$ gives $F(x)\succeq-tI\succ0$, and conversely if $F(x)\succ0$ then any $t\lt0$ with $|t|\le\lambda_{\min}(F(x))$ is feasible; the auxiliary problem may be unbounded below, so no finite attained $t^\star$ is required. Second, the substitution $S=P^{-1}$ helps only if every constraint becomes an LMI in $S$: congruence of $A^{\top}P+PA\prec0$ with $S$ gives $SA^{\top}+AS\prec0$, but other constraints on $P$ may become nonlinear in $S$.
(ii) $\Rightarrow$ (i). Since $A^{\top}PA-P\prec0$ there is $\epsilon\gt0$ with $A^{\top}PA-P\preceq-\epsilon I$ (take $\epsilon$ the smallest eigenvalue of $P-A^{\top}PA$). Along a trajectory, $V(x_{t+1})-V(x_t)=x_t^{\top}(A^{\top}PA-P)x_t\le-\epsilon\|x_t\|^2\le-\tfrac{\epsilon}{\lambda_{\max}(P)}V(x_t)$, so $V(x_t)\le(1-\epsilon/\lambda_{\max}(P))^tV(x_0)\to0$ geometrically; because $V(x)\ge\lambda_{\min}(P)\|x\|^2$ with $\lambda_{\min}(P)\gt0$, every trajectory converges to $0$, which for a linear map means $\rho(A)\lt1$ (an eigenvector of an eigenvalue with $|\lambda|\ge1$ would not decay).
(i) $\Rightarrow$ (iii). If $\rho(A)\lt1$ the series $P=\sum_{k\ge0}(A^{\top})^kQA^k$ converges, is $\succeq Q\succ0$, and satisfies $A^{\top}PA-P=\sum_{k\ge1}(A^{\top})^kQA^k-\sum_{k\ge0}(A^{\top})^kQA^k=-Q$. Uniqueness: the linear map $P\mapsto A^{\top}PA-P$ has eigenvalues $\lambda_i\lambda_j-1$ ($\lambda_i$ eigenvalues of $A$), all nonzero when $\rho(A)\lt1$. Finally (iii) $\Rightarrow$ (ii) is immediate with $Q=I$. $\blacksquare$ The second interactive explorer solves exactly this Stein equation for a $2\times2$ system and draws the certificate.
Convergence and uniqueness without operator eigenvalues. For Schur-stable $A$ and any $q$ with $\rho(A)\lt q\lt1$ there is $c\ge1$ with $\|A^k\|_2\le c\,q^k$ (Primer D). Each summand therefore has norm $\|(A^{\top})^kQA^k\|_2\le c^2\|Q\|_2\,q^{2k}$, and the series converges by comparison with a geometric series. If $P_1,P_2$ both solve the Stein equation, $H=P_1-P_2$ satisfies $H=A^{\top}HA$; iterating gives $H=(A^{\top})^kHA^k\to0$, so $H=0$.
Why SDP solvers work, what they cost, and the tooling
The interior of the LMI set has a natural barrier (see Primer B), $\phi(x)=-\log\det F(x)$: it is smooth and convex on $\{F(x)\succ0\}$ (strictly convex when $F_1,\dots,F_m$ are linearly independent, which holds whenever the feasible set is nonempty and bounded) and blows up at the boundary. Nesterov and Nemirovski showed that it is self-concordant (made precise in the theorem below), which is what makes damped Newton steps on $t\,c^{\top}x+\phi(x)$ predictable. Following the central path while increasing $t$ needs $O(\sqrt{n}\log(1/\varepsilon))$ Newton iterations for an $n\times n$ LMI and accuracy $\varepsilon$; in practice the iteration count is a few tens and nearly size independent (Boyd, El Ghaoui, Feron & Balakrishnan 1994, Ch. 2). The cost is in each Newton step: forming the $m\times m$ Newton system costs on the order of $m\,n^3+m^2n^2$ and solving it $m^3$. With a handful of variables and a large matrix this is $O(n^3)$ per step; with a full matrix variable, $m\sim n^2$, it becomes $O(n^6)$. LipSDP-Neuron on a network with $n$ hidden neurons sits in between: about $n$ diagonal multipliers and a matrix of size about $n$ (plus the input dimension), so a dense Newton step costs roughly $O(n^4)$. That is why the dense SDP becomes impractical for large networks and Module 12 turns to sparse and layer-wise variants.
Let $F(x)=F_0+\sum_i x_iF_i\in\mathbb S^n$, let $\{x:F(x)\succ0\}$ be nonempty, and remove redundant variable directions so that $\nabla^2\phi$ is positive definite, where $\phi=-\log\det F$. For a direction $h$, set $\psi(s)=\phi(x+sh)$. Then $|\psi'''(0)|\le2\,\psi''(0)^{3/2}$ and $|\psi'(0)|\le\sqrt{n\,\psi''(0)}$: $\phi$ is a self-concordant barrier with parameter $n$. Suppose the linear-objective SDP has finite optimum, a central path exists, and a starting point in a fixed Newton neighbourhood of that path is available with certified gap bound $G_0>\varepsilon>0$. A standard short-step path-following method reaches duality gap at most $\varepsilon$ in $O(\sqrt n\log(G_0/\varepsilon))$ Newton steps (up to an additive initial step count).
Intuition. The derivative inequalities limit how rapidly curvature changes along any line. That makes a Newton step and a small increase in the path parameter predictable. The count assumes a suitable start and exact arithmetic; finding the start, solving each linear system and controlling numerical error are additional work. For $F=x>0$, $\phi=-\log x$ has $\phi^{(2)}=1/x^2$ and $|\phi^{(3)}|=2/x^3$, exactly the curvature bound.
Tooling. In Python, CVXPY parses LMIs written as M << 0 and hands them to a solver; in MATLAB, YALMIP does the same. MOSEK and Clarabel are interior-point solvers (high accuracy, $O(n^3)$–$O(n^6)$ per iteration); SCS is a first-order ADMM solver that scales further at the price of $10^{-3}$–$10^{-5}$ accuracy. The stack varies by paper: Pauli et al.'s ADMM training (L-CSS 2022) and Zames–Falb analysis (CDC 2021) solve their SDPs with YALMIP and MOSEK, whereas LipKernel's direct parameterisations need no solver at all and are implemented in PyTorch.
ADMM is the alternating direction method of multipliers. It keeps two copies of the variable, writes the task as $\min_{W,Z}\ell(W)+I_C(Z)$ subject to $W=Z$, where $I_C$ is zero on the certificate-feasible set $C$ and $+\infty$ outside it, and alternates three steps: minimise the loss plus an agreement penalty over $W$, project onto $C$ to update $Z$, and update a multiplier that accumulates the disagreement $W-Z$. This describes the training strategy; convergence guarantees for convex splitting do not automatically apply to a neural-network loss.
For example, with $C=[-1,1]$, the constrained copy of a scalar weight $2$ is pulled back to $1$. With penalty $r>0$ and scaled multiplier $u$, the agreement penalty is $(r/2)\|W-Z+u\|^2$; after the two minimisations, set $u^+=u+W-Z$. This split makes the certificate step explicit.
A numerical eigenvalue check is evidence of feasibility. To turn it into a rigorous certificate, include an error bound: if $\widehat M$ is the computed matrix, $\|M-\widehat M\|_2\le\delta$, and a validated upper bound gives $\lambda_{\max}(\widehat M)\le-\delta$, then $M\preceq0$, because $\lambda_{\max}(M)\le\lambda_{\max}(\widehat M)+\|M-\widehat M\|_2$. A strict margin is useful when it exceeds the combined matrix-assembly and eigenvalue errors.
Consider the LMI in two unknowns $x$ and $y$:
A symmetric $2\times2$ matrix is positive semidefinite exactly when both diagonal entries and the determinant are nonnegative. Here that means $x\ge0$, $y\ge0$ and $xy-1\ge0$. The solution set is the region on and above the hyperbola $y=1/x$ in the first quadrant. It is convex, but its boundary is curved, so finitely many linear inequalities could not describe it.
- $(x,y)=(2,0.5)$: $xy=1$, on the boundary. The matrix has eigenvalues $0$ and $2.5$.
- $(x,y)=(2,0.4)$: $xy=0.8\lt1$, outside. The determinant is $-0.2$, so one eigenvalue is negative.
- $(x,y)=(0.5,3)$: $xy=1.5$, inside.
Averaging the two feasible points $(2,0.5)$ and $(0.5,3)$ gives $(1.25,1.75)$, with $xy=2.19\ge1$: feasible again, as convexity guarantees.
The system $x_{t+1}=Ax_t$ with $A=\begin{bmatrix}0.5&1\\0&0.5\end{bmatrix}$ is stable: both eigenvalues are $0.5$, so $\rho(A)=0.5\lt1$ and every trajectory goes to zero. The Lyapunov LMI asks for $P\succ0$ with $A^{\top}PA-P\prec0$, so that $V(x)=x^{\top}Px$ decreases at every step.
The obvious guess fails. With $P=I$, $V(x)=\|x\|^2$ is the squared length. But from $x_0=(0,1)$ the first step gives $x_1=(1,0.5)$, with $\|x_1\|=1.118\gt1$: the length grows before it shrinks. Correspondingly, $A^{\top}A-I$ has a positive eigenvalue, so $P=I$ is not a certificate.
Solving for $P$. Solve the Stein equation $A^{\top}PA-P=-I$, which is linear in the three unknown entries of $P$:
So $P\succ0$ and $A^{\top}PA-P=-I\prec0$: a valid certificate. Along the same trajectory $V(x_0)=4.2963$ and $V(x_1)=3.2963$. $V$ drops by exactly $\|x_0\|^2=1$, because $V(x_{t+1})-V(x_t)=x_t^{\top}(A^{\top}PA-P)x_t=-\|x_t\|^2$. A tilted ellipse measures progress where the round circle could not.
3. The Schur Complement
In plain words. Checking whether a big symmetric matrix is positive definite can be split into two smaller checks: one diagonal block must be positive definite, and a "leftover" matrix, the Schur complement, must be too. Used in reverse, the same fact turns a nonlinear condition, such as "a squared length is at most $t$", into a linear matrix inequality in a larger matrix. That is how most LMIs on this page are built.
- $M=\begin{bmatrix}A&B\\B^{\top}&C\end{bmatrix}$: a symmetric block matrix with symmetric diagonal blocks $A$ and $C$ (here $A$ is a block, not a system matrix).
- $C-B^{\top}A^{-1}B$ and $A-BC^{-1}B^{\top}$: the Schur complements of $A$ and of $C$ in $M$.
- $I$: the identity matrix; $\|x\|^2=x^{\top}x$.
The Schur complement is the tool that turns "quadratic in the unknown" into "linear in a bigger matrix". Every LMI on this page that contains a term like $W^{\top}W$, $c^{\top}P^{-1}c$ or $PBR^{-1}B^{\top}P$ was produced by it.
- If $C\succ0$: $\ M\succeq0\iff A-BC^{-1}B^{\top}\succeq0$, and $M\succ0\iff A-BC^{-1}B^{\top}\succ0$.
- If $A\succ0$: $\ M\succeq0\iff C-B^{\top}A^{-1}B\succeq0$, and $M\succ0\iff C-B^{\top}A^{-1}B\succ0$.
- Negative form (apply the above to $-M$): if $C\prec0$, $\ M\preceq0\iff A-BC^{-1}B^{\top}\preceq0$.
Assume $C\succ0$ and define the invertible block-triangular matrix $R=\begin{bmatrix}I&-BC^{-1}\\0&I\end{bmatrix}$. Multiply out, one factor at a time:
So $RMR^{\top}=\mathrm{blkdiag}(S,C)$. By the congruence fact of Section 2 with the invertible $R^{\top}$, $M\succeq0\iff RMR^{\top}\succeq0\iff S\succeq0$ and $C\succeq0$; the second condition is given, so $M\succeq0\iff S\succeq0$. The strict version is identical with $\succ$. Swapping the roles of the blocks (conjugate with $\begin{bmatrix}I&0\\-B^{\top}A^{-1}&I\end{bmatrix}$) gives the second bullet, and applying the first bullet to $-M$ gives the negative form. $\blacksquare$
The scalar picture. For vectors $x,y$ the identity behind the algebra is completing the square:
Minimising over $y$ kills the first term (choose $y=-C^{-1}B^{\top}x$), so the quadratic form is nonnegative for all $(x,y)$ iff its minimum over $y$, the Schur-complement form, is nonnegative in $x$.
The standard uses
(a) A quadratic constraint on the inverse becomes an LMI. For $P\succ0$, the ellipsoid $\mathcal E(P)=\{x:x^{\top}Px\le1\}$ lies in the slab $\{|c^{\top}x|\le1\}$ iff $c^{\top}P^{-1}c\le1$. Indeed, with $y=P^{1/2}x$, Cauchy–Schwarz (Primer A) gives $c^{\top}x=(P^{-1/2}c)^{\top}y\le\|P^{-1/2}c\|\,\|y\|$ with equality attainable, so $\max_{\mathcal E(P)}c^{\top}x=\sqrt{c^{\top}P^{-1}c}$. The condition $1-c^{\top}P^{-1}c\ge0$ is nonlinear in $P$, but it is the Schur complement of $P$ in
which is linear in $P$. Read with a point $x$ in place of $c$, the same LMI says $x^{\top}P^{-1}x\le1$, i.e. "$x$ lies in the ellipsoid with shape matrix $P^{-1}$", and it is jointly linear in $(x,P)$: the standard way to put a point, or the vertices of a polytope, inside an ellipsoid whose shape is a decision variable. Back to the slab: with $c=W_i^{\top}/(\bar v_i-v_{*,i})$ ($W_i$ the $i$-th row of the first weight matrix, the ellipsoid centred at the equilibrium) and a congruence with $\mathrm{diag}(\bar v_i-v_{*,i},I)$, it becomes the constraint $\begin{bmatrix}(\bar v_i-v_{*,i})^2&W_i\\W_i^{\top}&P\end{bmatrix}\succeq0$ of Yin, Seiler & Arcak, TAC 2022 and of Pauli et al., CDC 2021: it keeps the certified ellipsoid inside the region where the local sector bounds of the activations are valid (Module 14).
Write $\delta x=x-x_*$ and $v_i-v_{*,i}=W_i\delta x$. To guarantee $\underline v_i\le v_i\le\bar v_i$, define $m_i=\min\{\bar v_i-v_{*,i},v_{*,i}-\underline v_i\}>0$. It suffices to require $|W_i\delta x|\le m_i$ throughout $\delta x^TP\delta x\le1$, equivalently $\begin{bmatrix}m_i^2&W_i\\W_i^T&P\end{bmatrix}\succeq0$. Using only $\bar v_i-v_{*,i}$ assumes this is the smaller available margin.
(b) Riccati inequality. With $R\succ0$, the continuous-time Riccati inequality $A^{\top}P+PA+Q+PBR^{-1}B^{\top}P\preceq0$ is quadratic in $P$. Apply the negative form with the $(2,2)$ block $-R\prec0$:
and the left-hand side is an LMI in $P$. Exercise 2.3 does the same for the $\ell_2$-gain version.
(c) Spectral-norm bounds (Primer A). For $\gamma\gt0$, $\|W\|_2\le\gamma\iff W^{\top}W\preceq\gamma^2I\iff\begin{bmatrix}\gamma I&W^{\top}\\W&\gamma I\end{bmatrix}\succeq0$ (Schur complement of the lower-right block: $\gamma I-W^{\top}(\gamma I)^{-1}W\succeq0$). The right-hand side is linear in $(W,\gamma)$, which is why norm-bounded layers are "LMI-representable", and why layer conditions such as the SLL condition $W^{\top}W\preceq T$ ($T$ diagonal) and the Sandwich layer's LMI in Module 13 can be satisfied by construction.
(d) From analysis to training. In LipSDP the last layer enters through $W_l^{\top}W_l$. With the weights fixed this is a constant, but for training Pauli et al., L-CSS 2022 need the certificate to be linear in $W_l$; the Schur complement with a $-I$ block achieves exactly that. Step 6 of the walkthrough does the computation.
Testing a matrix. Is $M=\begin{bmatrix}2&1\\1&1\end{bmatrix}$ positive definite? The top-left block $A=2$ is positive, and its Schur complement is $C-B^{\top}A^{-1}B=1-1\cdot\tfrac12\cdot1=0.5\gt0$. So $M\succ0$. Check: the eigenvalues are $(3\pm\sqrt5)/2$, about $0.382$ and $2.618$, both positive.
Turning a nonlinear condition into an LMI. The condition $\|x\|^2\le t$ is quadratic in $x$. With $C=I\succ0$, the Schur complement theorem gives
and the matrix on the left is affine in the unknowns $(t,x)$: an LMI. For $x=(3,4)$ we have $\|x\|^2=25$, and the block matrix is positive semidefinite for $t=25$ (on the boundary) and $t=26$, but not for $t=24$.
4. The S-Procedure / S-Lemma
In plain words. Many certificates need a statement of the form "whenever this quadratic inequality holds, that one holds too". Checking it point by point is impossible, because there are infinitely many points. The S-procedure instead looks for one number $\tau\ge0$ such that "the second quadratic minus $\tau$ times the first" is nonnegative everywhere. If such a $\tau$ exists, the implication is proved: wherever the first quadratic is nonnegative, the second is at least $\tau$ times it, hence nonnegative too. With a single constraint that holds strictly somewhere, the S-lemma adds the converse: if the implication is true, such a $\tau$ exists.
- $\sigma_0,\sigma_1,\dots,\sigma_m$: quadratic functions of a vector $\xi$. The question is whether $\sigma_1(\xi)\ge0,\dots,\sigma_m(\xi)\ge0$ imply $\sigma_0(\xi)\ge0$.
- $\tau_i\ge0$: the S-procedure multipliers, one per constraint (Lagrange multipliers in disguise).
- Strict feasibility: some $\bar\xi$ with $\sigma_1(\bar\xi)\gt0$.
A robustness question almost always has the shape "for all signals that satisfy this quadratic constraint, is that quadratic form nonpositive?" The S-procedure replaces the universal quantifier by one nonnegative multiplier per constraint and one matrix inequality. It is a Lagrangian relaxation in disguise, and for a single strictly feasible constraint it is exact.
Sufficiency. Take $\xi$ with $\sigma_i(\xi)\ge0$ for all $i$. Since $\tau_i\ge0$, $\sum_i\tau_i\sigma_i(\xi)\ge0$, and the premise gives $\sigma_0(\xi)\ge\sum_i\tau_i\sigma_i(\xi)\ge0$. $\blacksquare$ Compare with weak duality: the multipliers price the constraints and the premise says the priced objective is nonnegative everywhere; the conclusion follows on the feasible set because the prices are nonnegative.
Homogenisation. Write $\sigma(\xi)=\begin{bmatrix}\xi\\1\end{bmatrix}^{\top}N\begin{bmatrix}\xi\\1\end{bmatrix}$ with $N=\begin{bmatrix}A&b\\b^{\top}&c\end{bmatrix}$. If $N\succeq0$ then clearly $\sigma\ge0$. Conversely, if $\sigma(\xi)\ge0$ for all $\xi$, then for $t\ne0$, $\begin{bmatrix}\xi\\t\end{bmatrix}^{\top}N\begin{bmatrix}\xi\\t\end{bmatrix}=t^2\sigma(\xi/t)\ge0$, and the case $t=0$ follows by continuity; so $N\succeq0$. $\blacksquare$
In words: if a quadratic inequality follows from another one, then it follows for the most naive reason, namely because it is a nonnegative multiple of it plus something globally nonnegative. Why strict feasibility matters: take $\sigma_1(\xi)=-\xi^2$ and $\sigma_0(\xi)=\xi$ on $\mathbb R$. The feasible set is $\{0\}$, so the implication holds trivially, but $\xi+\tau\xi^2\lt0$ for small negative $\xi$ whatever $\tau\ge0$ is: no multiplier exists. The direction "$\Leftarrow$" is the S-procedure; the content of the lemma is "$\Rightarrow$".
The proof rests on a classical fact about pairs of real quadratic forms: by Dines, Bull. AMS 1941, the joint range $K=\{(\xi^{\top}A\xi,\ \xi^{\top}B\xi):\xi\in\mathbb R^n\}\subset\mathbb R^2$ is a convex cone. (This is false for three forms in general, which is one reason the S-lemma stops at one constraint.)
Assume the implication holds. Then no $\xi$ has $\xi^{\top}A\xi\ge0$ and $\xi^{\top}B\xi\lt0$, so $K$ does not meet the open convex quadrant $\mathcal M=\{(u,v):u\gt0,\ v\lt0\}$. By the separating-hyperplane theorem of Section 1 (which needs no closedness of $K$, because $\mathcal M$ is open) there are $(p,q)\ne0$ and $c$ with $pu+qv\ge c$ on $K$ and $pu+qv\le c$ on $\mathcal M$; and $c=0$, since $0\in K$ gives $c\le0$ while points of $\mathcal M$ arbitrarily close to the origin give $c\ge0$. So $pu+qv\ge0$ on $K$ and $pu+qv\le0$ on $\mathcal M$. On $\mathcal M$, letting $u\to\infty$ forces $p\le0$ and letting $v\to-\infty$ forces $q\ge0$. On $K$ the inequality reads $p\,\xi^{\top}A\xi+q\,\xi^{\top}B\xi\ge0$ for all $\xi$.
If $q\gt0$, divide by $q$ and set $\tau=-p/q\ge0$: $\xi^{\top}(B-\tau A)\xi\ge0$ for all $\xi$, i.e. $B-\tau A\succeq0$. If $q=0$ then $p\lt0$ and the inequality says $\xi^{\top}A\xi\le0$ for all $\xi$, contradicting the strictly feasible $\bar\xi$. So $q\gt0$ and the multiplier exists. $\blacksquare$ Strict feasibility is used exactly once, to exclude the degenerate separating line $u=0$.
The multiplier reading
Consider the non-convex problem $p^\star=\min_\xi q_0(\xi)$ s.t. $q_1(\xi)\le0$ with one quadratic constraint (a trust-region subproblem when $q_1(\xi)=\|\xi\|^2-1$). Its dual is $d^\star=\max_{\tau\ge0}\inf_\xi[q_0(\xi)+\tau q_1(\xi)]$. For any level $t$,
where the middle equivalence is the S-lemma (applied to $-q_1$ and $q_0-t$, assuming a strictly feasible point $q_1(\bar\xi)\lt0$). Taking $t=p^\star$ (assumed finite) gives $p^\star\le d^\star$, weak duality gives the reverse, and the $\tau$ produced by the S-lemma attains the dual optimum. Hence $p^\star=d^\star$: a non-convex QCQP (quadratically constrained quadratic program) with a single quadratic constraint has no duality gap, and the S-procedure multiplier $\tau$ is its Lagrange multiplier. With two or more quadratic constraints the gap can be positive, and the S-procedure certifies only the dual value $d^\star\le p^\star$: a valid but possibly conservative bound.
Claim: if $x^2\le1$, then $2-x-x^2\ge0$. In S-procedure form, $\sigma_1(x)=1-x^2\ge0$ should imply $\sigma_0(x)=2-x-x^2\ge0$. (The claim is true, because $2-x-x^2=(1-x)(2+x)$ is nonnegative on $[-1,1]$.)
Step 1: the certificate condition. We need $\tau\ge0$ with $\sigma_0(x)-\tau\sigma_1(x)\ge0$ for all real $x$:
Step 2: when is a quadratic nonnegative everywhere? Its leading coefficient must be positive, $\tau\gt1$, and its discriminant must be at most zero: $1-4(\tau-1)(2-\tau)\le0$. Expanding gives $4\tau^2-12\tau+9\le0$, that is, $(2\tau-3)^2\le0$, so $\tau=1.5$ exactly.
Step 3: the certificate. With $\tau=1.5$ the difference is $0.5x^2-x+0.5=0.5(x-1)^2\ge0$, a perfect square. So for every $x$ with $1-x^2\ge0$ we get $2-x-x^2\ge1.5\,(1-x^2)\ge0$. Any other $\tau$, for example $1.4$ or $1.6$, makes the difference negative somewhere. The S-lemma guaranteed that this search would succeed, because the constraint is strictly feasible ($\sigma_1(0)=1\gt0$) and the implication is true.
5. Quadratic Constraints
In plain words. A neural network's activation function, or an uncertain part of a plant, is hard to handle exactly. A quadratic constraint replaces it by one simple fact it is known to satisfy, written as a quadratic inequality between its input and its output. For ReLU, the fact is "the output lies between 0 and the input": a sector. Certificates then hold for every function obeying that fact, so they are safe but can be loose. The S-procedure of Section 4 combines such facts, each with a nonnegative weight, into one LMI.
- $\varphi$: a scalar nonlinearity, for example an activation, with input $v$ and output $\varphi(v)$.
- Sector $[\alpha,\beta]$: $\alpha v^2\le v\,\varphi(v)\le\beta v^2$; the graph lies between the lines of slopes $\alpha$ and $\beta$. Slope restriction $[\alpha,\beta]$: the same for every chord, $\alpha\le\frac{\varphi(v)-\varphi(\bar v)}{v-\bar v}\le\beta$.
- $\Delta v=v-\bar v$, $\Delta\varphi=\varphi(v)-\varphi(\bar v)$: increments between two inputs. Incremental QCs compare two arbitrary inputs; non-incremental ones compare with a fixed point.
- $T=\mathrm{diag}(\lambda_i)$ with $\lambda_i\ge0$: one multiplier per neuron (not the Lagrange multiplier of Section 1).
A quadratic constraint (QC) is the control-theoretic way to say "I do not know this nonlinearity exactly, but I know a quadratic inequality its input–output pairs satisfy." Activations, uncertain plants and delays are all treated the same way, which is what lets the same LMI machinery certify a Lipschitz constant and a closed-loop region of attraction.
The matrix identity is worth checking once: $(\varphi-\alpha v)(\beta v-\varphi)=-\alpha\beta v^2+(\alpha+\beta)v\varphi-\varphi^2$, and doubling it gives $-2\alpha\beta v^2+2(\alpha+\beta)v\varphi-2\varphi^2$, which is exactly the quadratic form. A loop transformation normalises any sector: if $\varphi$ is in $[\alpha,\beta]$, then $\tilde\varphi(v)=(\varphi(v)-\alpha v)/(\beta-\alpha)$ is in $[0,1]$ (and slope restriction transforms the same way), with the linear part $\alpha v$ absorbed into the rest of the loop. This is why many results are stated for $[0,1]$ only, and why the absolute-stability criteria for such Lur'e loops (see Primer D) (circle, Popov, Zames–Falb) are usually derived in the normalised setting; LipSDP instead keeps $\alpha,\beta$ explicit in the multiplier. Tight intervals for common activations: ReLU and tanh are slope-restricted in $[0,1]$ (tanh has slope $1-\tanh^2(v)\in(0,1]$, so $\alpha=0$ is tight globally); the sigmoid in $[0,\tfrac14]$ (hence also in $[0,1]$; these are slope intervals, and since $\sigma(0)=\tfrac12$ the origin-centred sector definition applies to the shifted $\sigma(v)-\tfrac12$); leaky ReLU with slope $a\in[0,1)$ on negative inputs in $[a,1]$. Softmax is not elementwise (see Primer E) but is the gradient of the convex log-sum-exp, and gradients of $\beta$-smooth convex functions satisfy the incremental QC with $T=\lambda I$ (theorem below). GroupSort and MaxMin are 1-Lipschitz but not slope-restricted, which is why Module 12 needs new QCs for them.
Let $F:\mathbb R^n\to\mathbb R$ be differentiable and convex, and suppose $\|\nabla F(x)-\nabla F(y)\|_2\le\beta\|x-y\|_2$ for all $x,y$, with $\beta>0$. Then $\Delta g=\nabla F(x)-\nabla F(y)$ satisfies $\beta(x-y)^{\top}\Delta g\ge\|\Delta g\|_2^2$ (cocoercivity). Multiplying by $2\lambda\ge0$ gives exactly the incremental sector QC of $\nabla F$ with $\alpha=0$ and $T=\lambda I$.
Intuition. Convexity aligns the gradient change with the displacement; smoothness prevents that gradient change from being too large relative to its alignment. Lipschitz continuity alone does not imply this inequality. For softmax, $F(x)=\log\sum_i e^{x_i}$ and $p=\nabla F(x)$ has entries $p_i=e^{x_i}/\sum_je^{x_j}$; the Hessian is $\operatorname{diag}(p)-pp^{\top}$. For any $z$, its quadratic form is $\sum_i p_i z_i^2-(\sum_i p_i z_i)^2$, between $0$ and $\|z\|_2^2$ by Cauchy–Schwarz and $0\le p_i\le1$. Hence the conservative choice $\beta=1$ is valid.
Fazlyab et al. 2019, Sec. 2.2 (softmax example)
A discrete-time map $F$ is a contraction in a chosen norm if $\|F(x)-F(y)\|\le q\|x-y\|$ for all $x,y$ with a fixed $q\lt1$. Iteration then gives $\|x_t-y_t\|\le q^t\|x_0-y_0\|$ for any two trajectories $x_{t+1}=F(x_t)$, $y_{t+1}=F(y_t)$. An incremental QC can help prove such a bound, but a finite Lipschitz constant greater than or equal to one does not establish contraction.
For $F(x)=x/2$, two initial points a distance $8$ apart are distances $4,2,1$ apart after one, two and three steps. A weighted norm $\|x\|_P=\sqrt{x^TPx}$ with $P\succ0$ is a constant contraction metric when the same shrinking inequality holds in it. This is stronger than merely bounding a network output difference.
Integral quadratic constraints, briefly
When the "nonlinearity" is a dynamic operator $w=\Delta(v)$ (an uncertain plant, a delay, or an activation seen in feedback over time), pointwise QCs are replaced by integral quadratic constraints (Megretski & Rantzer, TAC 1997): $\Delta$ satisfies the IQC defined by the multiplier $\Pi$ (a bounded, Hermitian-matrix-valued function of $\omega$) if, for every square-integrable input $v$ (see Primer D),
Here $j^2=-1$, $\hat v(j\omega)$ is the Fourier transform of the time signal $v$, and $M^*=\overline M^T$ is conjugate transpose. A Hermitian matrix satisfies $M=M^*$; its quadratic form $z^*Mz$ is real, and $M\succeq0$ means this is nonnegative for every complex vector $z$. Thus complex congruence $R^*MR$ plays the same role as real congruence $R^TMR$.
For example, $z=(1,j)^T$ gives $z^*z=2$, whereas $z^Tz=0$: conjugation is essential to energy. Also $e^{j\theta}=\cos\theta+j\sin\theta$, and $\overline{a+jb}=a-jb$. The largest singular value of $G$ is $\sqrt{\lambda_{\max}(G^*G)}$. These are the complex versions of the real matrix operations used above.
Their theorem is the basic robustness result for such loops.
Signals live in $\mathcal L_{2e}$, i.e. have finite energy $\|v\|_{[0,T]}^2=\int_0^T\|v(t)\|^2dt$ on every finite interval; $\mathcal L_2$ are those with finite energy on $[0,\infty)$. Let $G$ be a stable, proper, real-rational transfer matrix ($G\in\mathcal{RH}_\infty$: entries are ratios of real polynomials, numerator degree at most denominator degree, no poles in the closed right half-plane), and let $\Delta:\mathcal L_{2e}\to\mathcal L_{2e}$ be causal (its output up to time $T$ depends only on its input up to $T$) and bounded ($\Delta(0)=0$ and $\|\Delta(v)\|_{[0,T]}\le K\|v\|_{[0,T]}$ for all $v,T$; see Primer D). Let $\Pi$ be measurable, Hermitian-valued and bounded ($\|\Pi(j\omega)\|_2\le c$ for all $\omega$). Consider the loop $v=Gw+d_v$, $w=\tau\Delta(v)+d_w$ with external signals $d_v,d_w$. Suppose
- (i) for every $\tau\in[0,1]$ the loop is well posed: every $(d_v,d_w)$ determines a unique causal solution $(v,w)$;
- (ii) for every $\tau\in[0,1]$, $\tau\Delta$ satisfies the IQC defined by $\Pi$ for every $v\in\mathcal L_2$;
- (iii) there is $\epsilon\gt0$ with $\begin{bmatrix}G(j\omega)\\I\end{bmatrix}^{*}\Pi(j\omega)\begin{bmatrix}G(j\omega)\\I\end{bmatrix}\preceq-\epsilon I$ for all $\omega\in\mathbb R$.
Then the loop with $\tau=1$ is stable: the map from $(d_v,d_w)$ to $(v,w)$ has a finite induced energy gain. In words: the plant strictly violates the quadratic inequality that the uncertainty satisfies, so no nonzero signal can circulate with growing energy. Assumption (iii) must hold with a uniform margin $\epsilon$; (i) and (ii) must hold along the whole path $\tau\in[0,1]$ because the proof starts from the trivially stable open loop $\tau=0$ and increases $\tau$ continuously.
The proof is a homotopy in $\tau$; the dissipativity route of Scherer's tutorial replaces the homotopy by hard IQCs (valid on every finite horizon) and a storage function, so check which hypotheses a paper uses. A pointwise-in-time QC, such as the sector or slope constraint of a static nonlinearity, integrates to an IQC with a constant multiplier that holds on every finite horizon, i.e. a hard IQC. The converse fails: a constant multiplier alone does not make an IQC hard for a dynamic operator. The delay $w(t)=v(t-h)$, $h\gt0$, with zero initial history ($v(t)=0$ for $t\lt0$) satisfies the IQC with $\Pi=\mathrm{diag}(-I,I)$ over the infinite horizon (input and output energies are equal), but on a finite horizon $[0,T]$ the integral is $\int_0^T(\|w\|^2-\|v\|^2)\,dt=-\int_{\max(0,T-h)}^{T}\|v(t)\|^2dt$, minus the input energy in the last delay interval, which is negative whenever the input has energy there. With the constant sector multiplier, the theorem reproduces the circle criterion; the Popov criterion (Primer D), for time-invariant sector nonlinearities, uses the frequency-dependent multiplier $1+q\,j\omega$ with a scalar $q\ge0$ chosen as part of the certificate; because this factor grows without bound in $\omega$ when $q\gt0$, Popov is a separate theorem rather than a direct instance of the bounded-multiplier statement above. A dynamic multiplier ($\Pi$ depends on $\omega$) captures memory: for slope-restricted nonlinearities the Zames–Falb class is the classical example, and Pauli et al., CDC 2021 bring its acausal FIR version (see Primer D) to neural-network loops. The computational recipe is always the same: factorise $\Pi=\Psi^{*}P\Psi$ (here $P$ is the multiplier's middle matrix, not a storage matrix), append the state of the filter $\Psi$ to the plant state, and the frequency-domain test becomes an LMI in a storage matrix $X$ and the multiplier parameters $P$, via the KYP lemma of Section 6 or, in the time domain, via dissipativity and the S-procedure; the tutorial of Scherer, IEEE CSM 2022 is the reference for this route, which Module 14 follows.
Let $\varphi:\mathbb R\to\mathbb R$ be nondecreasing, globally Lipschitz, and $\varphi(0)=0$. For any real two-sided square-summable sequence $v$, set $w_t=\varphi(v_t)$. Choose finitely many coefficients $h_k\ge0$ ($k\in\mathbb Z$, $h_0=0$) with $\sum_kh_k\lt1$ and define the FIR filter $(Hv)_t=\sum_kh_kv_{t-k}$; it is acausal if some $h_k$ with $k\lt0$ is nonzero, since it then uses future samples. Then
With $M(e^{j\omega})=1-\sum_kh_ke^{-jk\omega}$ this is the IQC with $\Pi=\begin{bmatrix}0&M^*\\M&0\end{bmatrix}$, up to a positive factor. Zero-extending a one-sided sequence gives this infinite-horizon statement. For example, $(Hv)_t=\tfrac14v_{t-1}+\tfrac14v_{t+1}$ is admissible and acausal. Lipschitz continuity ensures $w\in\ell_2$; nonnegativity and the coefficient sum are essential to this sufficient class.
Intuition. Pairing ordered samples of a monotone graph gives at least as much inner product as shifting one sequence relative to the other. A nonnegative weighted sum of these shift inequalities gives the result. Future samples are allowed in an analysis filter; this theorem alone is neither an online implementation nor a hard finite-horizon IQC.
Scalar special case of the acausal FIR class of Pauli et al., CDC 2021.
Assume the chosen multiplier has a stable proper finite-dimensional real-rational factorisation $\Pi=\Psi^*P\Psi$ with a constant middle matrix $P=P^{\top}$, and $G$ is stable proper real-rational. Realise the cascade $r=\Psi[G;I]w$ as $\dot\chi=A_a\chi+B_aw$, $r=C_a\chi+D_aw$, with $A_a$ Hurwitz. Then the strict frequency inequality $[G;I]^*\Pi[G;I]\prec0$, including its limit at infinity, is equivalent to the existence of a symmetric $X$ satisfying
No controllability is needed for this strict KYP form. It is affine in $(X,P)$ only when the filter and plant realisations are fixed. A frequency factorisation alone does not imply a hard IQC. A direct finite-horizon dissipation proof additionally needs a valid finite-horizon IQC for this filter (including any terminal correction), the stated initial-state convention and a storage with the required nonnegative terminal contribution.
Intuition. The filter turns a frequency weight into an ordinary quadratic output supply. Adding its state makes that supply available to KYP. Stability and finite dimension are assumptions on the chosen factorisation, not automatic properties of an arbitrary bounded function of frequency.
Strict KYP lemma of Section 6 applied to the filtered plant; see Scherer, IEEE CSM 2022.
With plant $\dot x=Ax+Bw$, $v=Cx+Dw$, split the filter input blocks as $B_\psi=[B_v\ B_w]$, $D_\psi=[D_v\ D_w]$, where the filter is $\dot\eta=A_\psi\eta+B_\psi[v;w]$, $r=C_\psi\eta+D_\psi[v;w]$, and put $\chi=(x,\eta)$. Substituting $v=Cx+Dw$ into the filter equations gives
Use zero initial plant and filter states for the transfer-function identity. This triangular $A_a$ is Hurwitz when $A$ and $A_\psi$ are Hurwitz. In the strict frequency test $X$ is only required to be symmetric; a direct storage proof must separately justify its terminal sign.
Take the one-neuron network $f(x)=w_2\,\mathrm{ReLU}(w_1x)$ with $w_1=2$ and $w_2=3$. Its true Lipschitz constant is $|w_1w_2|=6$, the slope where the neuron is on. Can the quadratic-constraint machinery find it without knowing where the neuron is on or off?
Step 1: the fact. ReLU is slope-restricted in $[0,1]$. Let $\Delta v=w_1\Delta x$ be the pre-activation increment and $\Delta z$ the neuron's output increment. The incremental QC of the lemma above, with $\alpha=0$ and $\beta=1$, reads $2\lambda\,\Delta z\,(w_1\Delta x-\Delta z)\ge0$ for any $\lambda\ge0$.
Step 2: what we want. $|\Delta f|\le L\,|\Delta x|$, that is, $L^2\Delta x^2-w_2^2\Delta z^2\ge0$ for all increments the neuron can produce.
Step 3: the S-procedure. It suffices that
Step 4: solve. The $2\times2$ test needs $2\lambda-9\ge0$ and a nonnegative determinant, $L^2(2\lambda-9)-4\lambda^2\ge0$. At $\lambda=9/2$ the determinant is $-4\lambda^2\lt0$ whatever $L$ is, so $\lambda\gt9/2$, and then $L^2\ge4\lambda^2/(2\lambda-9)$. Minimising over $\lambda$ gives $\lambda=9$ and $L^2=36$: $L=6$, the exact constant. The matrix is then $\begin{bmatrix}36&-18\\-18&9\end{bmatrix}$, with eigenvalues $0$ and $45$.
Any other admissible multiplier, $\lambda\gt9/2$, still gives a valid bound, just a looser one: $\lambda=12$ gives $L\approx6.20$. Choosing the multipliers well is exactly what the SDP in LipSDP does, for thousands of neurons at once (Module 12).
6. Dissipativity & the KYP Lemma
In plain words. Think of a system as a tank of energy. The input pours energy in, the output takes energy out, and the tank's content, the storage $V$, can never be negative. A system is dissipative if the stored energy grows by at most what the supply rate $s$ allows. With the supply rate $s=\gamma^2\|w\|^2-\|z\|^2$, dissipativity says "the output energy is at most $\gamma^2$ times the input energy": a gain bound. For linear systems with quadratic storage, finding $V$ is an LMI, and the KYP lemma links that LMI to the frequency response.
- $x_{t+1}=f(x_t,w_t)$, $z_t=h(x_t,w_t)$: a system with state $x$, input $w$ and output $z$.
- $V(x)\ge0$: the storage function; $s(w,z)$: the supply rate; the dissipation inequality is $V(x_{t+1})-V(x_t)\le s(w_t,z_t)$.
- $\gamma$: an $\ell_2$-gain bound, $\sum_t\|z_t\|^2\le\gamma^2\sum_t\|w_t\|^2$ from zero initial state; $(Q,S,R)$: the matrices of a general quadratic supply rate.
- $G(e^{j\omega})$: the frequency response. For a stable linear system the best $\gamma$ is its peak magnitude.
Dissipativity is the energy bookkeeping that turns "the system cannot amplify its input by more than $\gamma$" into a matrix inequality, and it is the reason a stack of neural-network layers can be certified layer by layer.
For the gain supply the telescoped inequality reads $\sum_{t\lt N}\|z_t\|^2\le\gamma^2\sum_{t\lt N}\|w_t\|^2+V(x_0)$; with $V(x_0)=0$ (in particular $x_0=0$ when $V(0)=0$, as for every quadratic storage) and $N\to\infty$ this is $\|z\|_2\le\gamma\|w\|_2$, an $\ell_2$-gain bound; otherwise the initial storage enters as the bias term $V(x_0)$. Dissipativity is thus a Lyapunov argument with an input, and, like Lyapunov's theorem, it becomes an LMI as soon as the system is linear and the storage is quadratic.
Let $\chi$ be the combined plant/filter state with $\chi^+=A_{\rm tot}\chi+B_{\rm tot}w$, let $r=C_{\rm tot}\chi+D_{\rm tot}w$ be the filter output, and let $V(\chi)=\chi^{\top}X\chi$. The dot in the certificate repeats the left factor $H=\begin{bmatrix}I&0\\A_{\rm tot}&B_{\rm tot}\\C_{\rm tot}&D_{\rm tot}\end{bmatrix}$, and $H(\chi,w)=(\chi,\chi^+,r)$, so
Hence $H^{\top}\mathrm{diag}(-X,X,P)H\prec0$ says $V(\chi^+)-V(\chi)\lt-r^{\top}Pr$ for every nonzero $(\chi,w)$: a dissipation inequality with supply $-r^{\top}Pr$. Summed over time, the IQC makes $\sum_tr_t^{\top}Pr_t\ge0$, so the storage must decrease; this is how the multiplier enters the stability proof.
- (i) $\begin{bmatrix}(j\omega I-A)^{-1}B\\I\end{bmatrix}^{*}M\begin{bmatrix}(j\omega I-A)^{-1}B\\I\end{bmatrix}\preceq0$ for all $\omega\in\mathbb R\cup\{\infty\}$;
- (ii) there exists $P\in\mathbb S^n$ with $\ M+\begin{bmatrix}A^{\top}P+PA&PB\\B^{\top}P&0\end{bmatrix}\preceq0$.
The value at $\omega=\infty$ means the limiting inequality as $|\omega|\to\infty$. Since $(j\omega I-A)^{-1}B\to0$, the stacked matrix tends to $[0;I]$, so this tests the lower-right block of $M$. It includes the direct input-output term even when the dynamic part disappears.
Fix $\omega$ and write $\Phi(\omega)=\begin{bmatrix}(j\omega I-A)^{-1}B\\I\end{bmatrix}$. Multiply (ii) from the left by $\Phi^{*}$ and from the right by $\Phi$ (congruence, Section 2, so $\preceq0$ is preserved). The $M$-term becomes the left-hand side of (i). For the $P$-term, put $X=(j\omega I-A)^{-1}B$, so that $j\omega X=AX+B$, and compute
So the $P$-term contributes nothing and (i) follows. $\blacksquare$ The same cancellation, in the time domain, is the statement that a quadratic storage function integrates to zero along a periodic (sinusoidal) steady state. The hard direction (i) $\Rightarrow$ (ii) is what makes SDP-based robust control complete rather than merely sufficient; Rantzer's proof is a separation argument on a convex set, in the same spirit as the S-lemma proof of Section 4. For the discrete-time version (no eigenvalues of $A$ on the unit circle) replace $(j\omega I-A)^{-1}$ by $(e^{j\omega}I-A)^{-1}$, $\omega\in[0,2\pi)$, and the whole $P$-term by $\begin{bmatrix}A^{\top}PA-P&A^{\top}PB\\B^{\top}PA&B^{\top}PB\end{bmatrix}$, the storage block of the discrete-time dissipativity LMI above (replacing only the $(1,1)$ block would be wrong). The easy direction is the same computation: with $z=e^{j\omega}$ and $X=(zI-A)^{-1}B$ we have $zX=AX+B$, so the $P$-term contributes $(AX+B)^{*}P(AX+B)-X^{*}PX=(|z|^2-1)X^{*}PX=0$.
Suppose $A^{\top}P+PA\preceq0$ (the $(1,1)$ block of (ii) when the $(1,1)$ block of $M$ is $\succeq0$, as for the gain and passivity supplies) and set $Q=-(A^{\top}P+PA)\succeq0$. Along the unforced system $x(t)=e^{At}x_0$, $\tfrac{d}{dt}\,x^{\top}Px=x^{\top}(A^{\top}P+PA)x=-x^{\top}Qx$. Because $A$ is Hurwitz, $x(t)\to0$, and integrating from $0$ to $\infty$ gives $x_0^{\top}Px_0=\int_0^\infty x(t)^{\top}Qx(t)\,dt\ge0$ for every $x_0$, so $P\succeq0$.
Let $A\in\mathbb R^{n\times n}$ be Hurwitz, $B\in\mathbb R^{n\times m}$, $C\in\mathbb R^{m\times n}$, $D\in\mathbb R^{m\times m}$, and assume $(A,B)$ controllable. For the square transfer matrix $G(s)=C(sI-A)^{-1}B+D$, the condition $G(j\omega)+G(j\omega)^*\succeq0$ at all real frequencies and at infinity is equivalent to the existence of $P=P^T\succeq0$ with
Equivalently, $V=x^TPx$ satisfies $\dot V\le2w^Tz$ for every state and input. The implication from this storage inequality to the frequency inequality needs no controllability; that assumption supplies the nonstrict converse here.
Intuition. Input and output have matching dimensions so their inner product represents supplied power. The matrix inequality says that the stored energy cannot increase faster than this power supply. Hurwitz stability forces the KYP matrix to be a nonnegative storage, by the unforced-trajectory calculation above.
The KYP lemma above with the passivity supply (Rantzer 1996).
Incremental dissipativity and layer-wise composition
Replace the signals by differences of two trajectories, $\Delta x=x^a-x^b$, $\Delta w$, $\Delta z$, and the storage by a function of $\Delta x$: a system is incrementally dissipative if $V(\Delta x_{t+1})-V(\Delta x_t)\le s(\Delta w_t,\Delta z_t)$. For a static layer $y=f(u)$ there is no state and the inequality reduces to $s(\Delta u,\Delta y)\ge0$; with the weighted gain supply $s=\|\Delta u\|^2_{X_{k-1}}-\|\Delta y\|^2_{X_k}$ (where $\|v\|_X^2=v^{\top}Xv$, $X\succ0$) this says $\|\Delta y\|_{X_k}\le\|\Delta u\|_{X_{k-1}}$: a Lipschitz bound in weighted norms.
Consider fixed affine weights in a feedforward chain $z_k=\varphi_k(W_kz_{k-1}+b_k)$, $k=1,\dots,l$, and final affine output $W_{l+1}z_l+b_{l+1}$. Each $\varphi_k$ is elementwise slope-restricted in $[0,1]$. Use exactly the scalar sector QCs with nonnegative diagonal multipliers $T_k$ and no cross-neuron couplings. For arbitrary increment variables $v_0,\dots,v_l$, define
The global LipSDP inequality $\rho\|v_0\|^2-\|W_{l+1}v_l\|^2-\sum_k q_k\ge0$ for all increments is equivalent to existence of symmetric interface matrices $X_1,\dots,X_{l-1}$, with $X_0=\rho I$, $X_l=W_{l+1}^{\top}W_{l+1}$, such that
The interface matrices have no imposed diagonal or scalar structure; semidefinite boundary cases are allowed. Each $X_{k-1}$ is automatically PSD as a principal block. Optimising over the same multiplier family therefore gives equal infimal values of $\rho$.
Intuition. Summing the local inequalities proves one direction. The converse decomposes the positive semidefinite block-tridiagonal global matrix along its chain, as in the cited splitting theorem. Thus splitting adds no loss to this SDP; the activation abstraction and S-procedure can still overestimate the true Lipschitz constant. Singular interface matrices give quadratic forms, not norms, but the telescoping argument still holds.
Pauli, Gramlich & Allgöwer 2024, Theorem 1 and Sec. IV.
System: $x_{t+1}=0.5\,x_t+w_t$ with output $z_t=x_t$. Try storage $V(x)=p\,x^2$ with supply rate $s(w,z)=\gamma^2w^2-z^2$. The dissipation inequality $p(0.5x+w)^2-px^2\le\gamma^2w^2-x^2$ must hold for all $x$ and $w$. Collecting terms gives
For a $2\times2$ matrix to be $\preceq0$, both diagonal entries must be $\le0$ and the determinant $\ge0$. The diagonal gives $p\ge4/3$, but at $p=4/3$ the determinant is $-4/9\lt0$, so $p\gt4/3$. The determinant condition then becomes $\gamma^2\ge p+p^2/(3p-4)$. The right side is smallest at $p=2$, where it equals $4$. So $\gamma=2$, certified by $V(x)=2x^2$. The matrix is then $\begin{bmatrix}-0.5&1\\1&-2\end{bmatrix}$, with eigenvalues $0$ and $-2.5$.
Sanity check. A constant input $w_t=1$ settles at $x=0.5x+1$, that is, $x=2$: the output is twice the input. The frequency response $G(e^{j\omega})=1/(e^{j\omega}-0.5)$ has its largest magnitude at $\omega=0$, also $1/(1-0.5)=2$. The storage-function LMI found the exact gain, as the KYP lemma promises for linear systems.
Walkthrough: From a Quadratic Constraint to an LMI
LipSDP in miniature. Take the scalar one-hidden-neuron network $f(x)=w_1\,\varphi(w_0x+b_0)+b_1$ with $\varphi$ slope-restricted in $[0,1]$ (ReLU, tanh), and find the smallest $\rho$ such that $|f(x)-f(y)|^2\le\rho\,|x-y|^2$ for all $x,y$. Every step is a section of this page; Module 12 repeats the same six steps with matrices.
Interactive: S-Lemma in 2-D
Two quadratic forms on $\mathbb R^2$: the constraint $\xi^{\top}A\xi\ge0$ and the target $\xi^{\top}B\xi\ge0$. Set each matrix through its eigenvalues and rotation, then move the multiplier $\tau$ and watch whether $B-\tau A\succeq0$ (its two eigenvalues use a closed formula evaluated in floating point). Writing a nonzero $\xi=ru$ with $\|u\|=1$ gives $\xi^{\top}A\xi=r^2\,u^{\top}Au$, so the sign of a homogeneous quadratic form depends only on the direction of $\xi$ (and both forms vanish at $\xi=0$); that is why everything is drawn on the unit circle.
The button approximately maximises $h(\tau)=\lambda_{\min}(B-\tau A)=\min_{\|u\|=1}(u^TBu-\tau u^TAu)$. This is concave because it is an infimum of affine functions of $\tau$. Ternary search (see Primer B) compares two interior points and discards a third of the interval that cannot contain a better value. For these sliders (eigenvalues in $[-3,3]$ in steps of $0.1$), strict feasibility gives $\lambda_{\max}(A)\ge0.1$ and $\|B\|_2\le3$, so $h(\tau)\le3-0.1\tau$, while $h(0)\ge-3$; hence $h(\tau)\lt h(0)$ for $\tau\gt60$, and no maximiser lies above 60.
Automatic maximisation is disabled when $A\preceq0$: then every $u^{\top}Au\le0$, so $h(\tau)$ is nondecreasing and it may grow without bound, approach an unattained limit, or attain a maximum. For example, when $A=0$, it is constant and every $\tau\ge0$ is a maximiser. The current multiplier can still be checked directly.
Left: directions where the constraint holds are coloured green if the target also holds and red if it fails; grey directions are outside the constraint set. The wedges are sampled per degree, so a very thin violation may not show; the verdict below uses analytic formulas evaluated in floating point, and a red dashed ray marks the worst feasible direction when the implication fails. The outer ring shows the sign of $\xi^{\top}(B-\tau A)\xi$: the certificate is valid iff the ring is entirely purple. Right: the three forms as functions of the angle; $B-\tau A\succeq0$ iff the thick purple curve stays above zero.
The implication test minimises analytically over direction rather than checking only the drawn wedges, but evaluates the formulas in floating point with tolerance $10^{-9}$. For $M=\begin{bmatrix}a&b\\b&d\end{bmatrix}$, $u(\theta)^TMu(\theta)=(a+d)/2+(a-d)\cos(2\theta)/2+b\sin(2\theta)$. On each feasible angular arc, its minimum occurs at an endpoint or an included minimum of this sinusoid. Values within the tolerance of zero are treated as zero; they are not exact proofs of boundary feasibility.
Interactive: Lyapunov LMI Feasibility
A $2\times2$ discrete-time system $x_{t+1}=Ax_t$. The explorer solves the Stein equation $A^{\top}PA-P=-I$ in closed form (three unknowns, one linear system), tests $P\succ0$, and draws the eigenvalues of $A$ against the unit circle, the certified level set $x^{\top}Px=1$ and one trajectory. By the theorem of Section 2, $P\succ0$ iff the LMI $A^{\top}PA-P\prec0$, $P\succ0$ is feasible iff $A$ is Schur stable.
Write $A=\begin{bmatrix}a&b\\c&d\end{bmatrix}$ and $P=\begin{bmatrix}p&q\\q&r\end{bmatrix}$. Matching the three independent entries of $A^TPA-P=-I$ gives $(a^2-1)p+2acq+c^2r=-1$, $abp+(ad+bc-1)q+cdr=0$, and $b^2p+2bdq+(d^2-1)r=-1$. Gaussian elimination solves for $(p,q,r)$. Positive definiteness then requires $p\gt0$ and $pr-q^2\gt0$. If elimination meets a pivot below its numerical threshold, the explorer reports that no reliable unique solution was found. In exact arithmetic the Stein map $P\mapsto A^{\top}PA-P$ is singular iff $\lambda_i\lambda_j=1$ for some pair of eigenvalues of $A$, which rules out Schur stability; a tiny pivot is only numerical evidence of (near-)singularity, not a proof.
The slider controls the ellipse parameter $\theta$: if $P$ has eigenvalues $\mu_1,\mu_2\gt0$ with orthonormal eigenvectors $u_1,u_2$, then $x_0=\frac{\cos\theta}{\sqrt{\mu_1}}u_1+\frac{\sin\theta}{\sqrt{\mu_2}}u_2$. This guarantees $x_0^TPx_0=1$ but generally differs from the polar angle of $x_0$. Without a positive definite $P$, the initial point is instead chosen on a circle of radius 0.6. Hollow eigenvalue markers indicate values beyond the plotting range.
Left: eigenvalues of $A$ (orange) and the unit circle. Right: the ellipse $x^{\top}Px=1$ (blue) and the trajectory (orange) started on it; along a valid certificate $V(x_{t+1})-V(x_t)=-\|x_t\|^2\lt0$, so the trajectory can never leave the ellipse. Try $a_{11}=a_{22}=1.05$, $a_{12}=a_{21}=0$: the Stein solution has negative entries and no certificate exists.
From the mathematics to a real decision
Learning objectives
- Use a quadratic storage function to certify a coupled thermal model over a whole operating set.
- Interpret an LMI through eigenvalues and distinguish its sufficient region from the physical constraint set.
- Carry a disturbance bound into an invariant radius instead of claiming nominal convergence.
A commissioning decision
Two temperature sensors monitor adjacent zones of the robot enclosure. Define the dimensionless deviations $x_1=(T_1-40)/5$ and $x_2=(T_2-40)/5$, with temperatures in degrees Celsius. The permitted operating box is $|x_1|\le1$, $|x_2|\le1$, corresponding to 35–45 degrees in each zone. A candidate fixed controller has already been substituted into a linear minute-sampled model.
Assume this map is exact inside the operating box, there is no disturbance for the initial calculation, and the equilibrium really is $(40,40)$ degrees. These assumptions make the example an analysis of a proposed closed loop, not a procedure for identifying its coefficients. The practical question is whether a specified family of initial temperatures stays inside the box while approaching equilibrium.
Use the quadratic energy $V(x)=x^\top Px$ with the proposed storage matrix $P=I$. Here $I$ is the two-dimensional identity. A positive definite storage weights directions in state space; it is not physical heat energy unless a separate physical derivation supplies that interpretation. We need its decrease, rather than that extra interpretation, for this decision.
Worked decision, with its limits
Form the residual. The Lyapunov inequality is $A^\top PA-P\prec0$. With $P=I$, multiplication gives
The two eigenvalues of $Q$ are approximately 0.419656 and 0.710344, both positive. Therefore the energy decreases for every nonzero vector, rather than only for a plotted trajectory. Equivalently, the largest eigenvalue of the symmetric positive definite $A$ is $q=0.761803$, so $\|Ax\|_2\le q\|x\|_2$. This establishes a contraction in the chosen Euclidean norm.
Connect energy to temperatures. If $V(x)\le1$, then each coordinate satisfies $|x_i|\le\|x\|_2\le1$. Thus the unit disk lies inside the physical operating box. Its invariance follows because $V$ decreases. The model was assumed only inside the box, but the induction remains valid: the initial state lies in the disk, the model maps it back into the disk, and the same assumption applies again.
Check one starting condition. At $x_0=(0.6,-0.8)$, the temperatures are $(43,36)$ degrees and $V(x_0)=1$. The next state is $(0.28,-0.50)$, giving temperatures $(41.4,37.5)$ and energy $0.28^2+0.50^2=0.3284$. The specific decrease exceeds the uniform guarantee because this vector is not aligned with the slowest contracting direction.
Read the limitation. The disk is a sufficient certified region. A corner such as $(1,-1)$ lies in the permitted box but outside this disk because its energy is 2. That does not mean it is unsafe; the certificate simply does not cover that starting point. To enlarge the region one could seek a different $P$ and prove its ellipsoid remains inside the box. Stability alone never supplies that containment argument.
A tempting wrong approach
Checking only $0.6\lt1$ and $0.7\lt1$ treats the sensors as independent scalar loops. Off-diagonal terms can defeat that reasoning: replacing both off-diagonal entries by 0.6 creates a symmetric matrix with a largest eigenvalue above 1. The original residual tests the complete map, including heat transferred between zones. Similarly, requiring every entry of $Q$ to be positive would reject a valid certificate because its off-diagonal entries are negative.
Transfer the argument
Exercise 2.B1 — Medium: Certify a rectangular startup specification
The startup procedure guarantees $|x_i|\le0.7$. Show that every allowed startup is covered by the disk certificate. Give a uniform coordinate bound at startup and after one update.
Review: Lyapunov matrix inequalities.
Show hint
Bound $V$ over the box, then apply the induced-norm contraction to its largest possible radius.
Show worked solution
The largest startup energy is $2(0.7)^2=0.98\le1$. Thus every startup lies in the invariant disk. The energy argument alone gives each coordinate magnitude at most $\sqrt{0.98}\approx0.989949$, and after one update at most $q\sqrt{0.98}\approx0.754147$. The original startup specification gives the sharper initial bound 0.7; the norm argument is deliberately uniform over subsequent directions. Convert a coordinate bound to degrees by multiplying by 5.
Exercise 2.B2 — Hard: Replace convergence by a disturbance tube
Now assume $x_{t+1}=Ax_t+w_t$ with $\|w_t\|_2\le0.05$ every minute. Derive an invariant Euclidean radius and decide whether the unit disk remains invariant. Can every trajectory still converge to zero?
Review: Storage and gain bounds.
Show hint
Use $\|Ax+w\|_2\le q\|x\|_2+0.05$. Consider a constant disturbance along a unit eigenvector for $q$.
Show worked solution
A radius $R$ is invariant when $qR+0.05\le R$, hence $R\ge0.05/(1-q)\approx0.209911$. The unit disk also satisfies the condition because $q+0.05\approx0.811803\le1$. Repeatedly applying the scalar inequality yields $\|x_t\|_2\le q^t\|x_0\|_2+0.05(1-q^t)/(1-q)$. A constant disturbance $0.05v$ along the slow eigenvector $v$ produces the nonzero equilibrium $Rv$. Thus the valid statement is an ultimate bound, with zero convergence only under additional assumptions on the disturbance.
Synthesis and bridge
An LMI is useful when its matrix inequality closes the whole decision chain: decrease of storage, an invariant sublevel set, containment in physical limits, and applicability of the model on that set. Numerical feasibility is evidence for only one link. The calculation also shows how the same storage can answer a revised commissioning request after disturbances are introduced.
Next, imagine the heat-transfer residual is learned rather than exactly known. A small posterior variance does not automatically replace the disturbance assumption. The GP toolkit explains which extra assumptions turn a statistical model into an error envelope usable in this kind of set argument.
Exercises
Graded practice — Build the argument yourself
There are 12 new problems: four Easy, four Medium, and four Hard. Start with the level that lets you make progress without opening the solution. Easy problems rebuild individual operations; Medium problems combine them; Hard problems ask for proofs, boundary cases, and the limits of a guarantee. The required concepts are explained on this page or in the linked earlier material.
Easy — Warm up one skill at a time.
Exercise 2.P1 — Easy: KKT with one active constraint
Minimize $(x-2)^2$ over $x\le1$. Write the Lagrangian with constraint $x-1\le0$, and find the optimum and multiplier using stationarity, feasibility and complementary slackness.
Review if needed: Primer B: constrained optimization. Apply here: this module's explanation.
Show hint
The unconstrained minimizer is excluded, so check the endpoint $x=1$.
Show worked solution
The Lagrangian is $L(x,\lambda)=(x-2)^2+\lambda(x-1)$ with $\lambda\ge0$. Stationarity is $2(x-2)+\lambda=0$. The feasible point closest to 2 is $x^\star=1$, with value 1; substituting gives $\lambda^\star=2$.
Primal feasibility holds at equality, dual feasibility holds because $2\ge0$, and complementary slackness is $2(1-1)=0$. The objective is convex and the constraint affine; a strictly feasible point is $x=0$. Thus the KKT conditions certify a global optimum. The nonzero price reflects that relaxing the bound lets the objective improve.
Exercise 2.P2 — Easy: Positive entries do not mean PSD
Compare $A=\begin{bmatrix}2&1\\1&2\end{bmatrix}$ and $B=\begin{bmatrix}1&2\\2&1\end{bmatrix}$. Compute their eigenvalues and identify which is PSD. Find one vector exposing the negative direction of the other.
Review if needed: Primer A: positive semidefiniteness. Apply here: this module's explanation.
Show hint
For equal diagonal entries, $(1,1)$ and $(1,-1)$ are eigenvectors.
Show worked solution
For $A$, those directions have eigenvalues $2+1=3$ and $2-1=1$, both positive, so $A\succ0$. For $B$, the eigenvalues are $1+2=3$ and $1-2=-1$, so $B$ is indefinite despite all entries being positive.
Take $v=(1,-1)^\top$. Then $Bv=-v$ and $v^\top Bv=-v^\top v=-2\lt0$. PSD means the quadratic form is nonnegative in every direction. It is a matrix-order condition, not an entrywise sign check.
Exercise 2.P3 — Easy: First Schur-complement calculation
Find all real $t$ for which $M(t)=\begin{bmatrix}t&2\\2&1\end{bmatrix}\succeq0$. When is it positive definite?
Review if needed: Primer A: block matrices. Apply here: this module's explanation.
Show hint
Use the bottom-right block 1, which is strictly positive.
Show worked solution
The Schur complement of the bottom-right entry is $t-2(1^{-1})2=t-4$. Since that corner is positive, $M(t)\succeq0$ exactly when $t-4\ge0$, or $t\ge4$. Strict positive definiteness requires $t\gt4$.
At $t=4$, the matrix is $vv^\top$ for $v=(2,1)^\top$: it is PSD but singular. The vector $(1,-2)^\top$ lies in its nullspace. Checking this boundary case helps keep semidefinite and definite conclusions separate.
Exercise 2.P4 — Easy: Read a scalar sector constraint
Let $y=\max\{0,x\}$. Verify $y(x-y)\ge0$ separately for $x\ge0$ and $x\lt0$. Write the inequality as a quadratic form in $z=(x,y)^\top$.
Review if needed: Primer E: ReLU activation. Apply here: this module's explanation.
Show hint
For ReLU the product is zero in both cases; the cross term of $z^\top Qz$ is twice the off-diagonal entry.
Show worked solution
If $x\ge0$, then $y=x$, so $y(x-y)=x\cdot0=0$. If $x\lt0$, then $y=0$ and the product is again zero. Hence ReLU obeys the sector inequality.
The quadratic constraint also admits many pairs that are not on the ReLU graph, such as $(x,y)=(2,1)$. Certificates built only from it deliberately cover a larger set of input-output pairs.
Medium — Combine definitions and compute a certificate.
Exercise 2.P5 — Medium: A scalar Lyapunov LMI
For $x_{t+1}=0.8x_t$, find $P\gt0$ satisfying $0.8^2P-P=-1$. Show how the result proves decrease of $V(x)=Px^2$. Would any $P\gt0$ work for the strict decrease inequality?
Review if needed: Primer D: Lyapunov decrease. Apply here: this module's explanation.
Show hint
Solve $-0.36P=-1$, then separate the normalization from the sign condition.
Show worked solution
The normalized equation gives $P=1/0.36=25/9\approx2.77778$. Along the system, $V(x_{t+1})-V(x_t)=(0.64-1)Px_t^2=-x_t^2$, strictly negative for $x_t\ne0$. Since $P\gt0$, $V$ is positive definite and certifies asymptotic stability.
Every $P\gt0$ satisfies the strict inequality because $-0.36P\lt0$. The equation with right-hand side $-1$ chooses one scale for the certificate; stability depends on the sign, not that normalization. For an unstable scalar factor 1.1, the coefficient becomes $+0.21$, and no positive $P$ can give decrease.
Exercise 2.P6 — Medium: An S-procedure certificate on an interval
Prove that $1-x^2\ge0$ implies $2-x^2\ge0$ using a nonnegative multiplier $\tau$ and a globally nonnegative residual. Then find every $\tau\ge0$ for which the residual works.
Review if needed: Primer 0: implications. Apply here: this module's explanation.
Show hint
Expand $(2-x^2)-\tau(1-x^2)$ and require its constant and quadratic coefficients to be nonnegative.
Show worked solution
The residual is $(2-\tau)+(\tau-1)x^2$. It is nonnegative for every real $x$ exactly when $2-\tau\ge0$ and $\tau-1\ge0$, hence $1\le\tau\le2$. For instance, $\tau=1$ leaves the constant 1.
At a point where $1-x^2\ge0$, write $2-x^2=[(2-x^2)-\tau(1-x^2)]+\tau(1-x^2)$. Both terms are nonnegative, so the implication follows. This direction uses only the displayed certificate; the converse supplied by the S-lemma requires its additional strict-feasibility assumption.
Exercise 2.P7 — Medium: Lift a quadratic epigraph into an LMI
For $x=(x_1,x_2)^\top$ and scalar $t$, express $x_1^2+x_2^2\le t$ as an LMI with an identity block. Verify the least feasible $t$ when $x=(3,4)^\top$.
Review if needed: Primer B: convex sets and epigraphs. Apply here: this module's explanation.
Show hint
Put $t$ in the top-left corner and $x$ in the off-diagonal blocks.
Show worked solution
The bottom-right block is $I_2\succ0$, so the Schur complement gives $t-x^\top I_2^{-1}x=t-x_1^2-x_2^2\ge0$. The larger matrix is affine in all three unknowns, even though the original inequality contains squares.
For $(3,4)$, $x^\top x=9+16=25$, so the least feasible value is $t=25$. At equality the block matrix is singular; requiring it to be positive definite would impose the stricter condition $t\gt25$.
Exercise 2.P8 — Medium: Turn energy bookkeeping into a gain bound
A discrete-time system obeys $V_{t+1}-V_t\le4w_t^2-z_t^2$, with $V_t\ge0$ and $V_0=0$. Derive a finite-horizon bound between input and output energies. If $\sum_{t=0}^{T-1}w_t^2=3$, what output-energy bound follows?
Review if needed: Primer D: signal energy and gain. Apply here: this module's explanation.
Show hint
Sum the storage differences; the intermediate terms telescope.
Show worked solution
Summing from $t=0$ to $T-1$ gives $V_T-V_0\le4\sum w_t^2-\sum z_t^2$. Rearranging and using $V_0=0$, $V_T\ge0$ yields $\sum z_t^2\le4\sum w_t^2-V_T\le4\sum w_t^2$.
The output energy is therefore at most $4(3)=12$. Taking square roots gives a signal-norm gain bound of 2, not 4. With nonzero initial storage the bound would instead contain $+V_0$, representing energy initially present in the system. An infinite-horizon statement follows by taking limits when the input has finite total energy.
Hard — Explain why the argument works and where it stops.
Exercise 2.P9 — Hard: Compute the whole dual function
For the first practice problem, compute $g(\lambda)=\inf_{x\in\mathbb R}[(x-2)^2+\lambda(x-1)]$ for $\lambda\ge0$. Maximize it and compare with the constrained primal value.
Review if needed: Primer B: derivatives and minimizers. Apply here: this module's explanation.
Show hint
Complete the square in $x$, or substitute the stationary point $x=2-\lambda/2$.
Show worked solution
The squared term has infimum zero, attained at $x=2-\lambda/2$. The dual function is a concave parabola. Its derivative is $1-\lambda/2$, so its maximum on $\lambda\ge0$ occurs at $\lambda=2$, with $g(2)=1$.
The primal optimum is also 1 at $x=1$, giving zero gap and primal recovery. For any other nonnegative $\lambda$, $1-g(\lambda)=(\lambda-2)^2/4\ge0$: every price supplies a valid lower bound, while the best price makes it exact.
Exercise 2.P10 — Hard: A singular corner needs a range check
For real numbers $a,b$, characterize when $\begin{bmatrix}a&b\\b&0\end{bmatrix}\succeq0$. Explain why replacing the inverse of the zero corner by zero would give an incomplete test.
Review if needed: Primer A: PSD quadratic forms. Apply here: this module's explanation.
Show hint
Test the quadratic form on $(1,t)^\top$ for arbitrary $t$.
Show worked solution
The quadratic form at $(1,t)^\top$ is $a+2bt$. If $b\ne0$, choosing $t$ with the opposite sign and sufficiently large magnitude makes it negative. Therefore PSD forces $b=0$. Once $b=0$, the matrix is PSD exactly when $a\ge0$.
Using a pseudoinverse of the zero corner gives only the condition $a\ge0$ and misses the necessary $b=0$. The general semidefinite Schur-complement rule needs a range condition in addition to the pseudoinverse. The definite-corner version avoids this issue because an invertible corner has the entire space as its range.
Exercise 2.P11 — Hard: Compose a slope bound with weights
Let $F(x)=3\varphi(2x+1)-4$, where $\varphi$ is slope-restricted in $[0,1]$, meaning $0\le[\varphi(a)-\varphi(b)]/(a-b)\le1$ for $a\ne b$. Prove that $F$ is 6-Lipschitz and its squared-gain bound is $\rho=36$. Is the bound attained for ReLU?
Review if needed: Primer B: Lipschitz continuity. Apply here: this module's explanation.
Show hint
Biases cancel in differences. Apply the slope bound to the two hidden inputs, then multiply by the output weight.
Show worked solution
Slope restriction implies $|\varphi(a)-\varphi(b)|\le|a-b|$. Hence $|F(x)-F(y)|=3|\varphi(2x+1)-\varphi(2y+1)|\le3|2x-2y|=6|x-y|$. Squaring gives $|F(x)-F(y)|^2\le36|x-y|^2$, so the page's squared convention is $\rho=36$.
For ReLU, choose two distinct inputs $x,y\gt-1/2$. Both hidden inputs are positive, and $F(x)-F(y)=6(x-y)$, so the ratio is exactly 6 and no smaller global Lipschitz constant works. A certificate that reports $\rho=36$ must be square-rooted before being read as a norm gain.
Exercise 2.P12 — Hard: A feasible certificate can be conservative
Consider $A=\begin{bmatrix}0.5&2\\0&0.5\end{bmatrix}$. Show that the system is Schur stable but $P=I$ fails the Lyapunov decrease test. Solve $A^\top PA-P=-I$ for symmetric $P=\begin{bmatrix}p&q\\q&r\end{bmatrix}$ and check $P\succ0$.
Review if needed: Primer D: eigenvalues and discrete-time stability. Apply here: this module's explanation.
Show hint
The diagonal entries give the eigenvalues. Match the three independent entries of the Stein equation in order $p,q,r$.
Show worked solution
The eigenvalues are both 0.5, so the system is stable. Yet $A^\top A-I=\begin{bmatrix}-0.75&1\\1&3.25\end{bmatrix}$ has a positive quadratic form on $(0,1)^\top$, so Euclidean energy need not decrease at every step.
Matching entries of the equation gives $-3p/4=-1$, $p-3q/4=0$, and $4p+2q-3r/4=-1$. Thus $p=4/3$, $q=16/9$, and $r=356/27$. The first principal minor is positive and the determinant is $1168/81\gt0$, hence $P\succ0$.
The resulting weighted energy decreases by $\|x\|_2^2$ each step. Failing one chosen certificate, $P=I$, does not prove instability; one must distinguish failure of a particular candidate from infeasibility of the entire LMI.
Further practice — Original problems and research connections
The original exercises below retain their numbering. Some compare later methods or ask for longer research derivations; use the graded set above first, and return to a research-connection problem after reading the relevant linked module.
Key Papers
| Paper | Venue | Contribution | Why read it |
|---|---|---|---|
| Boyd, El Ghaoui, Feron & Balakrishnan — Linear Matrix Inequalities in System and Control Theory | SIAM Studies in Applied Mathematics 15, 1994 | The book that defined the toolbox: Schur complements, S-procedure, Lyapunov, Riccati and bounded-real LMIs, interior-point solution. | Free PDF. Chapter 2 for LMIs, interior-point methods, elimination and the S-procedure; the later chapters catalogue the classical control LMIs (Lyapunov, Lur'e systems, IQCs, synthesis) behind Modules 11–14. |
| Boyd & Vandenberghe — Convex Optimization | Cambridge University Press, 2004 | Lagrangian duality, KKT, Slater, sensitivity, SDPs and interior-point methods. | Chapter 5 is the source of Section 1; Sections 5.1–5.6 in one sitting. |
| Pólik & Terlaky — A Survey of the S-Lemma | SIAM Review 49(3):371–418, 2007 | Complete account of the S-lemma: several proofs (including via Dines), extensions, and where it fails with two or more constraints. | The reference to open before believing any "the S-procedure is lossless here" claim. |
| Dines — On the mapping of quadratic forms | Bull. AMS 47(6):494–498, 1941 | The joint range of two real quadratic forms is a convex cone. | A five-page note; the classical fact that makes the S-lemma proof a separation argument. |
| Willems — Dissipative dynamical systems part I: General theory | Arch. Rational Mech. Anal. 45(5):321–351, 1972 | Storage functions, supply rates, available storage and required supply. | The origin of the vocabulary of Section 6 and of every "storage matrix" in LipKernel. |
| Rantzer — On the Kalman–Yakubovich–Popov lemma | Systems & Control Letters 28(1):7–10, 1996 | A short, complete proof of the KYP lemma with the controllability condition made explicit. | Four pages, including the hard direction that Section 6 only sketches. |
| Megretski & Rantzer — System analysis via integral quadratic constraints | IEEE TAC 42(6):819–830, 1997 | Unifies small-gain, passivity, circle/Popov and multiplier criteria as IQCs; stability theorem by homotopy. | The robust-control foundation of every IQC-based neural-network certificate. |
| Scherer — Dissipativity and Integral Quadratic Constraints: Tailored Computational Robustness Tests for Complex Interconnections | IEEE Control Systems Magazine 42(3):115–139, 2022 | Tutorial: factorised multipliers $\Pi=\Psi^{*}P\Psi$, hard and soft IQCs, LMI tests through dissipativity plus the S-procedure. | Read before Module 14; it is the machinery Pauli, Gramlich and Scherer use for NN loops and 2-D systems. |
| Fazlyab, Robey, Hassani, Morari & Pappas — Efficient and Accurate Estimation of Lipschitz Constants for Deep Neural Networks (LipSDP) | NeurIPS 2019 | Slope restriction as an incremental QC, S-procedure with diagonal multipliers, Lipschitz estimation as an SDP. | The destination of the walkthrough. Use the current arXiv version, which keeps only diagonal $T$. |
| Pauli, Koch, Berberich, Kohler & Allgöwer — Training robust neural networks using Lipschitz bounds | IEEE L-CSS 6:121–126, 2022 (also ACC 2021) | Counterexample to coupled multipliers; Schur-complemented training LMI with fixed $T$ and $\alpha=0$; ADMM training. | Step 6 of the walkthrough and the diagonal-multiplier caveat, from the paper that established it. |
| Paternain, Chamon, Calvo-Fullana & Ribeiro — Constrained Reinforcement Learning Has Zero Duality Gap | NeurIPS 2019 | Zero duality gap for CMDPs under Slater, via concavity of the perturbation function on the convex set of occupancy measures. | The destination of Section 1: the geometric picture of the duality gap, made rigorous for a non-convex problem. |
| Yin, Seiler & Arcak — Stability Analysis Using Quadratic Constraints for Systems With Neural Network Controllers | IEEE TAC 67(4):1980–1987, 2022 | Lyapunov function plus local sector QCs plus a Schur-complement LMI for the region of attraction of an LTI plant with an NN controller. | Sections 3(a) and 5 in action on a real closed loop; the template Module 14 extends. |
| Pauli, Wang, Manchester & Allgöwer — LipKernel: Lipschitz-Bounded Convolutional Neural Networks via Dissipative Layers | Automatica 188 (2026) 112959 | Layer-wise incremental dissipativity with interface matrices; telescoping yields Lipschitz-by-design CNNs with fast inference. | The composition theorem of Section 6 used at scale; note its $\rho$ is the constant, not its square. |