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: 5mlive demo

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

Learner Contract

What this page should let you do.

You are here becauseA function maps inputs to outputs; understanding domain, codomain, graphs, and composition sets up everything in calculus.

This Calculus concept is the current object: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.

Before thisNo hard prerequisite

No hard prerequisite is listed; start from the intuition and fill gaps only when the notation demands it.

By the end4/4 sections ready | code witness expected | live demo

Explain the mechanism, trace the main notation, and test one prediction in the live demo.

Do this firstIntuition

Read the intuition before the notation; the math should name a mechanism you already felt.

Then go nextDerivatives

Follow this edge after making one prediction here; the next page should reuse the result, not restart the route.

Test the linkManipulate one control and predict the visible change.Then continue to Derivatives

Claim/source review status

Claim review not recorded

No structured claim checks yet; source metadata is not enough to establish support.Metadata-derived; review may be AI-assisted. Not a human certification.
Claims0/0 reviewed
Sources0 cited
Codeattached
Demolive
Reviewednot recorded
Updatedpage 2026-06-29

Object flow

4/4 sections readyAsk about thisResearch room
ConceptFunctionsCalculus
Local snapshot ready
concept:calculus/functions
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

Prediction check: choose a target output, then decide whether the composition can reach it, whether it sits below the possible outputs, or whether it sits above them.

Then reveal the range argument. The key move is not a table of samples: the inner function decides which inputs the outer function actually receives, so composition can make a broad codomain behave like a much narrower output surface.

Live Concept Demo

Explore Functions

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

difficulty 1/5highschoolcode-aligned
Demo Prediction Checkpoint

Manipulate one control and predict the visible change.

Commit to what Functions 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

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

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

4/4 stages readyLive demo 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.

Source Grounding

Canonical references for the mechanism on this page.

Source gapNo canonical references are listed yet.

Add source metadata before treating this page as source-grounded.

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.

Witnesses4 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 interactive demoManipulate one control and predict the visible change.
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