A subdifferential of a f:Rn→(−∞,+∞]f:\mathbb{R}^n\to(-\infty,+\infty] at a point xx in its is the set

∂f(x)  =  {g∈Rn: f(z)≥f(x)+⟨g, z−x⟩ for all z∈Rn}.\partial f(x) \;=\; \bigl\{g\in\mathbb{R}^n:\ f(z)\ge f(x)+\langle g,\,z-x\rangle \text{ for all } z\in\mathbb{R}^n\bigr\}.

Any g∈∂f(x)g\in\partial f(x) is called a of ff at xx.

Geometrically, g∈∂f(x)g\in\partial f(x) encodes a to the epigraph of ff at (x,f(x))(x,f(x)), with normal determined by gg (compare ). If ff is differentiable at xx (in the sense of the / ), then ∂f(x)={∇f(x)}\partial f(x)=\{\nabla f(x)\}.

Examples
  • For f(x)=∣x∣f(x)=|x| on R\mathbb{R}, one has ∂f(0)=[−1,1]\partial f(0)=[-1,1] and ∂f(x)={sign(x)}\partial f(x)=\{\mathrm{sign}(x)\} for x≠0x\ne 0.
  • If f=δCf=\delta_C is the indicator of a closed convex set CC, then ∂f(x)\partial f(x) consists of outward normal vectors to CC at xx (and is empty if x∉Cx\notin C).