Rules That Assign
A function is a rule assigning to each element of the domain exactly one element of the codomain . The "exactly one output per input" requirement is what distinguishes a function from an arbitrary correspondence. The image (or range) is the subset of actually produced as outputs; it may be smaller than the whole codomain.
Functions are classified by how they map:
- Injective (one-to-one) — different inputs give different outputs: . No two inputs collide.
- Surjective (onto) — every element of the codomain is an output: the image is all of .
- Bijective — both injective and surjective, a perfect pairing between domain and codomain.
Bijections are exactly the invertible functions: a bijection has a unique inverse satisfying . They also formalize "same size" — two sets have equal cardinality precisely when a bijection exists between them, a definition powerful enough to compare infinite sets (which is how we learn is countable but is not).
Functions compose: for and , the composition applies first, then — read right to left. Composition is associative, and the composition of two bijections is again a bijection. Functions are the connective tissue of mathematics, linking one structure to another while preserving or transforming information.
Common pitfall: confusing injective (one-to-one) with surjective (onto), and reading composition left to right. Injective forbids input collisions; surjective requires the codomain to be fully covered — a function can be one without the other. And means " then ": the function on the right acts first. Reversing the order gives the wrong result whenever and do not commute.
A domain column and codomain column of dots joined by arrows; an accent collision (two arrows into one target) fails injectivity, and an unhit target fails surjectivity.