# 12.6: Image and Preimage

- Page ID
- 24875

It is time to take up a matter of notation that you will encounter in future mathematics classes. Suppose we have a function \(f: A \rightarrow B\). If \(X \subseteq A\), the expression \(f(X)\) has a special meaning. It stands for the set \(\{f(x) : x \in X\}\). And if \(Y \subseteq B\), then \(f^{-1}(Y)\) has a meaning even if f is not invertible: it stands for the set \(\{x \in A : f(x) \in Y\}\). Here are the precise definitions.

Definition 12.9

Suppose \(f : A \rightarrow B\) is a function.

1. If \(X \subseteq A\), the **image **of X is the set \(f(X) = \{f(x):x \in X \subseteq B\}\).

2. If \(Y \subseteq B\), the **preimage **of Y is the set \(f^{-1}(Y) = \{x \in A : f(x) \in Y \subseteq A\}\).

In words, the image \(f(X)\) of X is the set of all things in B that f sends elements of X to. (Roughly speaking, you might think of \(f(X)\) as a kind of distorted “copy” or “image” of X in B.) The preimage \(f^{-1}(Y)\) of Y is the set of all things in A that f sends into Y .

Maybe you have already encountered these ideas in linear algebra, in a setting involving a linear transformation \(T : V \rightarrow W\) between two vector spaces. If \(X \subseteq V\) is a subspace of V, then its image \(T(X)\) is a subspace of W. If \(Y \subseteq W\) is a subspace of W, then its preimage \(T^{-1}(Y)\) is a subspace of V. (If this does not sound familiar, then ignore it.)

Example 12.13

Let \(f :\{s,t,u,v,w,x,y,z\} \rightarrow \{0,1,2,3,4,5,6,7,8,9\}\) be \(f = \{(s,4),(t,8),(u,8),(v,1),(w,2),(x,4),(y,6),(z,4)\}\).

This f is neither injective nor surjective, so it certainly is not invertible. Be sure you understand the following statements.

1. \(f(\{s,t,u,z\}) = \{8,4\}\)

2. \(f(\{s,x,z\}) = \{4\}\)

3. \(f(\{s,v,w,y\}) = \{1,2,4,6\}\)

4. \(f(\emptyset) = \emptyset\)

5. \(f^{-1}(\{4\}) = \{s,x,z\}\)

6. \(f^{-1}(\{4,9\})= \{s,x,z\}\)

7. \(f^{-1}(\{9\}) = \emptyset\)

8. \(f^{-1}(\{1,4,8\}) = \{s,t,u,v,x,z\}\)

It is important to realize that the X and Y in Definition 12.9 are subsets (not elements!) of A and B. In Example 12.13 we had \(f^{-1}(\{4\}) = \{s, x, z\}\), while \(f^{-1}(4)\) is meaningless because the inverse function \(f^{-1}\) does not exist. And there is a subtle difference between \(f(\{s\}) = \{4\}\) and \(f(s) = 4\). Be careful.

Example 12.14

Consider the function \(f : \mathbb{R} \rightarrow \mathbb{R}\) defined as \(f(x) = x^2\). Note that \(f(\{0,1,2\}) = \{0,1,4\}\) and \(f^{-1}(\{0,1,4\}) = \{-2,-1,0,1,2\}\). This shows that \(f^{-1}(f(X)) \ne X\) in general.

Using the same f, check your understanding of these statements about images and preimages of intervals: \(f ([-2,3]) = [0,9]\), and \(f^{-1}([0,9]) = [-3,3]\). Also \(f(\mathbb{R}) = [0,\infty)\) and \(f^{-1}([-2,-1]) = \emptyset\).

If you continue with mathematics you will likely encounter the following results. For now, you are asked to prove them in the exercises.

Theorem 12.4

Given \(f :A \rightarrow B\), let \(W, X \subseteq A\), and \(Y, Z \subseteq B\). Then

1. \(f(W \cap X) \subseteq f(W) \cap f(X)\)

2. \(f(W \cup X) = f(W) \cup f(X)\)

