= Subgradient optimality condition
{title2=$0\in\partial f(x)$}
For a <proper convex function> $f:\mathbb R^n\to\mathbb R\cup\{+\infty\}$ and $x\in\operatorname{dom}f$,
$$
x\text{ is a global minimizer}\quad\Longleftrightarrow\quad0\in\partial f(x).
$$
This is exactly the <subgradient inequality> with supporting vector zero: $f(y)\geq f(x)$ for every $y$.
If $f=g+h$, where $g:\mathbb R^n\to\mathbb R$ is <differentiable> and <convex> on all of $\mathbb R^n$ and $h$ is a <proper convex function>, the <subdifferential sum rule> yields
$$
0\in\nabla g(x)+\partial h(x).
$$
The full-domain smooth term supplies the regularity needed for this sum rule. For $f(x)=\tfrac12(x-v)^2+\lambda|x|$, with $\lambda>0$, the <subdifferential> of <absolute value> at zero is $[-1,1]$. Thus $x=0$ minimizes $f$ exactly when $|v|\leq\lambda$. Ordinary zero-<derivative> tests would miss this nondifferentiable minimizer.
Back to article page