A subgradient of a ff at a point x∈dom⁡fx\in\operatorname{dom} f (see ) is a vector g∈Rng\in\mathbb{R}^n such that

f(y)≥f(x)+⟨g, y−x⟩for all y∈Rn.f(y)\ge f(x)+\langle g,\,y-x\rangle \quad \text{for all } y\in\mathbb{R}^n.

Subgradients generalize derivatives: when ff is differentiable at xx (see ), the unique subgradient is ∇f(x)\nabla f(x). The set of all subgradients at xx is the ∂f(x)\partial f(x), and each subgradient induces a to the epigraph of ff.

Examples
  • For f(x)=∣x∣f(x)=|x| on R\mathbb{R}, ∂f(0)=[−1,1]\partial f(0)=[-1,1], so any g∈[−1,1]g\in[-1,1] is a subgradient at 00.
  • For f(x)=max⁡{x,0}f(x)=\max\{x,0\} on R\mathbb{R}, ∂f(0)=[0,1]\partial f(0)=[0,1], while ∂f(x)={1}\partial f(x)=\{1\} for x>0x>0 and ∂f(x)={0}\partial f(x)=\{0\} for x<0x<0.