A function f:A→B is surjective if every b∈B has some a∈A such that f(a)=b.
That is, its codomain is equal to its image.
This concept is commonly referred to as being "onto", as in "The function f is onto."
Examples
- The function N→{6} (where N is the set of natural numbers) given by n↦6 is surjective. However, the same function viewed as a function N→N is not surjective, because it does not hit the number 4, for instance.
- The function N→N given by n↦n+5 is not surjective, because it does not hit the number 2, for instance: there is no a∈N such that a+5=2.