= Derivative
{title2=$\frac{df}{dx}$}
{wiki}
The derivative measures the instantaneous rate at which a <function> changes. For a real <function> $f$ defined near $a$, it exists when the <difference quotient> has a finite two-sided <limit>:
$$
f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}h.
$$
The quotient is the <slope> of the <straight line> joining two nearby points of the graph. Its <limit> is the <slope> of the <tangent line>. Thus a <derivative> describes a local rate without choosing a particular finite measurement interval.
For $f(x)=x^2$, expanding the numerator gives
$$
\frac{(a+h)^2-a^2}h=2a+h,\qquad f'(a)=2a.
$$
At $a=1$, the increments $h=1$, $1/2$ and $1/10$ give <secant line> <slopes> $3$, $2.5$ and $2.1$. The <limit> is $2$, and the <tangent line> is $y=1+2(x-1)$. The picture makes the limiting process visible.
\Image[/derivative-secant-tangent.png]
{title=Secant lines to x squared approach its tangent line at x = 1}
The same calculation shows why the <derivative> is useful for approximation:
$$
f(a+h)=f(a)+f'(a)h+r(h),\qquad \frac{r(h)}h\longrightarrow0.
$$
This is a <local linear approximation>. Near $a=1$, replacing $(1+h)^2$ by $1+2h$ makes the exact error $h^2$, smaller than the leading change when $h$ is small. A curved graph can therefore be studied locally using a <straight line>.
If the <function> records <position> against time, its <derivative> is <velocity>. If it records an <objective function>, its <derivative> tests local changes that matter in <optimization>; in several variables, the <gradient> collects these directional rates and guides <gradient descent>. The interpretation comes from the <function> and its units, rather than from a new rule for each application.
Existence matters. For the <absolute value function> $f(x)=|x|$, the <one-sided derivatives> at zero are $-1$ and $1$, so there is no single <tangent line> described by a finite <derivative> there. Nor does a zero <derivative> alone identify a maximum or minimum: $f(x)=x^3$ has $f'(0)=0$ but keeps increasing through zero.
Back to article page