Solution (source code)

= Solution

For a <convex function> $f:\mathbb R^d\to\mathbb R$, its <subdifferential> at $x$ is
$$
\partial f(x)=\{g\in\mathbb R^d:f(y)\geq f(x)+g^T(y-x)\text{ for every }y\in\mathbb R^d\}.
$$
Its elements are the subgradients of $f$ at $x$.