In mathematics, the subderivative, subgradient, and subdifferential generalize the derivative to functions which are not differentiable. The subdifferential of a function is set-valued. Subderivatives arise in convex analysis, the study of convex functions, often in connection to convex optimization.
Let f:I→R be a real-valued convex function defined on an open interval of the real line. Such a function need not be differentiable at all points: For example, the absolute value function f(x)=|x| is nondifferentiable when x=0. However, as seen in the picture on the right, for any x0 in the domain of the function one can draw a line which goes through the point (x0, f(x0)) and which is everywhere either touching or below the graph of f. The slope of such a line is called a subderivative (because the line is under the graph of f).
Rigorously, a subderivative of a convex function f:I→R at a point x0 in the open interval I is a real number c such that
for all x in I. One may show that the set of subderivatives at x0 for a convex function is a nonempty closed interval [a, b], where a and b are the one-sided limits
which are guaranteed to exist and satisfy a ≤ b.
The set [a, b] of all subderivatives is called the subdifferential of the function f at x0. If f is convex and its subdifferential at contains exactly one subderivative, then f is differentiable at .