92. Surjectivity

92.1 Definition: surjective

Let $F\colon A \to B$ be a function. $F$ is said to be surjective if and only if $\operatorname{Im}(F) = B$.

92.1.1 Fact $F\colon A \to B$ is surjective if and only if for every element element $b \in B$ there is an element $a \in A$ for which $F(a) = b$.

92.1.2 Usage If $F$ is surjective, it is said to be a surjection or to be onto.

92.1.3 Warning Whether a function is surjective or not depends on the codomain you specify for it.

92.1.4 Example For the two functions $S\colon \mathrm{R} \to \mathrm{R}$ and $T\colon \mathrm{R} \to \mathrm{R}^{+}$ of 39.7.3, with $S(x) = T(x) = x^{2}$, $S$ is not surjective but $T$ is. To say that $T$ is surjective is to say that every nonnegative real number has a square root. Authors who do not normally specify codomains have to say, “$T$ is surjective onto $\mathrm{R}^{+}$.”

92.1.5 Example A function $F\colon \mathrm{R} \to \mathrm{R}$ is surjective if every horizontal line crosses its graph.

92.1.6 Exercise How do you prove that a function $F\colon A \to B$ is not surjective?

92.1.7 Exercise Let $\alpha$ be a relation on $A$.

a) Show that if $\alpha$ is reflexive, then the coordinate functions $p^{\alpha}_{1}\colon \alpha \to A$ and $p^{\alpha}_{2}\colon \alpha \to A$ are surjective.

b) Show that the converse of (a) need not be true.

92.1.8 Exercise (hard) Show that there for any set $S$, no function from $S$ to $\mathcal{P}S$ is surjective. Do not assume $S$ is finite.

Extended hint: If $F\colon S \to \mathcal{P}S$ is a function, consider the subset

$$\{x \mid x \text{ is not an element of } F(x)\}$$

No argument that says anything like “the powerset of a set has more elements than the set” can possibly work for this problem, and therefore such arguments will not be given even part credit. The reason is that we have developed none of the theory of what it means to talk about the number of elements of an infinite set, and in any case this problem is a basic theorem of that theory.

Let’s be more specific: One such invalid argument is that the function that takes $x$ to $\{x\}$ is an injective function from $S$ to $\mathcal{P}S$, and it clearly leaves out the empty set (and many others) so $\mathcal{P}S$ has “more elements” than $S$. This is an invalid argument. Consider the function from $\mathrm{N}$ to $\mathrm{N}$ that takes $n$ to $42n$. This is injective and leaves out lots of integers, so does $\mathrm{N}$ have more elements than itself?? (In any case you can come up with other functions from $\mathrm{N}$ to $\mathrm{N}$ that don’t leave out elements.)

Pages 133–134 of the book (PDF).