In mathematics, the subderivative, subgradient, and subdifferential generalize the derivative to convex functions which are not necessarily differentiable. Subderivatives arise in convex analysis, the study of convex functions, often in connection to convex optimization.
Let 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 is non-differentiable when . However, as seen in the graph on the right (where in blue has non-differentiable kinks similar to the absolute value function), for any in the domain of the function one can draw a line which goes through the point and which is everywhere either touching or below the graph of f. The slope of such a line is called a subderivative.
Rigorously, a subderivative of a convex function at a point in the open interval is a real number such that
for all . By the converse of the mean value theorem, the set of subderivatives at for a convex function is a nonempty closed interval , where and are the one-sided limits
The set of all subderivatives is called the subdifferential of the function at , denoted by . If is convex, then its subdifferential at any point is non-empty. Moreover, if its subdifferential at contains exactly one subderivative, then and is differentiable at .
Consider the function which is convex. Then, the subdifferential at the origin is the interval . The subdifferential at any point is the singleton set , while the subdifferential at any point is the singleton set . This is similar to the sign function, but is not single-valued at , instead including all possible subderivatives.
A convex function is differentiable at if and only if the subdifferential is a singleton set, which is .
A point is a global minimum of a convex function if and only if zero is contained in the subdifferential. For instance, in the figure above, one may draw a horizontal "subtangent line" to the graph of at .