Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Tangent Line


Local view · f(x) = ⅓x³ − x

f′(x) = x² − 1 · max at x = −1 · min at x = 1
Drag c on the x-axis, or pick a scenario.
c =-0.50
f(c) =0.46
f′(c) =-0.75
slope of tangent =-0.75
f(x)tangentdrop







Key Terms

Tangent line — The straight line that touches ff at the single point P=(c,f(c))P = (c, f(c)) with the same slope as the curve at that point: slope =f(c)= f'(c).

Slope of the tangent — Equal to the derivative f(c)f'(c). This is the geometric meaning of the derivative.

Point-slope form — The standard equation: yf(c)=f(c)(xc)y - f(c) = f'(c)(x - c), or equivalently y=f(c)+f(c)(xc)y = f(c) + f'(c)(x - c).

Linearization — Another name for the tangent line equation written as a function: L(x)=f(c)+f(c)(xc)L(x) = f(c) + f'(c)(x - c). It is the best linear approximation of ff near cc.

Critical point — A point where f(c)=0f'(c) = 0 (horizontal tangent) or where ff' is undefined. Candidates for local maxima and minima.

This widget uses the cubic f(x)=13x3xf(x) = \frac{1}{3}x^3 - x, whose derivative is f(x)=x21f'(x) = x^2 - 1. Horizontal tangents sit at x=±1x = \pm 1.

Getting Started

The visualizer shows the cubic f(x)=13x3xf(x) = \frac{1}{3}x^3 - x with a draggable point cc on the x-axis. P=(c,f(c))P = (c, f(c)) lifts vertically from cc to the curve, and the tangent line through PP extends in both directions with slope f(c)f'(c).

Drag cc left or right to move the point along the x-axis. The dashed drop line, the highlighted PP, and the tangent line all update in real time, along with the live readouts below the canvas: cc, f(c)f(c), f(c)f'(c), and the tangent slope.

For a guided walkthrough, click one of the four scenario buttons at the bottom: Positive slope, Negative slope, Local max, or Local min. Each runs a six-step animation explaining what the tangent at that cc tells you about the curve.

The Reset button clears the active scenario and returns cc to its default position.

Drag Mode vs Scenario Mode

Two interaction styles share the same canvas.

Free drag — Grab the cc marker on the x-axis and slide it anywhere in the visible range. The tangent line pivots in real time as the slope f(c)=c21f'(c) = c^2 - 1 changes. This is the fastest way to feel how the tangent rotates: drag through c=1c = -1 or c=1c = 1 and watch the tangent flatten exactly at the critical points where f=0f' = 0.

Scenario animation — Click any of the four scenario buttons to lock cc to a specific value and play the six-step explanation. The full color theme of the visualizer changes to match: blue for positive slope, red for negative slope, amber for the local max, teal for the local min.

Starting a scenario interrupts dragging. Once an animation completes, you can still drag cc — doing so clears the scenario tint and returns the visualizer to neutral.

Running the Four Scenarios

Positive slope sets c=1.7c = -1.7, where f(1.7)=1.89>0f'(-1.7) = 1.89 > 0. The tangent line tilts upward to the right, matching the curve's ascending behavior on the left wing of the cubic.

Negative slope sets c=0.4c = 0.4, where f(0.4)=0.84<0f'(0.4) = -0.84 < 0. The tangent line tilts downward to the right, matching the curve&apos;s descending behavior across the middle interval between the local max and local min.

Local max sets c=1c = -1, where f(1)=0f'(-1) = 0. The tangent line is horizontal, parallel to the x-axis. Chevron arrows on the curve show the slope flipping from positive on the left to negative on the right — the signature of a local maximum.

Local min sets c=1c = 1, where f(1)=0f'(1) = 0. The tangent line is horizontal. Chevron arrows show the slope flipping from negative on the left to positive on the right — the signature of a local minimum.

Each scenario takes a few seconds across the six animation phases.

Following the 6-Step Animation

Each scenario plays the same six phases, labeled in a banner at the top of the canvas:

Step 1 — Identify the region near cc. A shaded band highlights the interval the analysis covers.

Step 2 — Mark the point cc on the x-axis. The marker animates into position from wherever it was previously.

Step 3 — Lift to the curve: P=(c,f(c))P = (c, f(c)). A dashed drop line connects cc on the axis to PP on the curve.

Step 4 — Evaluate the slope f(c)f'(c). The Computation tab highlights the substitution f(c)=c21f'(c) = c^2 - 1.

Step 5 — Draw the tangent through PP with slope f(c)f'(c). The tangent line extends outward from PP, and a floating label shows the numerical slope value.

Step 6 — Write the tangent equation: y=f(c)+f(c)(xc)y = f(c) + f'(c)(x - c). The Computation tab displays the equation with the numerical values substituted in.

When the animation finishes, the right-side panel switches automatically to the Meaning tab.

Using the Computation Tab

The Computation tab walks through the tangent line construction algebraically, with the active step highlighted in the scenario color.

The point of tangency — Shows the current values of cc and f(c)f(c). These are the coordinates of PP.

