Functions
Jim Hefferon · GFDL + CC BY-SA 2.5 · Introduction to Proofs
A function from A to B assigns exactly one element of B to each element of A. Three properties matter: injective (one-to-one), surjective (onto), and bijective (both). A function has an inverse if and only if it is bijective.
Injective (one-to-one)
A function f is injective if f(a) = f(b) implies a = b. No two inputs map to the same output. To prove injectivity: assume f(a) = f(b), then show a = b.
Surjective (onto)
A function f: A to B is surjective if every element of B is hit. For every b in B, there exists an a in A with f(a) = b. To prove surjectivity: given arbitrary b in B, find an explicit a.
Bijective and inverse functions
A function is bijective if it is both injective and surjective. Bijections have inverses: f-inverse(b) is the unique a with f(a) = b. Composition of bijections is a bijection.
Composition
If f: A to B and g: B to C, then g composed with f: A to C. Composition preserves injectivity and surjectivity. If g composed with f is injective, then f is injective. If g composed with f is surjective, then g is surjective.
Neighbors
- 🐱 Milewski Ch.2 — types and functions as objects and arrows
- 📐 Linear Algebra Ch.3 — linear maps are functions preserving structure
- 🐱 Category Theory Ch.2 — functions as morphisms between types
- ∫ Calculus Ch.1 — functions and graphs: the same objects used in calculus
- 🔗 Abstract Algebra Ch.3 — homomorphisms are structure-preserving functions