Formula sheet: everything to have cold
The Summary cards of all six modules on one page, plus the sign conventions and the trap checklist. Read it aloud tomorrow morning; copy what you can't recall onto your handwritten sheet. Print with Ctrl+P (answers and buttons are hidden in print).
Sign conventions (as the professor writes them)
| Where | His form | Consequence |
|---|---|---|
| General KKT (Ch 6–7) | Constraints $h(x)=0$, $g(x)\le0$; $L=f+\lambda^Th+\mu^Tg$ | $\mu\ge0$, $\lambda$ free, $\mu_jg_j=0$. Rewrite every constraint into this form first. |
| LP (Ch 7 notes) | $\min c^Tx$, $Ax=b$, $x\ge0$; $h(x)=b-Ax$, $g(x)=-x\le0$; $L=c^Tx+\lambda^T(b-Ax)-\mu^Tx$ | KKT: $A^T\lambda+\mu=c$, $\mu\ge0$, $\mu^Tx=0$. Dual: $\max b^T\lambda$ s.t. $A^T\lambda\le c$ ($\lambda$ free). |
| LP inequality rows | Write each as $g_i\le0$ in the course form: a $\ge$ row as $b_i-a_i^Tx\le0$, a $\le$ row as $a_i^Tx-b_i\le0$, each with its own $\mu_i\ge0$ | Every inequality price is $\ge0$; only equality prices are free. |
| LP (Ch 8 simplex) | Same as Ch 7: $\lambda=B^{-T}c_B$, reduced costs $\mu_N=c_N-N^T\lambda$ | Optimal basis iff $\mu_N\ge0$. |
| QP (Ch 9 notes) | $f=\tfrac12x^TQx-c^Tx$; $L=f+\lambda^T(Ax-b)$ | KKT: $Qx-c+A^T\lambda=0$, $Ax=b$, i.e. $\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}\begin{bmatrix}x\\\lambda\end{bmatrix}=\begin{bmatrix}c\\b\end{bmatrix}$. Gradient $g_k=Qx_k-c$. |
| ADMM (Ch 10) | $A(x_1,x_2)=A_1x_1+A_2x_2-b$; $L_A=f_1+f_2+\lambda^TA+\tfrac{\beta}{2}\|A\|^2$ | $\lambda\leftarrow\lambda+\beta A(x_1^{(k+1)},x_2^{(k+1)})$. |
If you (or a question) write an equality the other way round, e.g. $\lambda^T(Ax-b)$ in an LP: only the sign of that $\lambda$ flips. $x^*$, $p^*$, $d^*$ and the inequality prices $\mu$ don't change. Always state which form you're using in an answer.
M1 · ADMM, from zero open module →
- Problem: $\min f_1(x_1)+f_2(x_2)$ s.t. $A(x_1,x_2)=A_1x_1+A_2x_2-b=0$. Each piece gets its own copy; only the constraint links them.
- Augmented Lagrangian ($\beta>0$ fixed): $L_A=f_1(x_1)+f_2(x_2)+\lambda^TA(x_1,x_2)+\frac{\beta}{2}\|A(x_1,x_2)\|^2$ (price + penalty).
- One round: $x_1^{(k+1)}=\arg\min L_A(\cdot,x_2^{(k)},\lambda^{(k)})$; $x_2^{(k+1)}=\arg\min L_A(x_1^{(k+1)},\cdot,\lambda^{(k)})$; $\lambda^{(k+1)}=\lambda^{(k)}+\beta A(x_1^{(k+1)},x_2^{(k+1)})$. New $x_1$, old $\lambda$ in step 2.
- Completing the square: $\lambda^T(z-c)+\frac{\beta}{2}\|z-c\|^2=\frac{\beta}{2}\|z-(c-\lambda/\beta)\|^2+$ const. With $\lambda^T(c-z)$ the centre is $c+\lambda/\beta$.
- Soft threshold: $\arg\min_z\gamma|z|+\frac{\beta}{2}(z-y)^2=S_{\gamma/\beta}(y)$, $S_\tau(t)=\operatorname{sign}(t)\max(|t|-\tau,0)$.
- Indicator → projection: $\arg\min_v P_C(v)+\frac{\beta}{2}\|v-y\|^2=\Pi_C(y)$; box = clip, orthant = $\max(y_i,0)$.
- LASSO ($\frac12\|Mx-b\|^2+\gamma\|x\|_1$, split $x_1=x_2$): $(M^TM+\beta I)x_1=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}$; $x_2=S_{\gamma/\beta}(x_1^{(k+1)}+\lambda^{(k)}/\beta)$; $\lambda\leftarrow\lambda+\beta(x_1-x_2)$.
- Example 2 ($\|Mx-b\|^2$ with no ½, $+\gamma\|x\|_1+P_C(x)$; two copies $u,v$; prices $\lambda_u,\lambda_v$): with $a_k=u^{(k)}-\lambda_u^{(k)}/\beta$, $c_k=v^{(k)}-\lambda_v^{(k)}/\beta$: $(M^TM+\beta I)x_1^{(k+1)}=M^Tb+\frac{\beta}{2}(a_k+c_k)$; with $y_u=x_1^{(k+1)}+\lambda_u^{(k)}/\beta$, $y_v=x_1^{(k+1)}+\lambda_v^{(k)}/\beta$: $u=S_{\gamma/\beta}(y_u)$, $v=\Pi_C(y_v)$; then $\lambda_u\mathrel{+}=\beta(x_1-u)$, $\lambda_v\mathrel{+}=\beta(x_1-v)$.
- Price update sign: $\lambda\leftarrow\lambda+\beta\times$(whatever $\lambda$ multiplies in $L_A$).
M2 · Constrained optimality (KKT), from zero open module →
Symbols: $f$ objective; $h_i=0$ ($i=1..m$) equalities; $g_j\le0$ ($j=1..p$) inequalities; $\Omega$ feasible set; $x^\star$ the point tested; $\mathcal A=\{j:g_j(x^\star)=0\}$ active set; $\lambda$ equality multipliers (free), $\mu$ inequality multipliers ($\ge0$); $d$ a direction; $\theta_i,q_i$ eigenvalues/unit eigenvectors of $Q$.
- Problem form: $\min f(x)$ s.t. $h_i(x)=0$, $g_j(x)\le0$. Rewrite first: $x_1\ge0\to-x_1\le0$; $x^\top Qx\ge1\to1-x^\top Qx\le0$; $\max F\to\min -F$.
- Lagrangian: $\ell(x,\lambda,\mu)=f(x)+\sum_i\lambda_ih_i(x)+\sum_j\mu_jg_j(x)$ (plus signs; Midterm 2 calls it $L$).
- KKT (five parts): (1) $\nabla f+\sum\lambda_i\nabla h_i+\sum\mu_j\nabla g_j=0$; (2) $h=0$; (3) $g\le0$; (4) $\mu\ge0$; (5) $\mu_jg_j=0$ for every $j$. $\lambda$ has no sign. Inactive ⇒ $\mu_j=0$; $\mu_j\gt0$ ⇒ active; active does not force $\mu_j\gt0$.
- LICQ / regular point: gradients of all $h_i$ and all active $g_j$ linearly independent. KKT is necessary only at regular points; under LICQ the multipliers are unique.
- Cones: tangent $T_\Omega$: $d$ with $x^\star+t_kd_k\in\Omega$, $t_k\downarrow0$, $d_k\to d$. Linearised $\mathcal L_\Omega=\{d:\nabla h_i^\top d=0,\ \nabla g_j^\top d\le0\ (j\in\mathcal A)\}$. $T_\Omega\subseteq\mathcal L_\Omega$ always; equal if regular (sufficient, not necessary) or all constraints linear. Counterexamples: $uv=0$, $v^3=0$.
- Geometric FONC (no CQ): local min ⇒ $\nabla f(x^\star)^\top d\ge0$ for all $d\in T_\Omega(x^\star)$. A KKT point satisfies it without LICQ.
- Farkas: [$c^\top d\ge0$ whenever $A^\top d=0,\ B^\top d\le0$] ⇔ [$c+A\lambda+B\mu=0$ for some $\lambda$ free, $\mu\ge0$]. No rank assumption.
- Active split: $\mathcal A_+=\{j\in\mathcal A:\mu_j^\star\gt0\}$, $\mathcal A_0=\{j\in\mathcal A:\mu_j^\star=0\}$.
- Critical cone: $C=\{d:\ \nabla h_i^\top d=0\ \forall i,\ \nabla g_j^\top d=0\ (j\in\mathcal A_+),\ \nabla g_j^\top d\le0\ (j\in\mathcal A_0)\}=\{d\in\mathcal L_\Omega:\nabla f(x^\star)^\top d=0\}$.
- Hessian of the Lagrangian: $\mathbf L_\star=\nabla^2f+\sum\lambda_i^\star\nabla^2h_i+\sum\mu_j^\star\nabla^2g_j$ at $x^\star$, multipliers fixed. Never $\nabla^2 f$ alone with curved constraints.
- SONC ($C^2$, local min, regular): $d^\top\mathbf L_\star d\ge0$ for all $d\in C$. Fails at a regular KKT point ⇒ not a local min.
- SOSC ($C^2$, KKT holds, no LICQ needed): $d^\top\mathbf L_\star d\gt0$ for all $0\ne d\in C$ ⇒ strict local min. $C=\{0\}$ ⇒ SOSC holds. Indefinite $\mathbf L_\star$ on $\mathbb R^n$ is irrelevant.
- Ladder: rewrite → $\ell$ → five KKT parts → active-set guesses → solve → check signs/feasibility → LICQ → $\mathcal A_+/\mathcal A_0$ → $C$ → $\mathbf L_\star$ → test on $C$ → classify (local, then global).
- Eigenvector answers ($Q\succ0$, $0\lt\theta_1\lt\dots\lt\theta_n$): $\max x^\top x$ s.t. $x^\top Qx\le1$ → $1/\theta_1$ at $\pm q_1/\sqrt{\theta_1}$; $\min x^\top x$ s.t. $x^\top Qx\ge1$ (or $=1$) → $1/\theta_n$ at $\pm q_n/\sqrt{\theta_n}$; on $C=q_i^\perp$, writing $d=\sum_{j\ne i}\alpha_jq_j$: $d^\top\mathbf L_\star d=2\sum_{j\ne i}(1-\theta_j/\theta_i)\alpha_j^2$ for the min problem.
M3 · Convexity and duality, from zero open module →
Symbols: $x\in\mathbb{R}^n$ variable; $f$ cost; $h(x)=0$ equalities with prices $\lambda$ (free); $g(x)\le0$ inequalities with prices $\mu\ge0$; $p^*$ / $d^*$ = primal / dual optimal values; LP data $c\in\mathbb{R}^n$, $A\in\mathbb{R}^{m\times n}$, $b\in\mathbb{R}^m$, $a_i^T$ = row $i$ of $A$.
- Primal (always rewrite into this form first): $\min_x f(x)$ s.t. $h(x)=0$, $g(x)\le 0$. Lagrangian $L(x,\lambda,\mu)=f(x)+\lambda^Th(x)+\mu^Tg(x)$, $\lambda$ free, $\mu\ge 0$. (The notes write the multipliers as $y=(u,v)$, Quiz 4 as $\eta$; same thing.)
- Dual function $q(\lambda,\mu)=\inf_{x\in\mathbb{R}^n}L(x,\lambda,\mu)$: infimum over all $x$, constraints are not put back. Domain $\mathbb{D}=\{(\lambda,\mu):q\gt-\infty\}$. Dual problem: $\max q(\lambda,\mu)$ s.t. $(\lambda,\mu)\in\mathbb{D}$, $\mu\ge0$.
- Linear-in-$x$ rule: $\inf_x (r^Tx+\beta)=\beta$ if $r=0$, and $-\infty$ otherwise. ("The infimum is finite if and only if the coefficient of $x$ vanishes.")
- $q$ is concave and $\mathbb{D}$ is convex, even when the primal is nonconvex (because $L$ is affine in the multipliers).
- Weak duality: $x$ feasible, $\mu\ge0$ ⇒ $q(\lambda,\mu)\le L(x,\lambda,\mu)\le f(x)$. Hence $d^*\le p^*$. Equal values for a feasible pair ⇒ both optimal.
- Standard LP pair: $\ \min c^Tx$ s.t. $Ax=b,\ x\ge0\quad\Longleftrightarrow\quad \max b^T\lambda$ s.t. $A^T\lambda\le c$ ($\lambda$ free; derived with $h=b-Ax$).
- LP KKT: $A^T\lambda^*+\mu^*=c,\ \ \mu^*\ge0,\ \ Ax^*=b,\ \ x^*\ge0,\ \ (\mu^*)^Tx^*=0$. Value identity $c^Tx^*=b^T\lambda^*$.
- LP duality theorem: (i) one has an optimal solution ⇒ both do, equal values. (ii) one unbounded ⇒ the other infeasible. The converse of (ii) is FALSE: both can be infeasible ($A=[0]$, $b=1$, $c=-1$).
- KKT-equivalence (Thm 7.4.1), differentiable convex, full space: a KKT pair exists ⇔ $p^*=d^*\in\mathbb{R}$ and both are attained. Then every primal optimum with every dual optimum is a KKT pair.
- Slater (Thm 7.4.3): $f,g$ convex, $h$ affine, some $x^0$ with $h(x^0)=0$, $g(x^0)\lt 0$, and $p^*$ finite ⇒ $p^*=d^*$ and the dual optimum is attained. Primal attainment is NOT guaranteed ($e^x$, $x\le0$).
- Primal recovery (Cor 7.4.2): KKT pair exists, $\bar\eta=(\bar\lambda,\bar\mu)$ dual optimal, $L(\cdot,\bar\eta)$ has a unique minimiser $\bar x$ ⇒ $\bar x$ is the unique primal optimum (feasibility and complementary slackness come free). Uniqueness, not strict convexity, is the hypothesis.
- Convex problems: local min = global min; minimiser set convex; KKT ⇒ global min (no CQ); KKT not necessary without a CQ ($(x-1)^2$, $x^2\le0$).
- Convex feasible set from: $h(x)=0$ with $h$ affine; $g(x)\le0$ with $g$ convex; $g(x)\ge0$ with $g$ concave.
- Never write "concave optimization problem" or "concave set".
One price per row of $A$ and one dual constraint per variable $x_j$ (column $j$ of $A$). Dual objective $=\sum_{=,\ \ge}b_i\cdot\text{price}_i-\sum_{\le}b_i\mu_i$; $R_j$ = the same with $a_{ij}$ in place of $b_i$ (only $=$ rows: $R_j=(A^T\lambda)_j$).
| Primal ROW $i$ | → dual VARIABLE (enters as) | Primal VARIABLE $x_j$ | → dual CONSTRAINT $j$ |
|---|---|---|---|
| $a_i^Tx\ge b_i$ | $\mu_i\ge0$ ($+b_i\mu_i$) | $x_j\ge0$ | $R_j\le c_j$ |
| $a_i^Tx=b_i$ | $\lambda_i$ free ($+b_i\lambda_i$) | $x_j$ free | $R_j=c_j$ |
| $a_i^Tx\le b_i$ | $\mu_i\ge0$ ($-b_i\mu_i$) | $x_j\le0$ | $R_j\ge c_j$ |
The two halves are separate lookups (rows → prices; variables → dual constraints); the thick line divides them. Every inequality price is $\ge0$. Equality rows: this page writes them $b-Ax$ in LP work (flipping to $Ax-b$ flips those prices' signs). Books that attach a $\le$ row's price to $b_i-a_i^Tx$ show it as "$\le0$": that is $-\mu_i$, same dual value. Check: standard form ($=$ rows, $x\ge0$) gives $\lambda$ free, $A^T\lambda\le c$. A max primal: first rewrite as $\min(-c^Tx)$. $\max c^Tx$, $Ax\le b$, $x\ge0$ ↔ $\min b^Tw$, $A^Tw\ge c$, $w\ge0$.
M4 · LP (simplex concepts) and QP, from zero open module →
Symbols: LP in standard form $\min c^Tx$, $Ax=b$, $x\ge0$ ($A$ is $m\times n$, rank $m$, $a_j$ = column $j$). $B$/$N$ = basic/nonbasic columns, $x_B,x_N,c_B,c_N$ their parts; $\lambda$ = multipliers of $Ax=b$, $\mu$ = multipliers of $x\ge0$ ($\mu_N$ = reduced costs); $q$ = entering index, $u=B^{-1}a_q$, $d$ = direction, $\theta$ = step, $r$ = leaving row (in the ordered basis). QP: $f=\tfrac12x^TQx-c^Tx$, $Q=Q^T$; $Z$ = basis of $\ker A$, $x_p$ any point with $Ax_p=b$, $H_r=Z^TQZ$, $g_r=Z^T(Qx_p-c)$, $S=AQ^{-1}A^T$, $P$ = projector onto $\ker A$; inequality constraints $a_i^Tx\le b_i$ ($a_i$ = normal of constraint $i$), $W_k$ = working set, $g_k=Qx_k-c$, $p_k$ = direction, $\alpha_k$ = ratio bound, $A_W$ = matrix whose rows are the working normals.
- LP KKT (Lagrangian $c^Tx+\lambda^T(b-Ax)-\mu^Tx$): $\;A^T\lambda+\mu=c,\quad Ax=b,\ x\ge0,\quad \mu\ge0,\quad \mu^Tx=0.$ ($\lambda$ free.)
- Basis $A=[B\ N]$: $\bar x_B=B^{-1}b,\ \bar x_N=0$ (feasible iff $B^{-1}b\ge0$) · $\bar\lambda=B^{-T}c_B$ · $\bar\mu_B=0$ · $\bar\mu_N=c_N-N^T\bar\lambda$ (reduced costs = rate of cost change when raising that variable).
- Optimal if $\bar x_B\ge0$ and $\bar\mu_N\ge0$. Gap identity: $c^Tx'-c^T\bar x=\bar\mu_N^Tx'_N$ for every feasible $x'$.
- Step: pick $q$ with $\bar\mu_q\lt0$; $u=B^{-1}a_q$; direction $d_B=-u,\ d_q=1$ (so $Ad=0$, $c^Td=\bar\mu_q$).
- Ratio test: $\theta=\min_{i:\,u_i\gt0}(\bar x_B)_i/u_i$; cost change $=\theta\bar\mu_q$. Unbounded if $u\le0$ and $\bar\mu_q\lt0$. $\theta=0$ can only happen at a degenerate corner (some basic variable $=0$); it isn't guaranteed there.
- Theorems: extreme point $\Leftrightarrow$ BFS; feasible $\Rightarrow$ a BFS exists; optimum exists $\Rightarrow$ an optimal BFS exists. $\bar x$ is a BFS iff its positive-support columns are independent.
- Bland: enter = smallest index with $\bar\mu_j\lt0$; leave = smallest original index among ratio ties. New $B'$ nonsingular since $\det B'=u_r\det B$, $u_r\gt0$.
- Tableau: $\begin{bmatrix}I&B^{-1}N&B^{-1}b\\0&\bar\mu_N^T&-z_0\end{bmatrix}$: right column $\bar x_B$, column of $x_q$ = $u$, bottom row = reduced costs, corner = minus the cost.
- Equality QP KKT ($\ell=f+\lambda^T(Ax-b)$): $\;Qx-c+A^T\lambda=0,\ Ax=b$, i.e. $\underbrace{\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}}_{K}\begin{bmatrix}x\\\lambda\end{bmatrix}=\begin{bmatrix}c\\b\end{bmatrix}.$
- Why null(A): at a KKT point, $f(x^*+d)-f(x^*)=\tfrac12d^TQd$ for every $d\in\ker A$.
- Unique global minimiser $\iff H_r=Z^TQZ\succ0$ $\iff d^TQd\gt0$ for all $0\ne d\in\ker A$. Then $K$ is nonsingular. $Q$ need not be PD. $K$ nonsingular $\iff H_r$ nonsingular (not PD!).
- Null-space: $x=x_p+Zz$, $\ \phi(z)=f(x_p)+g_r^Tz+\tfrac12z^TH_rz$, $g_r=Z^T(Qx_p-c)$, solve $H_rz^*=-g_r$.
- Range-space (Schur), $Q$ nonsingular: $S=AQ^{-1}A^T$, $\ S\lambda=AQ^{-1}c-b$, $\ x=Q^{-1}(c-A^T\lambda)$. $Q\succ0\Rightarrow S\succ0$.
- Projector: $P=I-A^T(AA^T)^{-1}A=Z(Z^TZ)^{-1}Z^T$; $d_P=-P\nabla f$ gives $\nabla f^Td_P=-\|d_P\|^2$; $d_P=0\iff$ KKT stationarity. Projected CG: at most $n-m$ steps.
- Active set: $g_k=Qx_k-c$, $\ q_k(p)=g_k^Tp+\tfrac12p^TQp$ on $a_i^Tp=0\ (i\in W_k)$; compute $p_k$ from $\begin{bmatrix}Q&A_W^T\\A_W&0\end{bmatrix}\begin{bmatrix}p\\\lambda\end{bmatrix}=\begin{bmatrix}-g_k\\0\end{bmatrix}$ (if $p=0$, this $\lambda$ is the multiplier vector). If $p_k\ne0$: $g_k^Tp_k=-p_k^TQp_k\lt0$, $\ f(x_k+\alpha p_k)-f(x_k)=-\alpha(1-\tfrac\alpha2)p_k^TQp_k$.
- Ratio test: $\alpha_k=\min_{i\notin W_k,\ a_i^Tp_k\gt0}\dfrac{b_i-a_i^Tx_k}{a_i^Tp_k}$; step $=\min\{1,\alpha_k\}$; if $\alpha_k\le1$ add the blocker. If $p_k=0$: solve $g_k+\sum_{W_k}\lambda_ia_i=0$; all $\lambda_i\ge0\Rightarrow$ stop (global min if $Q\succeq0$); else drop the most negative.
M5 · Unconstrained algorithms, from zero: line search, gradient descent, Newton, CG open module →
Symbols: $x_k$ point, $g_k=\nabla f(x_k)$ gradient, $d_k$ direction, $\alpha_k$ step, $\phi(\alpha)=f(x_k+\alpha d_k)$, $f=\tfrac12x^TQx-b^Tx$ with $Q\succ0$, $x^*=Q^{-1}b$, $e_k=x_k-x^*$ (so $g_k=Qe_k$), eigenvalues $\lambda_{\min}\le\dots\le\lambda_{\max}$ of $Q$, $\kappa=\lambda_{\max}/\lambda_{\min}$, $H_k$ Hessian, $F(x_k)$ Hessian in non-quadratic CG, $B$ preconditioner, $\theta_k$ angle between $d_k$ and $-g_k$. $E=\|x-x^*\|_Q^2$ in Quiz 2; $E=\tfrac12\|x-x^*\|_Q^2=f-f^*$ in the Ch 3 notes.
- Template $x_{k+1}=x_k+\alpha_kd_k$. Descent direction: $g_k^Td_k\lt0$. Exact step on a quadratic along any $d_k$: $\alpha_k=-\dfrac{g_k^Td_k}{d_k^TQd_k}$; for $d_k=-g_k$: $\alpha_k=\dfrac{g_k^Tg_k}{g_k^TQg_k}$.
- $\phi'(0)=g_k^Td_k\lt0$. With $0\lt c_1\lt c_2\lt1$:
Armijo (not too long): $\phi(\alpha)\le\phi(0)+c_1\alpha\phi'(0)$.
Wolfe = Armijo + curvature (not too short) $\phi'(\alpha)\ge c_2\phi'(0)$.
Strong Wolfe = Armijo + $|\phi'(\alpha)|\le c_2|\phi'(0)|$.
Goldstein ($0\lt c\lt\tfrac12$): $\phi(0)+(1-c)\alpha\phi'(0)\le\phi(\alpha)\le\phi(0)+c\,\alpha\phi'(0)$.
Backtracking: try $\alpha=1,s,s^2,\dots$ ($0\lt s\lt1$), accept the first that passes Armijo.
Quadratic $\phi$ (Ex 2.3): Armijo $\alpha\le2(1-c_1)\alpha^*$; Wolfe $\alpha\ge(1-c_2)\alpha^*$; strong Wolfe $\alpha\le(1+c_2)\alpha^*$; Goldstein $[2c,\,2(1-c)]\alpha^*$. - Golden section: interior points at fraction $\rho=\frac{3-\sqrt5}{2}\approx0.382$ from each end; the bracket shrinks by $\frac{\sqrt5-1}{2}\approx0.618$ per new evaluation (one old point reused).
- 1-D Newton: $x_{k+1}=x_k-f'(x_k)/f''(x_k)$. Needs $f''\gt0$, and can still fail far away ($\sqrt{1+x^2}$: $x_{k+1}=-x_k^3$).
- Zoutendijk: Wolfe steps (strong Wolfe also fine) + $f$ bounded below + $\nabla f$ Lipschitz ⇒ $\sum_k\cos^2\theta_k\|g_k\|^2\lt\infty$, $\cos\theta_k=\frac{-g_k^Td_k}{\|g_k\|\|d_k\|}$. If $\cos\theta_k\ge\delta\gt0$ then $\|g_k\|\to0$. $d_k=-D_kg_k$ with eig$(D_k)\in[m,M]$ gives $\cos\theta_k\ge m/M$.
- Fixed step: $e_{k+1}=(I-\alpha Q)e_k$; the eigen-component along $q_i$ is multiplied by $(1-\alpha\lambda_i)$ each step.
- Converges from every $x_0$ ⇔ $|1-\alpha\lambda_i|\lt1\ \forall i$ ⇔ $\boxed{0\lt\alpha\lt 2/\lambda_{\max}}$. Best $\alpha=\dfrac{2}{\lambda_{\min}+\lambda_{\max}}$, worst-case factor $\dfrac{\kappa-1}{\kappa+1}$ on $\|e_k\|$.
- Multiplier $=-1$ ⇒ that component flips sign forever (2-cycle, constant $f$). $|{\cdot}|\gt1$ ⇒ diverges, unless $e_0$ has zero component in that eigen-direction.
- A gradient step with $\eta=1/\lambda$ kills the $\lambda$-component exactly ($1-\lambda/\lambda=0$).
- Exact line search SD: $g_{k+1}^Tg_k=0$ (zigzag); $f(x_{k+1})-f^*\le\left(\dfrac{\kappa-1}{\kappa+1}\right)^2(f(x_k)-f^*)$ (Kantorovich). If $g_0$ lives only in some eigen-directions, use the effective $\kappa$ over those only. One-step finish ⇔ $g_0$ is an eigenvector.
- Newton: $H_kp_k=-g_k$, $x_{k+1}=x_k+p_k$. One step on a quadratic with $Q\succ0$ lands on $x^*$. Quadratic convergence $\|e_{k+1}\|\le C\|e_k\|^2$ only for $x_0$ sufficiently close. Descent iff $H_k\succ0$ ($g_k^Tp_k=-p_k^TH_kp_k$). Damped Newton + Armijo ($c_1\lt\frac12$, start at $\alpha=1$) eventually accepts $\alpha=1$.
- $\|x\|^p/p$, $1\lt p\lt2$: $\nabla=\|x\|^{p-2}x$, not Lipschitz at 0; $r_{k+1}=r_k|1-\alpha r_k^{p-2}|$; $f$ rises for $r_k\lt(\alpha/2)^{1/(2-p)}$; converges only by an exact hit ($r=\alpha^{1/(2-p)}$); exact line search $\alpha_k=r_k^{2-p}$.
- Affine-sheet minimum ($f$ convex, directions = columns of $D$): $x_S$ minimises $f$ on $\bar x+\mathrm{range}(D)$ ⇔ $D^T\nabla f(x_S)=0$. The gradient of $h(z)=f(\bar x+Dz)$ is zero; the gradient of $f$ is only orthogonal to every $d_i$, not zero.
- Q-conjugate: $d_i^TQd_j=0$ ($i\ne j$) = perpendicular after rounding the bowl ($y=Q^{1/2}x$). Nonzero Q-conjugate vectors are linearly independent. Eigenvectors of $Q$ are both orthogonal and Q-conjugate.
- Key formula: $g_i=g_0+\sum_{j\lt i}\alpha_jQd_j$. With conjugate directions: $d_i^Tg_i=d_i^Tg_0$, $\alpha_i=\beta_i^*=-c_i/h_i$, and $g_k\perp d_0,\dots,d_{k-1}$ (expanding subspace).
- CG: $d_0=-g_0$; $\ \alpha_k=\dfrac{\|g_k\|^2}{d_k^TQd_k}$; $\ x_{k+1}=x_k+\alpha_kd_k$; $\ g_{k+1}=g_k+\alpha_kQd_k$; $\ \beta_k=\dfrac{\|g_{k+1}\|^2}{\|g_k\|^2}$; $\ d_{k+1}=-g_{k+1}+\beta_kd_k$.
- $g_k^Td_k=-\|g_k\|^2$. Gradients orthogonal ($g_i^Tg_j=0$), directions Q-conjugate ($d_i^TQd_j=0$). Never swap.
- $x_k$ minimises $f$ over $x_0+\mathrm{span}\{g_0,Qg_0,\dots,Q^{k-1}g_0\}$ (highest power $k-1$).
- CG steps to reach $x^*$ = number of distinct eigenvalues whose eigenspaces $e_0$ actually touches ($\le n$). Partial bound: $m$ outliers above $[a,b]$ ⇒ after $m+1$ steps $E$ shrinks by $\big(\frac{b-a}{b+a}\big)^2$.
- Decrease per step: $f(x_k)-f(x_{k+1})=\dfrac{\|g_k\|^4}{2\,d_k^TQd_k}$ (for $E=\|x-x^*\|_Q^2$ the decrease is twice that). $\|g_k\|$ may increase.
- PCG ($B\approx Q^{-1}$, SPD): $d_0=-Bg_0$, $\alpha_k=\dfrac{g_k^TBg_k}{d_k^TQd_k}$, $\beta_k=\dfrac{g_{k+1}^TBg_{k+1}}{g_k^TBg_k}$, $d_{k+1}=-Bg_{k+1}+\beta_kd_k$. Then $g_i^TBg_j=0$, $d_i^TQd_j=0$, $g_k^Td_k=-g_k^TBg_k$. $B\to cB$ changes nothing in $x_k$. Speed depends on eig$(B^{1/2}QB^{1/2})$. $f(x_k)$ still decreases; $\|g_k\|$ need not.
- Non-quadratic CG, four changes: (1) $\beta$ back to the original formula with $Q\to F(x_k)$; (2) $\beta_k=0$ if $d_k^TF(x_k)d_k\le0$; (3) $\alpha_k$ by a line search; (4) if $g_k^Td_k\ge0$, reset $d_k=-g_k$. FR + strong Wolfe ($c_2\lt\frac12$): $-\frac{1}{1-c_2}\le\frac{g_k^Td_k}{\|g_k\|^2}\le\frac{2c_2-1}{1-c_2}\lt0$.
M6 · Unconstrained optimality and convexity, from zero open module →
Symbols: $f:\mathbb R^n\to\mathbb R$ the cost; $x^*$ the point tested; $d$ a direction, $t$ a number; $\nabla f$ gradient (first partials), $\nabla^2 f$ Hessian (second partials); $S$ a symmetric matrix, $\lambda$ its eigenvalues; $\succeq0$ PSD ($d^\top Sd\ge0$ all $d$), $\succ0$ PD ($d^\top Sd\gt0$ all $d\ne0$); $Q,b$ data of a quadratic; $A,\bar b$ data of least squares; $P$ projector; $\theta\in[0,1]$ mixing weight; $r(h)=o(h^2)$ means $r(h)/h^2\to0$.
- Minima: local = beats all points within some radius $\delta\gt0$; strict = beats them strictly; global = beats all points.
- Weierstrass (coercive): $X$ nonempty closed; $f$ proper, lsc, coercive ($\|x\|\to\infty\Rightarrow f(x)\to+\infty$); $X\cap\text{dom}f\ne\emptyset$ ⇒ a minimiser exists (set nonempty, compact). Sufficient, not necessary.
- Line formulas: $\varphi(t)=f(x^*+td)$: $\varphi'(0)=\nabla f(x^*)^\top d$, $\ \varphi''(0)=d^\top\nabla^2f(x^*)\,d$. Taylor: $f(x^*+h)=f(x^*)+\nabla f(x^*)^\top h+\frac12h^\top\nabla^2f(x^*)h+o(\|h\|^2)$.
- FONC (necessary): local min, $f$ differentiable ⇒ $\nabla f(x^*)=0$.
SONC (necessary): local min, $f\in C^2$ ⇒ $\nabla f(x^*)=0$ and $\nabla^2f(x^*)\succeq0$.
SOSC (sufficient): $\nabla f(x^*)=0$ and $\nabla^2f(x^*)\succ0$ ⇒ strict local min. - The gaps: $x^4$ (strict min, $f''(0)=0$: SOSC not necessary); $x^3$ and $-x^4$ (FONC + SONC hold, not a min: not sufficient); $x_1^4+x_2^2$ (strict min, Hessian diag$(0,2)$); monkey saddle $x_1^3-3x_1x_2^2$ (Hessian 0; $t^3$ vs $-2t^3$).
- Group N $=\{\nabla f=0,\nabla^2f\succeq0\}$ necessary; Group S $=\{\nabla f=0,\nabla^2f\succ0\}$ sufficient. For quadratics both are "iff" (Group N ⇔ global min, Group S ⇔ unique min) because Taylor is exact.
- PD/PSD tests (symmetric $S$): PD ⇔ all $\lambda\gt0$ ⇔ all leading minors $\gt0$ (Sylvester). PSD ⇔ all $\lambda\ge0$ ⇔ all principal minors $\ge0$ (diag$(0,-1)$: leading minors $0,0$, not PSD). 2×2: det $\lt0$ ⇒ indefinite.
- Classify: Hessian PD → strict local min; ND → strict local max; indefinite → saddle; singular semidefinite → inconclusive. Then the global question separately.
- Peano: $f=(x_2-px_1^2)(x_2-qx_1^2)$, $0\lt p\lt q$: min at 0 along every line, but $f=(m-p)(m-q)x_1^4\lt0$ on $x_2=mx_1^2$, $p\lt m\lt q$ ⇒ not a local min.
- Quadratic $f=\frac12x^\top Qx-b^\top x$ ($Q=Q^\top$): $\nabla f=Qx-b$, $\nabla^2f=Q$. $Q\succ0$: unique min $Q^{-1}b$. $Q\succeq0$ singular: $b\in$ range$(Q)$ ⇒ infinitely many minima; $b\notin$ range$(Q)$ ⇒ none (unbounded below). Negative eigenvalue ⇒ unbounded below.
- Least squares $\frac12\|Ax-\bar b\|^2$: normal equations $A^\top Ax^*=A^\top\bar b$, always solvable (range$(A^\top A)$ = range$(A^\top)$). Unique ⇔ full column rank; then $x^*=(A^\top A)^{-1}A^\top\bar b$, $P=A(A^\top A)^{-1}A^\top$ ($P^2=P=P^\top$) projects onto range$(A)$, $I-P$ onto null$(A^\top)$; residual ⟂ columns.
- Convexity ($f\in C^2$ on $\mathbb R^n$): $f(\theta x+(1-\theta)y)\le\theta f(x)+(1-\theta)f(y)$ ⇔ $f(y)\ge f(x)+\nabla f(x)^\top(y-x)$ for all $x,y$ ⇔ $\nabla^2f(x)\succeq0$ for every $x$ ⇔ every restriction $f(x+td)$ is convex. SONC = PSD at one point; convexity = PSD everywhere.
- Convex payoffs: stationary ⇒ global min; local min ⇒ global min. Not given: existence ($e^x$), uniqueness ($(x_1+x_2)^2$). Max of convex is convex; log-sum-exp is convex (Hessian $\sigma_1\sigma_2\begin{bmatrix}1&-1\\-1&1\end{bmatrix}$, $\sigma_i=e^{x_i}/\sum e^{x_j}$), not strictly.
- Proof chain: $\frac{f(x+td)-f(x)}{t}\le f(y)-f(x)$ → ($t\downarrow0$) $\nabla f(x)^\top d\le f(y)-f(x)$ → swap: $f(y)-f(x)\le\nabla f(y)^\top d$ → $(\nabla f(y)-\nabla f(x))^\top(y-x)\ge0$ (with $d=y-x$).
Trap checklist (read the night before and in the morning)
- Rewrite constraints as $g\le0$, $h=0$ first; $L=f+\lambda^Th+\mu^Tg$, $\mu\ge0$, $\lambda$ free. Write all five KKT parts.
- $B^{-1}$ vs $B^{-T}$: $x_B=B^{-1}b$, $\lambda=B^{-T}c_B$. Ch 8 and Ch 9 write the LP/QP Lagrangian with opposite signs; say which you use.
- Energy/objective factor ½; ADMM data term with or without ½ changes the linear system.
- Necessary vs sufficient; strict vs non-strict; local vs global; PSD vs PD.
- SONC/SOSC are checked on the critical cone, not all of $\mathbb{R}^n$; an indefinite full Hessian can still pass SOSC; $C=\{0\}$ ⇒ SOSC holds. SOSC gives a strict local min.
- KKT is necessary only at regular points (LICQ); sufficiency needs no LICQ. Active constraint does not imply $\mu>0$.
- Convex problem: KKT ⇒ global min; KKT still not necessary without a CQ. Never say "concave optimization problem".
- Dual function: infimum over all $x$ (constraints are not put back); find where $q=-\infty$.
- Slater ⇒ zero gap + dual attainment (not primal). Primal recovery needs a unique Lagrangian minimiser (strict convexity is one sufficient condition).
- LP: one optimal ⇒ both optimal with equal values; unbounded ⇒ other infeasible; infeasible ⇏ unbounded.
- CG: gradients mutually orthogonal, directions mutually $Q$-conjugate (don't swap). Krylov span up to power $k-1$. PCG: $g_i^TBg_j=0$; $B\approx Q^{-1}$.
- GD on a quadratic: $0<\alpha<2/\lambda_{\max}$; best $\alpha=2/(\lambda_{\min}+\lambda_{\max})$.
- Simplex: degenerate BFS can give $\theta=0$. QP: $Q$ PD on $\ker A$ is enough; $Q$ need not be PD. Active-set step is $\min\{1,\alpha_k\}$.
- ADMM: $x_2$-step uses new $x_1$, old $\lambda$; threshold is $\gamma/\beta$; projection onto a box = clip.