Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Tangent Line Visualizer


Quadraticf(x) = (x)²
×
880 × 500
Tangent point
x₀ = 1
-1010
Tangent lineslope m = 2
y = 2·(x − 1) + 1point-slope
y = 2x − 1slope-intercept
Applieda=1k=0b=1h=0x₀=1y₀=1m=2
Show







Getting Started with the Visualizer

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)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 x0x_0 slider, the current values of x0x_0, y0y_0, and slope mm, and the tangent equation written in both point-slope and slope-intercept forms.

The page launches with the quadratic family and x0=1x_0 = 1. Drag the x0x_0 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:

• Polynomial: Identity (xx), Linear (2x), Quadratic (x2x^2), Cubic (x3x^3)
• Algebraic: Reciprocal (1/x1/x), Square root (x\sqrt{x}), Absolute (x|x|)
• Transcendental: Exponential (exe^x), Logarithmic (lnx\ln x)
• Trigonometric: Sine, Cosine

Click any entry to switch. The transformation parameters aa, kk, bb, hh reset to defaults and x0x_0 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)f(x):

$a$ — vertical scale (stretches, compresses, or reflects across the xx-axis)
$k$ — vertical shift
$b$ — horizontal scale
$h$ — horizontal shift

The transformed function is g(x)=af(b(xh))+kg(x) = a \cdot f(b(x - h)) + k. Its derivative — and therefore the slope mm of the tangent at any x0x_0 — follows the chain rule: g(x)=abf(b(xh))g'(x) = a \cdot b \cdot 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=1x_0 = 1 is something specific you want to see.

Dragging x0x_0 — the Tangent Point

The x0x_0 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-10 to +10+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 x0x_0, y0y_0, and mm
• 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 mm is effectively zero — flagging local extrema as you sweep across them. A red "tangent undefined" badge appears whenever x0x_0 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(xx0)+y0\text{Point-slope:} \quad y = m(x - x_0) + y_0


Slope-intercept:y=mx+(y0mx0)\text{Slope-intercept:} \quad y = mx + (y_0 - m \cdot x_0)


Both forms are computed automatically from the current x0x_0, y0y_0, and mm. Point-slope form makes the connection to the derivative obvious: this is the line through (x0,y0)(x_0, y_0) with slope f(x0)f'(x_0). Slope-intercept form is what you would simplify to in a homework problem and what graphing software typically expects.

The slope mm appears in the card header, and special cases are handled cleanly. When m=0m = 0, both forms collapse to y=y0y = y_0 — the horizontal tangent at a critical point. When x0=0x_0 = 0, the parenthesized (xx0)(x - x_0) in point-slope form simplifies to just xx.

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 aa, kk, bb, hh, and three for the tangent-specific values x0x_0, y0y_0, mm. Active (non-default) parameters glow blue; the tangent values are color-coded amber for the xx-axis quantities and blue for y0y_0. 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 ff and the tangent line. Click a button to hide that curve from the plot. Hiding ff 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 x0x_0 next.

The Info Panel

The side info panel has two tabs:

Explanation — reads the current state. Shows the symbolic forms of f(x)f(x) and f(x)f'(x), the numerical values of x0x_0, y0y_0, mm, and the yy-intercept of the tangent, and renders the tangent equation in both forms. When x0x_0 is at a critical point (m0m \approx 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 x0x_0 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 derivative f(x0)f'(x_0).

The tangent emerges as the limit of secant lines. Pick two points on the curve, (x0,f(x0))(x_0, f(x_0)) and (x0+Δx,f(x0+Δx))(x_0 + \Delta x, f(x_0 + \Delta x)). The line through them has slope

f(x0+Δx)f(x0)Δx\frac{f(x_0 + \Delta x) - f(x_0)}{\Delta x}


As Δx0\Delta x \to 0 the second point slides into the first and the secant rotates into the tangent. Its slope becomes

f(x0)=limΔx0f(x0+Δx)f(x0)Δxf'(x_0) = \lim_{\Delta x \to 0} \frac{f(x_0 + \Delta x) - f(x_0)}{\Delta x}


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 x0x_0.

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|x| at x=0x = 0 has a sharp V; the slope jumps from 1-1 to +1+1 with no single line that fits both sides. The left and right derivatives exist but disagree.
Vertical tangents — the square root function x\sqrt{x} at x=0x = 0 has a tangent whose slope is infinite. A vertical line cannot be written in the form y=mx+by = mx + b, so the equation forms break down even though the geometric line exists.
Outside the domain — the logarithm lnx\ln x has no values at x0x \leq 0, so there is no curve there to be tangent to. The reciprocal 1/x1/x similarly has no value at x=0x = 0.

In all three cases the derivative does not exist at the affected point. Sliding x0x_0 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.

Related Concepts and Tools

Derivative — the function f(x)f'(x) whose value at any xx equals the slope of the tangent at that point. The tangent line at x0x_0 is the geometric realization of f(x0)f'(x_0).

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 x0x_0, the basis of Newton's method and Taylor series.

Function Transformations — the companion visualizer for aa, kk, bb, hh 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=xy = x; tangent lines of inverse functions are related by reciprocal slopes.