# 8.4: Images and Preimages of Functions

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

There are two important types of sets related to functions.

Definition 8.83. Let $$f:X\to Y$$ be a function.

1. If $$S\subseteq X$$, the image of $$S$$ under $$f$$ is defined via $f(S):= \{f(x) \mid x\in S\}.$
2. If $$T\subseteq Y$$, the preimage (or inverse image) of $$T$$ under $$f$$ is defined via $f^{-1}(T):= \{x\in X \mid f(x)\in T\}.$

The image of a subset $$S$$ of the domain is simply the subset of the codomain we obtain by mapping the elements of $$S$$. It is important to emphasize that the function $$f$$ maps elements of $$X$$ to elements of $$Y$$, but we can apply $$f$$ to a subset of $$X$$ to yield a subset of $$Y$$. That is, if $$S\subseteq X$$, then $$f(S)\subseteq Y$$. Note that the image of the domain is the same as the range of the function. That is, $$f(X)=\range(f)$$.

When it comes to preimages, there is a real opportunity for confusion. In Section 8.3, we introduced the inverse relation $$f^{-1}$$ of a function $$f$$ (see Defintion 8.70) and proved that this relation is a function exactly when $$f$$ is a bijection (see Theorem 8.74). If $$f^{-1}:Y\to X$$ is a function, then it is sensible to write $$f^{-1}(y)$$ for $$y\in Y$$. Notice that we defined the preimage of a subset of the codomain regardless of whether $$f^{-1}$$ is a function or not. In particular, for $$T\subseteq Y$$, $$f^{-1}(T)$$ is the set of elements in the domain that map to elements in $$T$$. As a special case, $$f^{-1}(\{y\})$$ is the set of elements in the domain that map to $$y\in Y$$. If $$y\notin \range(f)$$, then $$f^{-1}(\{y\})=\emptyset$$. Notice that if $$y\in Y$$, $$f^{-1}(\{y\})$$ is always a sensible thing to write while $$f^{-1}(y)$$ only makes sense if $$f^{-1}$$ is a function. Also, note that the preimage of the codomain is the domain. That is, $$f^{-1}(Y)=X$$.

Problem 8.84. Define $$f:\mathbb{Z}\to\mathbb{Z}$$ via $$f(x)=x^2$$. List elements in each of the following sets.

1. $$f(\{0,1,2\})$$
2. $$f^{-1}(\{0,1,4\})$$

Problem 8.85. Define $$f:\mathbb{R}\to\mathbb{R}$$ via $$f(x)=3x^2-4$$. Find each of the following sets.

1. $$f(\{-1,1\})$$
2. $$f([-2,4])$$
3. $$f((-2,4))$$
4. $$f^{-1}([-10,1])$$
5. $$f^{-1}((-3,3))$$
6. $$f(\emptyset)$$
7. $$f(\mathbb{R})$$
8. $$f^{-1}(\{-1\})$$
9. $$f^{-1}(\emptyset)$$
10. $$f^{-1}(\mathbb{R})$$

Problem 8.86. Define $$f:\mathbb{R}\to\mathbb{R}$$ via $$f(x)=x^2$$.

1. Find two nonempty subsets $$A$$ and $$B$$ of $$\mathbb{R}$$ such that $$A\cap B=\emptyset$$ but $$f^{-1}(A)=f^{-1}(B)$$.
2. Find two nonempty subsets $$A$$ and $$B$$ of $$\mathbb{R}$$ such that $$A\cap B=\emptyset$$ but $$f(A)=f(B)$$.

Problem 8.87. Suppose $$f:X\to Y$$ is an injection and $$A$$ and $$B$$ are disjoint subsets of $$X$$. Are $$f(A)$$ and $$f(B)$$ necessarily disjoint subsets of $$Y$$? If so, prove it. Otherwise, provide a counterexample.

Problem 8.88. Find examples of functions $$f$$ and $$g$$ together with sets $$S$$ and $$T$$ such that $$f(f^{-1}(T))\neq T$$ and $$g^{-1}(g(S))\neq S$$.

