Surjection (Surjective Function) — Definition, Formula & Examples
A surjection is a function where every element in the codomain is mapped to by at least one element in the domain. In other words, the function 'hits' every possible output value — nothing in the codomain is left out.
A function is surjective (onto) if for every , there exists at least one such that . Equivalently, the range of equals its codomain: .
Key Formula
Where:
- = The domain of the function
- = The codomain of the function
- = The function from A to B
How It Works
To show a function is surjective, pick an arbitrary element in the codomain and demonstrate that you can solve for some in the domain. If you can always find such an , the function is onto. To show a function is not surjective, find a single element in the codomain that no input maps to. The distinction between codomain and range is critical here: a surjection is precisely a function whose range and codomain coincide.
Worked Example
Problem: Let be defined by . Prove that is surjective.
Pick an arbitrary element in the codomain: Let be any real number in the codomain . We need to find an such that .
Solve for a: Rearrange the equation to isolate .
Verify the solution is in the domain: Since is any real number, is also a real number, so . Therefore, for every , we found an with .
Answer: Since every real number has a preimage , the function is surjective.
Why It Matters
Surjectivity is essential in linear algebra (determining whether a linear transformation spans the target space) and in abstract algebra (classifying homomorphisms). In discrete math and computer science, proving that a function is both injective and surjective (bijective) is the standard technique for showing two sets have the same cardinality.
Common Mistakes
Mistake: Confusing range with codomain and concluding every function is surjective because it maps to its range.
Correction: Surjectivity depends on the specified codomain, not just the range. For example, defined by is not surjective because negative numbers in the codomain have no preimage, even though the range is fully covered.
