Open the page and three panels appear. On the left is the function picker with ten base function families. In the center sits the plot panel, with the chosen function f(x) drawn in blue and its tangent line at the chosen point drawn in amber. On the right is the info panel with two tabs — a live explanation of the current state and a general theory tab about tangents.
Below the plot, the centerpiece of the tool is the tangent point card: an amber-bordered block containing the x0 slider, the current values of x0, y0, and slope m, and the tangent equation written in both point-slope and slope-intercept forms.
The page launches with the quadratic family and x0=1. Drag the x0 slider and the tangent line slides along the curve in real time, the equations recalculate, and the info panel updates with the new slope and intercept.
Picking a Base Function
The picker on the left lists ten base functions, with sine and cosine grouped under "Trigonometric". Each entry shows a small shape glyph and the family name:
Click any entry to switch. The transformation parameters a, k, b, h reset to defaults and x0 returns to its default value, so you always start each family from a clean slate. The picker covers the most pedagogically important functions for studying derivatives — including deliberately tricky ones (absolute value's corner, square root's vertical tangent) that demonstrate when the tangent fails to exist.
Transforming the Base Function
Below the function picker, four sliders apply the standard affine transformations to the chosen base f(x):
• a — vertical scale (stretches, compresses, or reflects across the x-axis) • k — vertical shift • b — horizontal scale • h — horizontal shift
The transformed function is g(x)=a⋅f(b(x−h))+k. Its derivative — and therefore the slope m of the tangent at any x0 — follows the chain rule: g′(x)=a⋅b⋅f′(b(x−h)).
Transformations are most useful here for two reasons. First, they let you keep the same function family while moving features around — drag the parabola's vertex to wherever you want it, then study tangents near that vertex. Second, they let you build a function whose tangent at the default x0=1 is something specific you want to see.
Dragging x0 — the Tangent Point
The x0 slider lives at the top of the tangent point card below the plot, and it is the tool's primary interaction. Drag it to move the point of tangency along the curve from −10 to +10.
As you drag, four things change at once in real time:
• The point of tangency slides along the blue curve • The amber tangent line pivots to match the new slope • The tangent equations rewrite themselves with the new x0, y0, and m • The info panel's "Explanation" tab updates with the new numerical values
A green "critical point" badge appears next to the function name whenever the slope m is effectively zero — flagging local extrema as you sweep across them. A red "tangent undefined" badge appears whenever x0 lands at a corner, vertical tangent, or outside the function's domain.
Reading the Tangent Equation Card
The lower half of the tangent point card displays the tangent line in two equivalent forms:
Point-slope:y=m(x−x0)+y0
Slope-intercept:y=mx+(y0−m⋅x0)
Both forms are computed automatically from the current x0, y0, and m. Point-slope form makes the connection to the derivative obvious: this is the line through (x0,y0) with slope f′(x0). Slope-intercept form is what you would simplify to in a homework problem and what graphing software typically expects.
The slope m appears in the card header, and special cases are handled cleanly. When m=0, both forms collapse to y=y0 — the horizontal tangent at a critical point. When x0=0, the parenthesized (x−x0) in point-slope form simplifies to just x.
The Applied Chip Strip and Visibility Toggles
Below the tangent equation card sit two horizontal strips.
The Applied strip shows seven chips: four for the transformation parameters a, k, b, h, and three for the tangent-specific values x0, y0, m. Active (non-default) parameters glow blue; the tangent values are color-coded amber for the x-axis quantities and blue for y0. The chip strip is a scannable summary of the entire current state — useful for screenshots, classroom display, and step-back verification when sliders have been dragged far from defaults.
The Show strip below has two toggle buttons, one each for the function f and the tangent line. Click a button to hide that curve from the plot. Hiding f leaves the tangent line alone in the plot window, useful for verifying that the equation in the card is in fact the line drawn. Hiding the tangent leaves only the function, useful for cleanly observing where you want to place x0 next.
The Info Panel
The side info panel has two tabs:
• Explanation — reads the current state. Shows the symbolic forms of f(x) and f′(x), the numerical values of x0, y0, m, and the y-intercept of the tangent, and renders the tangent equation in both forms. When x0 is at a critical point (m≈0), an extra note explains that this is a candidate for a local extremum. When the tangent is undefined, a different note explains why and suggests sliding x0 to a smooth part of the curve.
• Concepts — general theory of tangent lines independent of the current state. Covers the secant-to-tangent limit definition, the relationship between the slope of the tangent and the derivative, the two equivalent forms of the equation, and the three ways the tangent can fail to exist (corners, vertical tangents, points outside the domain).
The Explanation tab is the right place to look when you want to know *what is happening right now*; the Concepts tab is the right place for *why it works that way in general*.
What the Tangent Line Is
At any smooth point on a curve, the tangent line is the unique straight line that touches the curve at that point and matches its direction. Its slope is the function's instantaneous rate of change at that point — the derivativef′(x0).
The tangent emerges as the limit of secant lines. Pick two points on the curve, (x0,f(x0)) and (x0+Δx,f(x0+Δx)). The line through them has slope
Δxf(x0+Δx)−f(x0)
As Δx→0 the second point slides into the first and the secant rotates into the tangent. Its slope becomes
f′(x0)=Δx→0limΔxf(x0+Δx)−f(x0)
This is the definition of the derivative. Every tangent line you see in the visualizer is the geometric realization of this limit at the chosen x0.
When the Tangent Fails to Exist
Not every point on every curve has a tangent. The visualizer flags three failure modes with a red "tangent undefined" badge:
• Corners — the absolute value function ∣x∣ at x=0 has a sharp V; the slope jumps from −1 to +1 with no single line that fits both sides. The left and right derivatives exist but disagree. • Vertical tangents — the square root function x at x=0 has a tangent whose slope is infinite. A vertical line cannot be written in the form y=mx+b, so the equation forms break down even though the geometric line exists. • Outside the domain — the logarithm lnx has no values at x≤0, so there is no curve there to be tangent to. The reciprocal 1/x similarly has no value at x=0.
In all three cases the derivative does not exist at the affected point. Sliding x0 across one of these points lets you watch the badge appear and the equation card reset — a concrete tour of the differentiability failures discussed in introductory calculus.
Tangent to the Identity
The line y=x is its own tangent everywhere: slope 1 at every point, so the tangent construction returns the function itself.
y = x, tangent at x₀ = 2
The dashed amber tangent lies exactly on the blue line: a line is its own best linear approximation, everywhere.
The frozen scene dashes the amber tangent so the coincidence stays visible — it lies exactly on the blue line, whatever x0 you drag to. A constant derivative means one tangent serves all points.
Self-tangency is the degenerate case that calibrates all the others: the tangent line is the *best linear approximation*, and a line's best linear approximation is itself, error zero everywhere.
The line f(x)=2x has derivative 2 everywhere — a constant slope read directly off the function, no limit needed.
y = 2x, tangent at x₀ = 1
Constant slope 2: one tangent serves every point, coinciding with the curve itself.
As with the identity, the tangent coincides with the curve at every point; the dashed amber overlay is the only way to see it at all. Drag x0 and nothing about the line changes — only the marked point slides.
The pair of line families anchors the derivative scale: slope 1 and slope 2, the two reference speeds against which every curved tangent below can be compared.
Tangent to the Quadratic
The parabola is where the tangent starts to move: f′(x)=2x, so the slope at the frozen x0=1.5 is exactly 3.
x², tangent at x₀ = 1.5
Slope 2x₀ = 3 at the frozen point; drag left and the tangent tilts down through the horizontal rest at the vertex.
Drag the point and watch the slope track twice its position: negative on the left arm, zero at the vertex, positive on the right. The vertex is the tangent's resting place — the horizontal tangent that marks every smooth extremum.
The parabola also keeps a geometric secret: the tangent at x0 crosses the x-axis exactly at x0/2, halfway to the origin — a fact worth verifying with the draggable point.
The tangent equation card assembles y=f(x0)+f′(x0)(x−x0) live; the quadratic is the cleanest place to watch each ingredient move.
Tangent to the Cubic
The cubic's derivative 3x2 is never negative — every tangent points weakly uphill, even through the flat moment at the origin.
x³, tangent at x₀ = 1
Slope 3x₀² = 3 — and never negative anywhere: every cubic tangent points weakly uphill.
The frozen x0=1 gives slope 3. Drag toward zero and the tangent flattens into the horizontal — but unlike the parabola's vertex, this is not an extremum: the curve pauses and continues upward. A horizontal tangent marks a critical point; only the surrounding slopes decide what kind.
That distinction — extremum versus inflection with zero slope — is the classic first-derivative-test lesson, and the cubic is its canonical exhibit.
Symmetric positions give equal slopes: f′(−x0)=f′(x0), the derivative of an odd function being even.
Tangent to the Reciprocal
Every tangent to 1/x points downhill: f′(x)=−1/x2 is negative on both branches, steepening without bound near the wall at x=0.
1/x, tangent at x₀ = 1
Slope −1 at (1, 1); the tangent and the axes enclose a triangle of area 2 — the same area from every tangent point.
At the frozen x0=1 the slope is exactly −1, and the tangent y=2−x encloses a triangle with the axes of area 2 — remarkably, the *same* area for every choice of x0, one of the reciprocal's classic invariants.
Approach the singularity and the tangent tilts toward vertical while sliding off to infinity; there is no tangent *at* x=0 because there is no point there at all — the domain hole, not a differentiability failure.
Tangent to the Exponential
The exponential's defining property becomes visible geometry: f′(x)=ex=f(x), so the tangent's slope always equals the curve's height.
eˣ, tangent at x₀ = 1
Height e, slope e: the tangent’s steepness equals the curve’s value at every point.
At the frozen x0=1: height e, slope e. Drag anywhere and the equality holds — the only function (up to scaling) whose steepness is its own value.
A consequence worth checking with the equation card: every tangent to ex crosses the x-axis exactly at x0−1, one unit to the left of the tangent point, at every position. The subtangent has constant length 1.
Its inverse partner the logarithm flips the relationship: slope equal to the reciprocal of position.
Tangent to the Logarithm
The logarithm's tangent flattens as it climbs: f′(x)=1/x, steep against the wall, nearly horizontal far out.
ln(x), tangent at x₀ = 2
Slope 1/x₀ = ½: gentle out here, rearing toward vertical as the point approaches the wall at zero.
At the frozen x0=2 the slope is 21. Drag toward zero and the tangent rears toward vertical as 1/x blows up — the graphical version of the logarithm's unbounded steepness at its domain edge.
The mirror fact to the exponential's constant subtangent: every tangent to ln(x) crosses the y-axis at ln(x0)−1, one unit below the tangent point's height.
Only positive x0 is available — the slider simply cannot cross into territory where the function does not exist.
Tangent to the Square Root
The square root's tangents flatten with distance — f′(x)=2x1 — but the interesting drama is at the start of the curve.
√x, tangent at x₀ = 4
Slope ¼ at (4, 2) — and an endpoint drama off-screen left: the tangent turns vertical at x = 0.
At the frozen x0=4: height 2, slope 41. Drag the point toward zero and the tangent tilts up and up, approaching vertical — infinite slope at the endpoint. The tangent at x=0 exists geometrically (the y-axis itself) but not as a y=mx+b equation, which is why the tool reports it as undefined.
This is one of the two failure modes cataloged in When the Tangent Fails to Exist: a vertical tangent — direction defined, slope not.
Everywhere else the root behaves: half the reciprocal of its own height, the chain rule's first classic exercise.
Tangent to the Absolute Value
Away from the corner, ∣x∣ is just a line in disguise: slope +1 on the right arm, −1 on the left, the tangent coinciding with whichever arm holds the point.
|x|, tangent at x₀ = 2
The dashed tangent coincides with the right arm; at the corner itself, no single line fits and the tangent fails.
The frozen x0=2 shows the coincidence — the dashed amber tangent lies along the right arm exactly, as on the identity. Drag across to negative territory and the tangent snaps to the other arm; slope jumps from +1 to −1 with nothing in between.
At x=0 itself there is no tangent at all: the left and right slopes disagree, so no single line fits. This is the corner failure mode — the second entry in When the Tangent Fails to Exist, and the standard first example of continuity without differentiability.
Tangent to Sine
Sine's tangents cycle with the wave itself: f′(x)=cos(x), the slope at every point read off the *other* wave.
sin(x), tangent at x₀ = 0
Slope cos(0) = 1: the tangent is y = x — the small-angle approximation drawn as geometry.
The frozen x0=0 shows the most celebrated tangent in trigonometry: slope cos(0)=1, giving the line y=x — the small-angle approximation sin(x)≈x drawn as geometry.
Drag to the crest at π/2 and the tangent goes horizontal; every peak and trough of the wave is a resting point. Between them the slope oscillates through the full [−1,1] range, peaking exactly at the zero crossings.
Cosine tells the same story a quarter period out of phase — with a sign flip in its derivative.
Tangent to Cosine
Cosine's slopes are sine's values negated: f′(x)=−sin(x) — downhill through the first half period, uphill through the second.
cos(x), tangent at x₀ = π/2
Caught at its steepest descent: slope −sin(π/2) = −1 as the wave crosses zero.
The frozen x0=π/2 catches cosine at its descent through zero: slope −sin(π/2)=−1, the steepest the wave ever gets. At the crests (x=0, 2π) the tangent rests horizontal.
The derivative pair closes into a cycle — sine to cosine to negative sine to negative cosine and back — which the tangent point makes tactile: four drags of a quarter period each return the slope pattern to its start.
Together with sine, this pair is the reason simple harmonic motion never escapes trigonometry.
Related Concepts and Tools
Derivative — the function f′(x) whose value at any x equals the slope of the tangent at that point. The tangent line at x0 is the geometric realization of f′(x0).
Secant Line — the line through two distinct points on the curve; the tangent emerges as the secant's limit as the two points merge.
Critical Points — points where the derivative is zero or undefined; candidates for local maxima, minima, and saddle points.
Differentiability — the property of having a well-defined derivative at a point. The visualizer's three "tangent undefined" cases are the three standard failures.
Linear Approximation — using the tangent line as a substitute for the function near x0, the basis of Newton's method and Taylor series.
Function Transformations — the companion visualizer for a, k, b, h alone, without the tangent overlay.
Functions Families Gallery — companion gallery of the same base functions seen here, useful as a prerequisite for understanding what each family looks like before studying its tangents.
Inverse Functions — reflecting a graph across y=x; tangent lines of inverse functions are related by reciprocal slopes.