Introduction to Function Types
You'll learn: How functions are classified by three fundamental properties that describe the nature of their input-output relationships.
The Core Idea
We've already studied relations between sets. A function is a special relation where each input maps to exactly one output. But not all functions behave the same way when we look at how they map elements from domain to codomain.
Three key properties distinguish different "types" of functions:
1. Injectivity (One-to-One)
A function is injective if different inputs always produce different outputs. No two domain elements map to the same codomain element.
Analogy: Think of student ID numbers—each student gets a unique ID. If two students can't share an ID, the assignment is injective.
Formally: f is injective if f(a) = f(b) implies a = b.
2. Surjectivity (Onto)
A function is surjective if every element in the codomain is "hit" by at least one element from the domain. Nothing in the codomain is left unused.
Analogy: Every seat in a theater must have at least one ticket sold to it. The ticket-to-seat assignment is surjective if no seats remain empty.
Formally: f: A → B is surjective if for every b ∈ B, there exists a ∈ A such that f(a) = b.
3. Bijectivity (Both!)
A function is bijective if it's both injective and surjective—a perfect pairing between domain and codomain elements.
Analogy: A one-to-one dance where every person from group A is paired with exactly one person from group B, and everyone participates.
Key Takeaway: Functions are classified by injectivity (no collisions in outputs), surjectivity (complete coverage of codomain), and bijectivity (both properties together).