Derivatives
The instantaneous rate of change: slope, velocity, sensitivity. The single most used idea of calculus in computing.
8 topics
If you keep one idea from calculus, keep this one. A derivative answers "if I nudge the input, how much does the output move?" — and that question is everywhere in computing:
DERIVATIVE
├──► Optimization ──► Gradient descent ──► Machine learning ──► Deep learning
├──► Physics ──► Simulation (velocity, acceleration, forces)
├──► Graphics ──► Normals ──► Lighting
├──► Robotics ──► Motion (velocity kinematics, Jacobians)
└──► Control ──► Dynamical systems (the D in PID)
Real examples: every training step of a neural network computes millions of partial derivatives with the chain rule; a game engine integrates velocity (a derivative of position) sixty times a second; a renderer computes surface normals as derivatives of the surface; an edge detector looks for large derivatives of image intensity.
Topics
Derivative
is the instantaneous rate of change of at : the slope of the tangent line to the graph, defined as the limit of slopes of secant lines.
Differentiability and one-sided derivatives
A function is differentiable at when both one-sided derivatives exist and agree. Differentiable implies continuous, but not conversely: and are continuous with a kink at 0.
Differentiation rules
The derivative is linear, and there are rules for products and quotients. With the chain rule, they let you differentiate any formula mechanically — which is why computers can do it.
Derivatives of elementary functions
The table every differentiation engine starts from: powers, exponentials, logarithms, trigonometric and hyperbolic functions — and the activation functions built from them.
Chain rule
The derivative of a composition is the product of the derivatives: . Rates of change multiply along a chain — and backpropagation is this rule applied, very efficiently, to a neural network.
Implicit differentiation
Differentiating a relation without solving for : apply the chain rule to both sides and solve for . The slope of a circle, an ellipse or an elliptic curve at a point comes out this way.
Higher-order derivatives
is the rate of change of the rate of change: acceleration, curvature, concavity. Third derivative: jerk. Robots and cameras are tuned to keep these smooth.
Differential and linear approximation
Near , . The differential is that best linear approximation; it tells how an error in the input propagates to the output.
Where this area leads in computing
ℒ AI and machine learning ★★★★★
- Gradient descent★★★★★←Derivative
- Activation functions★★★★★←Differentiability and one-sided derivatives, Derivatives of elementary functions
- Automatic differentiation★★★★★←Derivative, Differentiation rules, Derivatives of elementary functions, Chain rule
- Backpropagation★★★★★←Chain rule
- Second-order (Hessian-based) optimization★★★★★←Higher-order derivatives
- Loss function★★★★★←Differentiability and one-sided derivatives