The Derivative at a Point

The secant line through (a, f(a)) and (a + h, f(a + h)) rises f(a + h) − f(a) over a run of h.

From average to instantaneous

Keep aa fixed and let hh shrink. The second point slides along the curve toward (a,f(a))(a, f(a)), and the secant line turns. When the secant slopes approach a limit as h→0h \to 0, that limit is the instantaneous rate of change of ff at aa. The line through (a,f(a))(a, f(a)) with that slope is the tangent line.
h = 2.4
h = 1.2
h = 0.4: the secant (blue) is close to the tangent (dashed).

Interactive: From Secant Line to Tangent Line

The three pictures stop hh at three values. In the graph below, f(x)=x2f(x) = x^2 with AA fixed at x=1x = 1, and BB slides along the curve toward AA. As BB closes in, the secant slopes approach 22, the slope of the tangent line at AA.

The derivative at a point