Skip to content

Function (Mapping)

Version
v2 · 2026-08-30 · History
Prime #
2
Origin domain
Mathematics
Also from
Computer Science & Software Engineering, Philosophy
Aliases
Function, Map, Mapping, Morphism Informal
Related primes
Set and Membership, Relation, Composition, Stochasticity vs. Determinism, Inversion

Core Idea

Relating inputs to outputs through a rule or process.

How would you explain it like I'm…

Same answer machine

Think of a vending machine. You press B4 and you always get the same snack. Press B4 again — same snack. A function is just a rule like that: put something in, get one exact thing out, every single time. No surprises. That 'always the same answer' is what makes a function a function.

Same input, same output

A function is a rule that takes an input and gives you exactly one output, every time, no matter when or who asks. 'Double the number' is a function: give it 3, you get 6 — always 6. The 'same input, same output' rule is the whole point. It separates functions from things like 'pick your favorite color,' which depends on mood. Functions are the building blocks of math and computer programs because you can trust them to behave the same way.

A deterministic input-output rule

A function is a rule that assigns to each input from one set (the domain) exactly one output from another set (the codomain). The defining commitment is determinism: same input, same output, no matter the context or the asker. That single-valued rule is what separates a function from a general relation (which can give many outputs), from a correlation (which is just statistical co-variation), and from a process (which has internal state and timing). Functions matter because they compose cleanly: feeding one function's output into another always gives you another function — which is why they're the building blocks of math, programming, and engineering.

 

A function is a rule that assigns to each element of one set (the domain, the set of allowable inputs) exactly one element of another set (the codomain, the set of possible outputs); the defining structural commitment is determinism — same input, same output, without reference to context, time, or evaluator state. This is what distinguishes a function from an arbitrary relation (which permits one-to-many links), from a correlation (statistical co-variation rather than deterministic assignment), from a causal relationship (which explains why rather than what), from an algorithm (which computes the function rather than being it), and from a process (which has internal state and timing). A function is specified by a domain of admissible inputs, a codomain of possible outputs, and the mapping itself — either extensionally (a table of input-output pairs) or intensionally (a formula, predicate, or algorithm). The deeper abstraction: moving from a mere association pattern to a single-valued rule is the foundational commitment that makes compositional reasoning possible. Functions compose cleanly because the single-valued guarantee ensures the composition is itself a function. This closure under composition is why function-mapping is load-bearing in analysis, programming, control theory, and category theory. Violations (hidden state, unacknowledged stochasticity, silent partiality) are the most common source of bugs in systems informally described as 'functional.'

Broad Use

Models dependencies and cause-effect relationships in systems, such as inputs/outputs in engineering, economics, or software.

Clarity

Models input-output relationships, such as understanding how rain (input) affects crop yield (output), simplifying causal reasoning in agriculture.

Manages Complexity

Encapsulates dependencies into manageable units, avoiding repeated manual reasoning for every input-output pair.

Abstract Reasoning

Frames relationships as abstract rules, allowing generalizations like "if , then " across contexts.

Knowledge Transfer

Enables application of dependency reasoning across fields like economics (supply-demand), biology (genetic inheritance), and engineering (force-displacement).

Example

A recipe maps ingredients (inputs) to a finished dish (output), providing a clear dependency relationship.

Relationships to Other Abstractions

Current abstraction Function (Mapping) Prime

Foundational — no parent edges in the catalog.

Children (125) — more specific cases that build on this

  • Additive function Domain-specific is a kind of Function (Mapping)

    The proposed strict upward parent is prime:function_mapping.

  • Applicative programming language Domain-specific is a kind of Function (Mapping)

    The proposed strict upward parent is prime:function_mapping.

  • Arithmetic function Domain-specific is a kind of Function (Mapping)

    The proposed strict upward parent is prime:function_mapping.

  • Barron space Domain-specific is a kind of Function (Mapping)

    The proposed strict upward parent is prime:function_mapping.

  • Bessel–Clifford function Domain-specific is a kind of Function (Mapping)

    Bessel–Clifford Function instantiates Function Mapping because it assigns a unique analytic value to each admissible order-and-argument pair through a convergent power-series rule.

Not to Be Confused With

  • Function (Mapping) is not Recurrence because Function Mapping is a static mathematical or logical correspondence between input and output domains, whereas Recurrence defines a sequence where each term depends on previous terms.
  • Function (Mapping) is not Transformation because Function Mapping explicitly specifies the systematic rule translating inputs to outputs, whereas Transformation is the general process of changing something from one form to another.
  • Function (Mapping) is not Algorithm because Function Mapping explicitly specifies the systematic rule translating inputs to outputs, whereas Algorithm is a step-by-step procedure for executing a computation or solving a problem.