Skip to main content

Section 2.5 Images and preimages

Definition 2.5.1.

If \(f\colon X\rightarrow Y\) is a map and \(A\subseteq X\) is a subset, then the image of \(A\) under \(f\) is the set

\begin{equation*} f(A)=\{f(x):x\in A\} \subseteq Y\text{.} \end{equation*}

If \(B\subseteq Y\text{,}\) the preimage of \(B\) under \(f\) is

\begin{equation*} f^{-1}(B)=\{x\in X: f(x)\in B\} \subseteq X\text{.} \end{equation*}

Some authors call the preimage the inverse image.

Warning 2.5.2.

This notation is a little ambiguous since we have already let \(f^{-1}\) denote the inverse of a bijective function \(f\text{,}\) whereas now we are using it to denote the preimage of a set under a function \(f\) that might not be bijective.

Notice, however, that an author's meaning can be deciphered from context: if \(f\colon X\rightarrow Y\) is a map, and one writes \(f^{-1}(y)\) for an element \(y\in Y\text{,}\) you'll know they are referring to \(f^{-1}\) as a function. If one writes \(f^{-1}(A)\) for a set \(A\), you'll know they are talking about the preimage as defined above.

Notice also that if \(f\) is bijective — so that the function \(f^{-1}\) exists in the first place — then there are two ways of reading what \(f^{-1}(A)\) means: it is the image of \(A\) under \(f^{-1}\text{,}\) and it is the preimage of \(A\) under \(f\text{,}\) but in this case, these two are the same set, so there is no ambiguity!

If \(f\colon\NN_0\rightarrow \NN_0\) is \(f(n)=n+1\text{,}\) and \(A=\{2n:n\in\NN_0\}\) is the set of even integers, then the image of \(A\) under \(f\) is

\begin{equation*} f(A)=\{f(n):n\in A\} = \{f(2n): n\in\NN_0\} = \{2n+1:n\in\NN_0\}\text{,} \end{equation*}

that is, \(f(A)\) are the odd integers.

To show the first equality, note that \(x\in f^{-1}(A\cap B)\) if and only if \(f(x)\in A\cap B\text{,}\) that is, \(f(x)\in A\) and \(f(x)\in B\text{,}\) which is true if and only if \(x\in f^{-1}(A)\) and \(x\in f^{-1}(B)\text{,}\) that is, if and only if \(x\in f^{-1}(A)\cap f^{-1}(B)\text{.}\) Thus, \(f^{-1}(A\cap B)=f^{-1}(A)\cap f^{-1}(B)\text{.}\) The second equation has a similar proof (basically just change the “and's” to “or's”).

Definition 2.5.5.

Let \(X\) and \(Y\) be sets, and let \(f\colon X \to Y\) be a map. If \(y \in Y\text{,}\) then the fiber of \(f\) over \(y\) is the preimage

\begin{equation*} f^{-1}\{y\} = \{x \in X : f(x) = y\} \end{equation*}

Consider the map \(f \colon \NN_0 \to \NN_0\) given by the formula \(f(m) = m^2 - 2m + 2\text{.}\) For any natural number \(n\text{,}\) the fiber over \(n\) is the set

\begin{equation*} f^{-1}(n) = \{m\in\NN_0 : m^2-2m+2 = n\}\text{,} \end{equation*}

which is really the set of solutions to the equation \(m^2-2m+2=n\) in \(\NN_0\text{.}\) So we may do some computations:

\begin{align*} f^{-1}\{0\} \amp= \varnothing\\ f^{-1}\{1\} \amp= \{1\}\\ f^{-1}\{2\} \amp= \{0,2\}\\ f^{-1}\{3\} \amp= \varnothing\\ f^{-1}\{4\} \amp= \varnothing\\ f^{-1}\{5\} \amp= \{3\} \end{align*}

Let \(f \colon X \to Y \) be a map. Then \(f\) is injective if and only if, for every element \(y \in Y\text{,}\) the fiber \(f^{-1}\{y\}\) is a finite set of cardinality no greater than \(1\text{.}\) The map \(f\) is surjective if and only if, for every element \(y \in Y\text{,}\) the fiber \(f^{-1}\{y\}\) is nonempty.

Let \(X\) and \(Y\) be sets, and let \(f\colon X \to Y\) be a map. If \(y,z\in Y\) are elements such that \(y \neq z\text{,}\) then it follows from the theorem above that the fibers over \(y\) and \(z\) are disjoint; that is,

\begin{equation*} f^\{-1\}\{y\} \cap f^\{-1\}\{z\} = \varnothing\text{.} \end{equation*}

If, in addition, \(Y\) is a finite set, then if we write \(Y = \{y_1, y_2, \dots, y_n\}\text{,}\) then the theorem above also tells us that

\begin{equation*} X = f^\{-1\}\{y_1\} \cup f^\{-1\}\{y_2\} \cup \cdots \cup f^\{-1\}\{y_n\}\text{.} \end{equation*}

Let's write \(X_i = f^{-1}\{y_i\}\text{.}\) Thus we may think of \(f\) as partitioning \(X\) into the \(n\) disjoint subsets \(X_1, X_2, \dots, X_n\text{.}\) The final observation from the previous section gives us a tremendously useful formula:

\begin{equation*} |X| = |X_1| + |X_2| + \cdots + |X_n|\text{,} \end{equation*}

which we will repeatedly use to create counting arguments when we study combinatorics.