Problem 8.89. Let $$f:X\to Y$$ be a function and suppose $$A, B\subseteq X$$ and $$C, D\subseteq Y$$. Determine whether each of the following statements is true or false. If a statement is true, prove it. Otherwise, provide a counterexample.

1. If $$A\subseteq B$$, then $$f(A)\subseteq f(B)$$.
2. If $$C\subseteq D$$, then $$f^{-1}(C)\subseteq f^{-1}(D)$$.
3. $$f(A\cup B)\subseteq f(A)\cup f(B)$$.
4. $$f(A\cup B)\supseteq f(A)\cup f(B)$$.
5. $$f(A\cap B)\subseteq f(A)\cap f(B)$$.
6. $$f(A\cap B)\supseteq f(A)\cap f(B)$$.
7. $$f^{-1}(C\cup D)\subseteq f^{-1}(C)\cup f^{-1}(D)$$.
8. $$f^{-1}(C\cup D)\supseteq f^{-1}(C)\cup f^{-1}(D)$$.
9. $$f^{-1}(C\cap D)\subseteq f^{-1}(C)\cap f^{-1}(D)$$.
10. $$f^{-1}(C\cap D)\supseteq f^{-1}(C)\cap f^{-1}(D)$$.
11. $$A\subseteq f^{-1}(f(A))$$.
12. $$A\supseteq f^{-1}(f(A))$$.
13. $$f(f^{-1}(C))\subseteq C$$.
14. $$f(f^{-1}(C))\supseteq C$$.

Problem 8.90. For each of the statements in the previous problem that were false, determine conditions, if any, on the corresponding sets that would make the statement true.

We can generalize the results above to handle arbitrary collections of sets.

Theorem 8.91. Let $$f:X\to Y$$ be a function and suppose $$\{A_{\alpha}\}_{\alpha\in\Delta}$$ is a collection of subsets of $$X$$.

1. $$\displaystyle f\left(\bigcup_{\alpha\in\Delta} A_{\alpha}\right)=\bigcup_{\alpha\in\Delta} f\left(A_{\alpha}\right)$$.
2. $$\displaystyle f\left(\bigcap_{\alpha\in\Delta} A_{\alpha}\right)\subseteq\bigcap_{\alpha\in\Delta} f\left(A_{\alpha}\right)$$.

Theorem 8.92. Let $$f:X\to Y$$ be a function and suppose $$\{C_{\alpha}\}_{\alpha\in\Delta}$$ is a collection of subsets of $$Y$$.

1. $$\displaystyle f^{-1}\left(\bigcup_{\alpha\in\Delta} C_{\alpha}\right)=\bigcup_{\alpha\in\Delta} f^{-1}\left(C_{\alpha}\right)$$.
2. $$\displaystyle f^{-1}\left(\bigcap_{\alpha\in\Delta} C_{\alpha}\right)=\bigcap_{\alpha\in\Delta} f^{-1}\left(C_{\alpha}\right)$$.

Problem 8.93. Consider the equivalence relation given in Theorem 8.44. Explain why each equivalence class $$[a]$$ is equal to $$f^{-1}(\{f(a)\})$$.

Problem 8.94. Suppose that $$f: \mathbb{R}\to \mathbb{R}$$ is a function satisfying $$f(x+y)=f(x)+f(y)$$ for all $$x,y\in\mathbb{R}$$.

1. Prove that $$f(0)=0$$.
2. Prove that $$f(-x)=-f(x)$$ for all $$x\in\mathbb{R}$$.
3. Prove that $$f$$ is injective if and only if $$f^{-1}(\{0\})=\{0\}$$.
4. Certainly every function given by $$f(x)=mx$$ for $$m\in\mathbb{R}$$ satisfies the initial hypothesis. Can you provide an example of a function that satisfies $$f(x+y)=f(x)+f(y)$$ that is not of the form $$f(x)=mx$$?

This page titled 8.4: Images and Preimages of Functions is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Dana Ernst via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.