Calculus

Functions

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

status: reviewimportance: criticaldifficulty 1/5math: highschoolread: 10mdemo planned

Concept Structure

Functions

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.

0prerequisites
1next concepts
1related links

Learning map

Functions
BeforeNo hard prerequisiteNow3/4 sections readyTryUse the demo notes to predict the mechanism before moving on.NextDerivatives

Object flow

3/4 sections readyAsk about thisResearch room
ConceptFunctionsCalculus
Local snapshot ready
concept:calculus/functions

Conceptual Bridge

What should feel connected as you move through this page.

Carry inNo hard prerequisite

This page can stand on its own, so the first job is to build the mental picture carefully.

Work hereFunctions

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

Carry outDerivatives

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

Test the linkUse the demo notes to predict the mechanism before moving on.Then continue to Derivatives
01

01

Intuition

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

Section prompt

A function is a rule that turns an input into an output. You can think of it as a machine: put in xx, get out f(x)f(x).

Functions matter because they let us talk precisely about dependencies: how one quantity changes when another changes. Calculus is basically the study of those changes.

Two ideas show up constantly in ML:

  • composition: one function feeding into another (layers in a network)
  • vector-valued functions: many inputs, many outputs (models)
02

02

Math

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

Section prompt

A function is written

f:XYf: X \to Y

meaning: for each input xXx \in X (the domain), the output f(x)f(x) lies in YY (the codomain).

The graph of a real-valued function f:RRf: \mathbb{R} \to \mathbb{R} is the set of points

{(x,f(x)):xR}.\{(x, f(x)) : x \in \mathbb{R}\}.

Composition means chaining machines together. If g:XYg: X \to Y and f:YZf: Y \to Z, then

(fg)(x)=f(g(x)).(f \circ g)(x) = f(g(x)).

That “feed the output of gg into ff” pattern is the exact shape of neural networks.

03

03

Code

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

Section prompt
import numpy as np

# A simple function
f = lambda x: x**2 + 1

# Another function
g = lambda x: np.sin(x)

# Composition: f(g(x))
x = np.linspace(-2, 2, 5)
print("x:", x)
print("g(x):", g(x))
print("f(g(x)):", f(g(x)))
04

04

Interactive Demo

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

Section prompt

No interactive demo yet. A good demo: drag points on a graph and see how composition warps the curve.

No live visualization is registered for this concept yet.

The page still supports explanatory demo notes above; when a viz.tsx exists, it will render here without changing the route.

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

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

Demo notes open01 / Intuition
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

Before reading further, choose the kind of change Functions should make visible.

Visual Inquiry

Make the image answer a mathematical question

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

3/4 stages readyDemo notes connected
Prediction

Which visible object should carry the first intuition?

Commit first

Pick the cue that should make Functions easier to reason about before the page gives the answer.

Claim Review

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

StatusSubstantive claim review pending

Source IDs and witness objects are attached for review; they are not proof by themselves.

SourcesNo references

Add source metadata before claiming support.

Witnesses3 local objects

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

Practice Loop

Try the idea before it explains itself

A function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

Readiness0/3 checks ready
Predict

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

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
ConceptFunctionsCalculus
Code witness comparisonFunctions code witness 1f = lambda x: x**2 + 1Prediction before revealFunctions predictionUse the demo notes to predict the mechanism before moving on.
Grounded room questionWhat is the smallest example that makes Functions 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

Functions

Anchored question

What is the smallest example that makes Functions 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/functions.

No local draft saved.
Evidence to inspect
  • 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 - Functions Object key: concept:calculus/functions Context: Calculus Anchor id: concept/concept-notebook/calculus/functions Open question: What is the smallest example that makes Functions click without losing the math? Evidence to inspect: - 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/functions concept:calculus/functions