Sets and functions are intimately related, as we will see throughout the chapter. Here we begin to explore some basic connections. Suppose $f\colon A\to B$ is a function. If $X\subseteq A$, define $$ f(X)=\{b\in B: \exists\, a\in X (b=f(a))\}\subseteq B, $$ called the image of $X$. If $Y\subseteq B$, define $$ f^{-1}(Y)=\{a\in A:f(a)\in Y\}\subseteq A, $$ called the preimage of $Y$. There is real opportunity for confusion here: the letter $f$ is being used in two different, though related, ways. We can apply $f$ to elements of $A$ to get elements of $B$, or we can apply it to subsets of $A$ to get subsets of $B$. Similarly, we can talk about the images or preimages of either elements or subsets. Context should always make it clear what is meant, but you should be aware of the problem.

Example 4.2.1

Suppose $A=\{1,2,3,4,5,6\}$, $B=\{r,s,t,u,v,w\}$ and

$$ \begin{array}{} f(1)=r&f(3)=v&f(5)=r\\ f(2)=s&f(4)=t&f(6)=v\\ \end{array} $$

Then $$ \eqalign{f(\{1,3,5\}) &=\{r,v\},\cr f(\{4,5,6\})&=\{t,r,v\},\cr} $$ and $$ \eqalign{f^{-1}(\{r,t,u\})&=f^{-1}(\{r,t\}) = \{1,4,5\},\cr f^{-1}(\{u,w\})&=\emptyset.\cr} $$$\square$

Example 4.2.2 Suppose $f\colon \R\to \R$ is given by $f(x)=x^2$. Then $$ \eqalign {f([2,3])&=[4,9],\cr f((-2,1])&=[0,4),\cr f(\{1,2,3\})&=\{1,4,9\},\cr} $$ and $$ \eqalign{f^{-1}([0,1])&=[-1,1],\cr f^{-1}([-1,0])&=\{0\},\cr f^{-1}((-\infty,0))&=\emptyset.\cr} $$$\square$

By the range (or image) of a function $f\colon A\to B$, we mean $$ f(A)=\{b\in B:\exists a\in A\,(b=f(a))\}. $$ The range may be considerably smaller than the codomain.

Example 4.2.3 The range of the function in example 4.2.1 is $\{r,s,v,t\}$, which is a proper subset of the codomain. $\square$

Example 4.2.4 The range of $\sin\colon \R\to \R $ is $[-1,1]$. The range of $f\colon \R\to\R$ given by $f(x)=x^2$ is $[0,\infty)$. $\square$

The next two theorems show how induced set functions behave with respect to intersection and union.

Theorem 4.2.5 Suppose $f\colon A\to B$ is a function and $Y$ and $Z$ are subsets of $B$. Then

    a) $f^{-1}(Y\cup Z)= f^{-1}(Y)\cup f^{-1}(Z)$,

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

Proof. We prove part (b) and leave part (a) as an exercise. If $a\in A$, then $a\in f^{-1}(Y\cap Z)$ if and only if $f(a)$ is in $Y\cap Z$. This is true if and only if $f(a)\in Y$ and $f(a)\in Z$. This, in turn, is equivalent to $a\in f^{- 1}(Y) $ and $a\in f^{-1}(Z)$. Finally, this is true if and only if $a\in f^{-1}(Y)\cap f^{-1}(Z)$. $\qed$

Theorem 4.2.6 Suppose $f\colon A\to B$ is a function and $W$ and $X$ are subsets of $A$. Then

    a) $f(W\cup X)=f(W)\cup f(X)$,

    b) $f(W\cap X)\subseteq f(W)\cap f(X)$.

Proof. We'll do part (b). If $b\in B$ is in $f(W\cap X)$, then $b=f(a)$ for some $a\in W\cap X$. Since $a\in W\cap X$, $a$ is in both $W$ and $X$. Therefore, $b=f(a)$ is in both $f(W)$ and $f(X)$, that is, $b\in f(W)\cap f(X)$. $\qed$

It is perhaps surprising to compare these two theorems and observe that of the two induced set functions, it is $f^{-1}$ that is "better behaved'' with respect to the usual set operations.

Exercises 4.2

In the first two exercises, use the function $f\colon \{1,2,3,4,5,6,7\}\to \{a,b,c,d,e,f,g,h\}$ given by:

$$ \begin{array}{} f(1)=d&f(4)=a&f(6)=e\\ f(2)=e&f(5)=b&f(7)=f\\ f(3)=f&&\\ \end{array} $$

Ex 4.2.1 Find the following:

Ex 4.2.2 Use the function $f$ given above.

Ex 4.2.3 Suppose $f\colon \R \to \R$ is given by $f(x)= |x-1|$. Find the following:

Ex 4.2.4 Suppose $f\colon \R\to \R$ is given by $f(x)=x^2$.

Ex 4.2.5 Prove 4.2.5(a).

Ex 4.2.6 Prove 4.2.6(a).

In the next two exercises suppose $f\colon A\to B$ is a function and $\{X_i\}_{i\in I}$ is a family of subsets of $A$.

Ex 4.2.7 Prove $f(\bigcup_{i\in I}X_i)= \bigcup_{i\in I}f(X_i)$.

Ex 4.2.8 Prove $f(\bigcap_{i\in I}X_i)\subseteq \bigcap_{i\in I}f(X_i)$.

In the next two exercises suppose $\{Y_i\}_{i\in I}$ is an indexed family of subsets of $B$ and $f\colon A\to B$ is a function.

Ex 4.2.9 Prove $f^{-1}(\bigcup_{i\in I} Y_i)=\bigcup_{i\in I} f^{-1}(Y_i)$.

Ex 4.2.10 Prove $f^{-1}(\bigcap_{i\in I} Y_i)=\bigcap_{i\in I} f^{-1}(Y_i)$.