The Derivative as the Slope of a Tangent Line

April 12, 2026

Problem

Show how the derivative of f(x) = x² represents the slope of the tangent line at each point.

Explanation

The derivative of a function at a point is, literally, the slope of the tangent line at that point. This visualization makes the abstract notion of f(x)f'(x) feel tactile: as you slide a point along the parabola f(x)=x2f(x) = x^{2}, the tangent line's slope updates in real time — and you can watch the derivative function f(x)=2xf'(x) = 2x trace itself out in the panel below.

The Physics — uh, the Math

The derivative is defined as the limit of the average slope as the interval shrinks to zero:

f(a)=limh0f(a+h)f(a)hf'(a) = \lim_{h \to 0}\dfrac{f(a + h) - f(a)}{h}

For f(x)=x2f(x) = x^{2}, plug in and simplify:

f(a)=limh0(a+h)2a2h=limh02ah+h2h=limh0(2a+h)=2af'(a) = \lim_{h \to 0}\dfrac{(a + h)^{2} - a^{2}}{h} = \lim_{h \to 0}\dfrac{2ah + h^{2}}{h} = \lim_{h \to 0}(2a + h) = 2a

So f(x)=2xf'(x) = 2x. At xx, the slope of y=x2y = x^{2} is 2x2x.

Step-by-Step Solution

Given: f(x)=x2f(x) = x^{2}. Find: the equation of the tangent line at the current point x=ax = a, and verify it matches f(a)=2af'(a) = 2a.


Step 1 — Compute the derivative using the limit definition.

f(a)=limh0(a+h)2a2hf'(a) = \lim_{h \to 0}\dfrac{(a + h)^{2} - a^{2}}{h}

Expand (a+h)2=a2+2ah+h2(a + h)^{2} = a^{2} + 2ah + h^{2}:

f(a)=limh0a2+2ah+h2a2h=limh02ah+h2hf'(a) = \lim_{h \to 0}\dfrac{a^{2} + 2ah + h^{2} - a^{2}}{h} = \lim_{h \to 0}\dfrac{2ah + h^{2}}{h}

Factor out hh in the numerator:

f(a)=limh0h(2a+h)h=limh0(2a+h)=2af'(a) = \lim_{h \to 0}\dfrac{h(2a + h)}{h} = \lim_{h \to 0}(2a + h) = 2a

Step 2 — Evaluate at the slider position. For example, at a=1a = 1:

f(1)=12=1,f(1)=2(1)=2f(1) = 1^{2} = 1, \qquad f'(1) = 2(1) = 2

Step 3 — Write the tangent-line equation. Using point-slope form with point (a,a2)(a, a^{2}) and slope 2a2a:

ya2=2a(xa)y - a^{2} = 2a\,(x - a)

y=2ax2a2+a2=2axa2y = 2ax - 2a^{2} + a^{2} = 2ax - a^{2}

For a=1a = 1: y=2x1y = 2x - 1. The tangent crosses the xx-axis at (12,0)(\tfrac{1}{2}, 0) and passes through (1,1)(1, 1).

Step 4 — Verify with another point. At a=2a = 2:

f(2)=4,f(2)=4,tangent: y=4x4f(2) = 4, \qquad f'(2) = 4, \qquad \text{tangent: } y = 4x - 4

That tangent is steeper (slope 4) than at x=1x = 1 (slope 2). The slope doubles as aa doubles — exactly as f(x)=2xf'(x) = 2x predicts.


Answer: The slope of the parabola f(x)=x2f(x) = x^{2} at x=ax = a is f(a)=2af'(a) = 2a, derived rigorously from the limit definition. As you slide the point right, the tangent line gets steeper at exactly twice the rate of xx. The lower panel plots f(x)=2xf'(x) = 2x — a straight line through the origin with slope 2 — as the trace of all the slopes you've seen.

Try It

  • Slide the x position widget — watch the cyan tangent line rotate as you move along the parabola.
  • The slope readout in the HUD shows 2x2x live.
  • Toggle show derivative graph to overlay f(x)=2xf'(x) = 2x in pink — the yellow dot tracks the current slope value.
  • At x=0x = 0, the tangent is horizontal (slope 0) — that's the bottom of the parabola.
  • For negative xx, the slope is negative — the tangent tilts the other way.

Interactive Visualization

Parameters

1.00
0.50
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
The Derivative as the Slope of a Tangent Line | MathSpin