HomeArticlesMathematics

The Derivative as a Limit: From Secant Lines to Tangent Slopes

Why calculus defines instantaneous slope as a limit of secant lines, and what happens when that limit does not exist.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

A slope you cannot draw with a ruler

The slope of a straight line is easy: rise over run, the same number wherever you measure it. A curve does not have one slope - it has a different steepness at every point, and until the 17th century there was no rigorous way to pin one down. The derivative is that rigorous answer: the instantaneous rate of change of a function at a single point, defined not by measuring two points on the curve but by a limit of a process that squeezes two points into one.

live demo - a secant line collapsing onto the tangent as h shrinks to zero● LIVE

The secant line, and what happens as it shrinks

Pick a point x0 on a curve y = f(x), and a second point a small distance h further along, at x0 + h. The line through these two points - a secant line - has a perfectly ordinary, ruler-measurable slope: the change in y divided by the change in x.

slope of the secant through (x0, f(x0)) and (x0+h, f(x0+h)):

  m(h) = [ f(x0 + h) - f(x0) ] / h

as h shrinks toward 0, the two points merge and the secant
rotates toward the tangent line at x0

That is the whole idea of the derivative: take the secant slope m(h) and ask what number it approaches as h approaches zero, without ever actually setting h to zero (division by zero is undefined). This is a limit, written formally as the definition below - the single most important equation in calculus.

f'(x0) = lim  [ f(x0 + h) - f(x0) ] / h
          h to 0

if this limit exists, f is called "differentiable" at x0
and f'(x0) is the slope of the tangent line there

Why the limit is necessary, not just convenient

You might ask why not simply plug h = 0 into the secant formula. Doing so gives 0/0, an indeterminate form that carries no information on its own. The limit process is what rescues a meaningful number out of that indeterminate ratio: the numerator f(x0+h) - f(x0) also shrinks toward zero as h does, and for a smooth function the two shrink at comparable rates, so their ratio settles down to a finite value even though both pieces individually vanish. This is the resolution of what mathematicians once called the paradox of instantaneous velocity - Zeno's arrow has no motion at a single instant, yet the derivative gives a perfectly well-defined instantaneous rate.

From formula to graph

For a concrete example, take f(x) = x squared. The secant slope works out to (2x0 + h), and as h shrinks to zero that expression slides smoothly to 2x0 with nothing indeterminate left over - so the derivative of x squared is 2x, the familiar power-rule result. Graphically, the secant line through two nearby points on a parabola visibly rotates and shortens as the second point slides toward the first, until in the limit it becomes the single tangent line touching the curve at exactly one point. That visual collapse is exactly what the demo above animates for an arbitrary curve: drag the point, shrink h, and watch the secant become the tangent.

One-sided limits and where derivatives fail to exist

The definition requires the limit to be the same whether h approaches zero from the positive side or the negative side. At a sharp corner, such as the absolute value function at x = 0, the left-hand and right-hand limits disagree (the slopes are -1 and +1), so no single tangent line exists there and the function is not differentiable at that point, even though it is perfectly continuous. Vertical tangents cause a similar failure: the secant slope diverges to infinity rather than settling on a finite number. Differentiability is therefore a strictly stronger requirement than continuity - every differentiable function is continuous, but plenty of continuous functions have corners, cusps or vertical tangents where no derivative exists.

Frequently asked questions

Is the derivative the same thing as the slope?

At any single point, yes - the derivative is defined to be the slope of the tangent line to the curve at that point. The difference from ordinary slope is that a curve's steepness changes from point to point, so the derivative is itself a function: it returns a different slope value for every x you plug in.

Why can h not just be set to zero directly?

Setting h = 0 in the secant-slope formula gives 0 divided by 0, which is mathematically undefined and carries no information by itself. The limit process instead asks what value the ratio approaches as h gets arbitrarily small without ever reaching zero, which is a well-defined question with a well-defined answer for smooth functions.

Why is a sharp corner not differentiable even though it is continuous?

Continuity only requires the curve to have no gaps or jumps. Differentiability additionally requires the secant slope to approach the same limiting value from both sides of the point. At a sharp corner the slope just to the left differs from the slope just to the right, so the two one-sided limits disagree and no single tangent line - hence no derivative - exists there.

Try it live

Everything above runs in your browser — open Derivative Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Derivative Visualizer simulation

What did you find?

Add reproduction steps (optional)