Skip to main content
Interactive 3D/Derivatives & Gradients
Click canvas to move the point
Function
Point Position
x = 1.00
-44
Secant h
h = 0.500
0.0012.0
Animation
Metrics
x: 1.0000
f(x): 0.8415
f′(x) analytic: 0.5403
f′(x) numeric: 0.3120
error: 2.28e-1
Key Idea
The derivative is the limit of the secant slope as h→0. Shrink h and watch the gray secant line approach the orange tangent.
Try: Pick |x|, move point near x=0. The derivative is undefined there - watch the numeric estimate jump.

Derivatives & Gradients - Interactive Visualization

Derivatives measure the rate of change - the fundamental quantity that gradient descent uses to train neural networks. This visualization shows a function and lets you drag a point to see the tangent line (derivative) update in real time. The secant line with an h slider shows the limit definition of the derivative, making the concept concrete before the abstraction.

  • Drag point along function curve to see tangent line and slope
  • Adjust h slider to see how secant line approaches tangent (limit definition)
  • Compare analytical derivative to numerical approximation
  • Choose from sin(x), x², x³-3x, exp(-x²), |x|
  • Foundation for understanding backpropagation and autodiff

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.