Differentiation of Univariate Functions
Vector Calculus
The derivative f'(x) of a function f : mathbb{R} to mathbb{R} measures its instantaneous rate of change at x. Formally, f'(x) = lim_{h to 0} frac{f(x + h) - f(x)}{h}. Geometrically, it is the slope of the tangent line to the graph of f at the point (x, f(x)).
is the slope of the tangent line; the limit of difference quotients.
Pick an activation whose derivative is zero on too much of its domain (e.g. saturated sigmoid) and gradients vanish โ the network refuses to learn.
The derivative of a function measures its instantaneous rate of change at . Formally, . Geometrically, it is the slope of the tangent line to the graph of at the point .
A function is differentiable at if this limit exists. Differentiability implies continuity, but not conversely โ the absolute value is continuous everywhere but not differentiable at , where the graph has a sharp corner. More broadly, functions with kinks, cusps, or vertical tangents fail to be differentiable at those points.
A few derivative rules do most of the work: (power rule), , , , . Combined with linearity , the product rule , and the chain rule , you can differentiate almost any elementary function.
Derivatives are how we find extrema: at a local minimum or maximum of a smooth function, . The second derivative tells us the concavity โ positive means a local min (curving up), negative means a local max (curving down). This is the foundation of optimization.
In ML, univariate differentiation is everywhere: computing the derivative of a loss with respect to one scalar parameter, tuning a learning rate by analyzing how a scalar-valued update behaves, understanding activation functions like or ReLU via their (sub)derivatives. Before we can take gradients of complex neural networks, we need rock-solid comfort with 1D derivatives as the atomic building block.
ML connection โ derivative of the sigmoid at zero: Since and , at we get and . Far from zero, say at , so โ this tiny slope is exactly the vanishing-gradient pain that motivated ReLU.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.