Step 1 — Slope from the derivative — Substitutes cc into f(x)=x21f'(x) = x^2 - 1 to give the numerical slope f(c)f'(c). The colored result is the slope of the tangent.

Step 2 — Point-slope form — Plugs cc, f(c)f(c), and f(c)f'(c) into the formula yf(c)=f(c)(xc)y - f(c) = f'(c)(x - c). The expanded slope-intercept form y=mx+by = mx + b is shown directly below, with bb computed from f(c)f(c)cf(c) - f'(c) \cdot c.

You can switch to Computation at any time during free drag — the displayed equation always reflects the current cc, so it updates as you move the marker.

Using the Meaning and Theory Tabs

Meaning explains what the current tangent reveals about the curve, with a verdict card themed to the active scenario. Positive and negative slope cards describe the curve&apos;s direction at cc; max and min cards highlight the horizontal tangent and the connection to Fermat&apos;s theorem. A "why" note adds context — for example, clarifying that a horizontal tangent alone is necessary but not sufficient for a maximum or minimum. The Meaning tab opens automatically when a scenario animation finishes.

Theory provides the formal background in five blocks: the definition of the tangent line and its point-slope equation, the derivative as the slope of the tangent, the tangent as the best linear approximation (linearization), horizontal tangents and critical points (including Fermat&apos;s theorem), and a worked breakdown of how the slope f(c)=c21f'(c) = c^2 - 1 behaves across the specific cubic used in this widget.

Switch tabs at any time without interrupting the canvas.

What is a Tangent Line?

A tangent line to a function ff at x=cx = c is the unique straight line that passes through P=(c,f(c))P = (c, f(c)) and matches the curve&apos;s direction at PP. "Matches the direction" is made precise by the slope: the tangent has slope equal to f(c)f'(c), the derivative of ff evaluated at cc.

The defining equation in point-slope form is:

yf(c)=f(c)(xc)y - f(c) = f'(c)(x - c)

Or equivalently:

y=f(c)+f(c)(xc)y = f(c) + f'(c)(x - c)

This is the best linear approximation of ff near cc. Any other line through PP would diverge from ff faster as xx moves away from cc, because it would have the wrong slope. The tangent shares both the value and the first derivative of ff at cc.

For a deeper treatment with proofs and worked examples, see the tangent line theory page.

Derivative as Slope and the Point-Slope Form

The derivative f(c)f'(c) is defined geometrically as the slope of the tangent line at cc. Algebraically, it is the limit of secant slopes:

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

Each secant is a chord of ff passing through (c,f(c))(c, f(c)) and a nearby point (c+h,f(c+h))(c+h, f(c+h)). As hh shrinks toward zero, those secants rotate toward a single limiting line — the tangent at cc. Its slope is f(c)f'(c).

To write the tangent equation, you only need two pieces of information: a point on the line and its slope. The point is (c,f(c))(c, f(c)), the slope is f(c)f'(c), and point-slope form is the standard way to combine them:

yf(c)=f(c)(xc)y - f(c) = f'(c)(x - c)

The same line can also be written as the linearization L(x)=f(c)+f(c)(xc)L(x) = f(c) + f'(c)(x - c) — a useful viewpoint for approximation and Taylor series.

Horizontal Tangents and Critical Points

    When f(c)=0f'(c) = 0, the tangent line at cc is horizontal. Such a point is called a critical point of ff.

    Critical points are candidates for local maxima and local minima. Fermat&apos;s theorem guarantees the connection in the other direction: if ff has a local extremum at an interior point cc where ff' exists, then f(c)=0f'(c) = 0. So every smooth interior extremum has a horizontal tangent.

    The reverse is not automatic. A horizontal tangent alone only says that the curve is momentarily flat at cc. It might be a local maximum, a local minimum, or an inflection point with a flat tangent. Examples:

  • f(x)=x2f(x) = -x^2 has a horizontal tangent at 00, and it is a local maximum
  • f(x)=x2f(x) = x^2 has a horizontal tangent at 00, and it is a local minimum
  • f(x)=x3f(x) = x^3 has a horizontal tangent at 00, but no extremum — 00 is an inflection point with a flat tangent

  • To classify a critical point, examine the sign change of ff' across cc or use the second derivative test. See the critical points page for the full procedure.

Related Concepts

Derivative — The fundamental operation: rate of change of ff at a point, defined as the limit of secant slopes.

Average rate of change — The slope of a secant line over an interval; the discrete cousin of f(c)f'(c).

Linearization — The tangent line viewed as a function L(x)=f(c)+f(c)(xc)L(x) = f(c) + f'(c)(x - c), used for approximation.

Critical points — Where f(c)=0f'(c) = 0 or is undefined; the starting set for finding extrema.

First derivative test — Sign analysis of ff' to classify critical points as maxima, minima, or neither.

Inflection points — Points where the second derivative changes sign and the tangent crosses the curve.

Newton&apos;s method — Numerical root-finding algorithm that iteratively follows tangent lines back to the x-axis.

Taylor series — Higher-order generalization of linearization, using all derivatives at cc.