Bring the mental model from Functions; this page will reuse it instead of restarting from zero.
Calculus
Derivatives
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.

Concept Structure
Derivatives
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
DerivativesConceptual Bridge
What should feel connected as you move through this page.
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.
The next edge should feel earned: use the demo prediction here before following Chain Rule.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
The derivative is the “instantaneous slope.”
If you stand on a curve and look a tiny step to the right, the secant line gives you an average slope. As that step shrinks to zero, the average slope becomes the local slope: the tangent line.
In optimization, this local slope is the gradient: it tells you how to change parameters to decrease a loss.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Definition (derivative). The derivative of at is
The fraction
is a secant slope (average rate of change over an interval). The limit turns it into a tangent slope.
Once you know , the tangent line at is
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
f = lambda x: np.sin(x)
df_true = lambda x: np.cos(x)
x0 = 1.2
for h in [1.0, 0.3, 0.1, 0.03, 0.01]:
df_est = (f(x0 + h) - f(x0)) / h
print("h=", h, "secant=", df_est, "true=", df_true(x0))
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Use the demo to inspect the visible secant slope, predict the hidden tangent relation, then reveal how the derivative appears as shrinks.
Live Concept Demo
Explore Derivatives
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Derivatives should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Derivatives should make visible.
Visual Inquiry
Make the image answer a mathematical question
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.
Which visible object should carry the first intuition?
Pick the cue that should make Derivatives easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Grounds derivatives and vector calculus as part of the mathematical toolkit needed for machine learning.
Open sourceClaim Review
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.
Claims without a substantive review badge still need exact source-support review.
deisenroth-2020-mml
Use equation, code, and demo objects to check whether the source support is operational.
MML's vector calculus chapter defines the derivative as the limit of a difference quotient, explains the secant-to-tangent picture for differentiable functions, and notes derivatives/gradients give steepest-change information later used in gradient descent and continuous optimization.
Sources: Mathematics for Machine LearningChecks differentiable one-variable real functions and positive/right-hand h values in the toy demo. Optimization is only the one-dimensional instance of gradient direction; not corners/cusps, subgradients, partial derivatives/Jacobians, finite-difference error, or convergence.A bounded review summary is present; still check caveats and exact source scope.Checked MML 5.1 and 7.1: MML defines the difference quotient for a univariate real function, identifies it as the secant/average slope between x and x+delta x, and says its limit becomes the tangent/derivative when f is differentiable. MML then uses gradients of differentiable scalar objectives as steepest-ascent signals for gradient descent. Local math/code/demo match the one-variable specialization: f'(x)=lim (f(x+h)-f(x))/h, positive-h secants for sin vs cos, and secant-vs-hidden-tangent reveal.
Reviewer: codex+oracle; reviewed 2026-05-07Practice Loop
Try the idea before it explains itself
The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.
Before touching the demo, predict one visible change that should happen in Derivatives.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Derivatives
What is the smallest example that makes Derivatives click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:calculus/derivatives.
- Source ids to inspect: deisenroth-2020-mml
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Derivatives Object key: concept:calculus/derivatives Context: Calculus Anchor id: concept/concept-notebook/calculus/derivatives Open question: What is the smallest example that makes Derivatives click without losing the math? Evidence to inspect: - Source ids to inspect: deisenroth-2020-mml - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/calculus/derivatives
concept:calculus/derivatives