Calculus

Derivatives

The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.

status: publishedimportance: criticaldifficulty 2/5math: undergraduateread: 14mlive demo
Editorial calculus illustration of a curve, secant line, tangent slope, and local rate-of-change marker.

Concept Structure

Derivatives

01Intuition

Start with the picture, metaphor, or geometric mechanism.

02Math

Make the objects explicit and connect them with notation.

03Code

Mirror the equations with runnable implementation details.

04Interactive Demo

Manipulate the mechanism and watch the idea respond.

1prerequisites
2next concepts
2related links

Learning map

Derivatives
BeforeFunctionsNow4/4 sections readyTryManipulate one control and predict the visible change.NextChain Rule

Object flow

4/4 sections readyAsk about thisResearch room
ConceptDerivativesCalculus
1 source attachedLocal snapshot ready
concept:calculus/derivatives

Conceptual Bridge

What should feel connected as you move through this page.

Carry inFunctions

Bring the mental model from Functions; this page will reuse it instead of restarting from zero.

Work hereDerivatives

The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.

Carry outChain Rule

The next edge should feel earned: use the demo prediction here before following Chain Rule.

Test the linkManipulate one control and predict the visible change.Then continue to Chain Rule
01

01

Intuition

Build the mental picture first so the rest of the page has something to attach to.

Section prompt

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

02

Math

Translate the story into symbols, assumptions, and a derivation you can inspect.

Section prompt

Definition (derivative). The derivative of ff at xx is

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

The fraction

f(x+h)f(x)h\frac{f(x+h) - f(x)}{h}

is a secant slope (average rate of change over an interval). The limit turns it into a tangent slope.

Once you know f(x0)f'(x_0), the tangent line at x0x_0 is

y=f(x0)+f(x0)(xx0).y = f(x_0) + f'(x_0)(x - x_0).
03

03

Code

Keep the implementation aligned with the notation so the algorithm is legible.

Section prompt
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

04

Interactive Demo

Use direct manipulation to connect the explanation to a moving system.

Section prompt

Use the demo to inspect the visible secant slope, predict the hidden tangent relation, then reveal how the derivative appears as hh shrinks.

Live Concept Demo

Explore Derivatives

The stage is code-native and interactive. Use it to test the explanation against the mechanism.

difficulty 2/5undergraduatecode-aligned
Demo Prediction Checkpoint

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.

Prediction open01 / Intuition
Editorial calculus illustration of a curve, secant line, tangent slope, and local rate-of-change marker.
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

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.

4/4 stages readyLive demo connected
Prediction

Which visible object should carry the first intuition?

Commit first

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.

book · 2020Mathematics for Machine LearningDeisenroth, Faisal, and Ong

Grounds derivatives and vector calculus as part of the mathematical toolkit needed for machine learning.

Open source

Claim Review

The derivative is an instantaneous rate of change: the slope you get when a secant line becomes a tangent line.

Status1 substantive review recorded

Claims without a substantive review badge still need exact source-support review.

Sources1 reference

deisenroth-2020-mml

Witnesses4 local objects

Use equation, code, and demo objects to check whether the source support is operational.

Substantively reviewedFor a differentiable one-variable real function, the derivative at x is the limit of the difference quotient as h approaches 0: secant slopes over [x,x+h] converge to the tangent slope, a local one-variable rate-of-change signal used by gradient-based optimization.Claim metadata: source checked

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-07

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

Readiness0/3 checks ready
Predict

Before touching the demo, predict one visible change that should happen in Derivatives.

Hint 1

Reveal when your model needs a nudge.

Hint 2

Reveal when your model needs a nudge.

Hint 3

Reveal when your model needs a nudge.

Object research drawerClose
ConceptDerivativesCalculus
Code witness comparisonDerivatives code witness 1f = lambda x: np.sin(x)Prediction before revealDerivatives interactive demoManipulate one control and predict the visible change.
Grounded room questionWhat is the smallest example that makes Derivatives click without losing the math?Local snapshot ready

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.
Next local actionNo local draft saved yet

Open the draft below to save one note and next action in this browser.

conceptCalculus

Derivatives

Anchored question

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
Local action draft

This draft stays locally in this browser for concept:calculus/derivatives.

No local draft saved.
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
Grounded AI handoff

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.

Open source object
concept/concept-notebook/calculus/derivatives concept:calculus/derivatives