Rules That Assign
A function is a rule assigning to each element of the domain exactly one element of the codomain . The image (range) is the subset of actually produced; it may be smaller than the whole codomain.
Functions are classified by how they map:
| Property | Definition | Formal Condition |
|---|---|---|
| Injective | One-to-one; no input collisions | |
| Surjective | Onto; codomain is fully covered | Image equals |
| Bijective | Both injective and surjective | Perfect pairing |
Bijections are invertible: a bijection has a unique inverse satisfying . They formalize equal cardinality, allowing us to compare even infinite sets.
Composition & Pitfalls
Functions compose: for and , the composition applies first, then . Composition is associative, and the composition of two bijections is again a bijection.
Common pitfall: Confusing injective with surjective, and reading composition left to right. Injective forbids input collisions; surjective requires full codomain coverage. In , the function on the right () acts first. Reversing this order yields the wrong result.