Definition · applies to mappings · also called map, mapping

Elementary

A function is a rule that takes an input and gives exactly one output, like a machine.

High school

Consider two sets $X$ and $Y$. A function $f : X \to Y$ assigns to each element $x$ of $X$ exactly one element $f(x)$ of $Y$. The set $X$ is called the domain of $f$, and $Y$ is called the codomain of $f$.

Graduate (set theory)

Consider two sets $X$ and $Y$, and their product $X \times Y$. A function from $X$ to $Y$ is a subset $f \subseteq X \times Y$ such that for each $x \in X$ there is exactly one $y \in Y$ such that $(x, y) \in f$. In this formalization, a function is identified with its graph (together with its codomain).

Examples

Examples

Non-examples
Things that may be mistaken for examples of this term.

Distinctions involving this term

  • Function vs. Map: “Function” and “map” (or “mapping”) mean exactly the same thing. “Map” is more common when the function preserves some structure or acts on geometric objects, but every statement about functions holds for maps, and vice versa.

All definitions · All distinctions · All examples · Notation