3. \(X \subseteq f^{-1}f(X)\)

4. \(f^{-1}(Y \cup Z) = f^{-1}(Y) \cup f^{-1}(Z)\)

5. \(f^{-1}(Y \cap Z) = f^{-1}(Y) \cap f^{-1}(Z)\)

6. \(f(f^{-1}(Y)) \subseteq Y\).

## Exercise

Exercise \(\PageIndex{1}\)

Consider the function \(f : \mathbb{R} \rightarrow \mathbb{R}\) defined as \(f(x) = x^2+3\). Find \(f([-3,5])\) and \(f^{-1}([12, 19])\).

Exercise \(\PageIndex{2}\)

Consider the function \(f : \{1,2,3,4,5,6,7\} \rightarrow \{0,1,2,3,4,5,6,7,8,9\}\) given as \(f = \{(1,3), (2,8), (3,3), (4,1), (5,2), (6,4), (7,6)\}\).

Find: \(f(\{1,2,3\} , f(\{4,5,6,7\}), f (\emptyset), f(\{0,5,9\})\) and \(f(\{0,3,5,9\})\).

Exercise \(\PageIndex{3}\)

This problem concerns functions \(f : \{1,2,3,4,5,6,7\} \rightarrow \{0,1,2,3,4\}\). How many such functions have the property that \(|f^{-1}(\{3\})| = 3\)?

Exercise \(\PageIndex{4}\)

This problem concerns functions \(f : \{1,2,3,4,5,6,7,8\} \rightarrow \{0,1,2,3,4,5,6\}\). How many such functions have the property that \(|f^{-1}(\{2\})| = 4\)?

Exercise \(\PageIndex{5}\)

Consider a function \(f : A \rightarrow B\) and a subset \(X \subseteq A\). We observed in Example 12.14 that \(f^{-1}(f(X)) \ne X\) in general. However \(X \subseteq f^{-1}(f(X))\) is always true. Prove this.

Exercise \(\PageIndex{6}\)

Given a function \(f : A \rightarrow B\) and a subset \(Y \subseteq B\), is \(f(f^{-1}(Y)) = Y\) always true? Prove or give a counterexample.

Exercise \(\PageIndex{7}\)

Given a function \(f : A \rightarrow B\) and subsets \(W,X \subseteq A\), prove \(f(W \cap X) \subseteq f(W) \cap f(X)\).

Exercise \(\PageIndex{8}\)

Given a function \(f : A \rightarrow B\) and subsets \(W,X \subseteq A\), then \(f(W \cap X) = f(W) \cap f(X)\) is false in general. Produce a counterexample.

Exercise \(\PageIndex{9}\)

Given a function \(f : A \rightarrow B\) and subsets \(W,X \subseteq A\), prove \(f(W \cup X) = f(W) \cup f(X)\).

Exercise \(\PageIndex{10}\)

Given \(f : A \rightarrow B\) and subsets \(Y,Z \subseteq B\), prove \(f^{-1}(Y \cap Z) = f^{-1}(Y) \cap f^{-1}(Z)\).

Exercise \(\PageIndex{11}\)

Given \(f : A \rightarrow B\) and subsets \(Y,Z \subseteq B\), prove \(f^{-1}(Y \cup Z) = f^{-1}(Y) \cup f^{-1}(Z)\).

Exercise \(\PageIndex{12}\)

Consider \(f : A \rightarrow B\). Prove that f is injective if and only if \(X = f^{-1}(f(X))\) for all \(X \subseteq A\). Prove that f is surjective if and only if \(f(f^{-1}(Y)) =Y\) for all \(Y \subseteq B\).

Exercise \(\PageIndex{13}\)

Let \(f : A \rightarrow B\) be a function, and \(X \subseteq A\). Prove or disprove: \(f(f^{-1}(f(X))) = f(X)\).

Exercise \(\PageIndex{14}\)

Let \(f : A \rightarrow B\) be a function, and \(Y \subseteq B\). Prove or disprove: \(f^{-1}(f(f^{-1}(f(X))) = f^{-1}(Y)\).