6.5 Images and preimages

If we restrict the codomain of our function to only contain its outputs, we obtain the image of the function.

Definition 6.35 (Image of a function).

Given a function f:DCf:D\to C, the set {f(x):xD}\{f(x):x\in D\} is called the image of ff.

Exercise 6.36.

  1. 1.

    What is the image of the function f:f:\mathbb{R}\to\mathbb{R} defined by f(x)=3x21f(x)=3x^{2}-1?

  2. 2.

    What is the image of the function g:(0,)g:(0,\infty)\to\mathbb{R} defined by g(x)=3x21g(x)=3x^{2}-1?

Solution (please try for yourself before looking)
  1. 1.

    Since f(x)=3x21f(x)=3x^{2}-1 and x20x^{2}\geq 0 for all xx\in\mathbb{R}, we have f(x)1f(x)\geqslant-1 for all such xx. In particular, for every y[1,)y\in[-1,\infty),

    f(y+13)=3(y+13)21=yf\left(\sqrt{\frac{y+1}{3}}\right)=3\left(\sqrt{\frac{y+1}{3}}\right)^{2}-1=y

    and y1y\geqslant-1 implies that y+130\frac{y+1}{3}\geqslant 0 so the square root is defined. Hence, the image of ff is the set [1,)[-1,\infty).

  2. 2.

    The function gg is the the function ff but with a domain (0,)(0,\infty) that is a strict subset of the domain of ff. This means the image of gg should be a subset of the image of ff. Indeed, if we take any y[1,)y\in[-1,\infty), we know from the previous part that

    f(y+13)=y,f\left(\sqrt{\frac{y+1}{3}}\right)=y,

    but now we need to ensure that y+13(0,)\sqrt{\frac{y+1}{3}}\in(0,\infty). We know that y+130\sqrt{\frac{y+1}{3}}\geqslant 0 by definition of the square root, so the only possible issue is if y+13=0\sqrt{\frac{y+1}{3}}=0 and this only occurs when y=1y=-1. Hence, we need to remove 1-1 from the image of ff to give us (1,)(-1,\infty) for the image of gg.

We can also talk about the image of a subset of our domain.

Definition 6.37 (Image of a subset).

Given a function f:DCf:D\to C and a subset SDS\subseteq D, the set

f(S):={f(x):xS}f(S):=\{f(x):x\in S\}

is called the image of SS under ff.

The image of a subset SS of the domain is the set of outputs that our function maps elements of SS to. If we instead consider all the inputs that our function maps into a particular subset UU of the codomain, we obtain the preimage of that subset UU.

Definition 6.38 (Preimage).

Given a function f:XYf:X\to Y, the preimage of UYU\subseteq Y under ff is the subset

f1(U)={xX:f(x)U}.f^{-1}(U)=\{x\in X:f(x)\in U\}.

Note that the preimage is defined for all functions and all subsets of a function’s codomain. It has nothing to do with the inverse of a function (we haven’t even defined the inverse yet!).

Proposition 6.39.

Let f:STf:S\rightarrow T be a function with ASA\subseteq S and BTB\subseteq T. Then

  1. (a)

    Af1(f(A))A\subseteq f^{-1}(f(A)) and

  2. (b)

    f(f1(B))Bf(f^{-1}(B))\subseteq B.

Proof.
  1. (a)

    If we take xAx\in A, then f(x)f(A)f(x)\in f(A). Thus, xx is an element of the domain that ff maps to an element in f(A)f(A). Hence, xf1(f(A))x\in f^{-1}(f(A)) and so, Af1(f(A))A\subseteq f^{-1}(f(A)).

  2. (b)

    If we take yf(f1(B))y\in f(f^{-1}(B)), then there exists some xf1(B)x\in f^{-1}(B) such that f(x)=yf(x)=y. But since xf1(B)x\in f^{-1}(B), we must have f(x)=yBf(x)=y\in B. Hence, f(f1(B))Bf(f^{-1}(B))\subseteq B.

Theorem 6.40.

Let f:XYf:X\rightarrow Y be a function and B,BYB,B^{\prime}\subseteq Y. Then

  1. (a)

    f1(BB)=f1(B)f1(B)f^{-1}(B\cap B^{\prime})=f^{-1}(B)\cap f^{-1}(B^{\prime}) and

  2. (b)

    f1(BB)=f1(B)f1(B)f^{-1}(B\cup B^{\prime})=f^{-1}(B)\cup f^{-1}(B^{\prime}).

Proof.

To show the first equality in part (a), note that xf1(BB)x\in f^{-1}(B\cap B^{\prime}) if and only if f(x)BBf(x)\in B\cap B^{\prime}. Therefore, f(x)Bf(x)\in B and f(x)Bf(x)\in B^{\prime}, which is true if and only if xf1(B)x\in f^{-1}(B) and xf1(B)x\in f^{-1}(B^{\prime}), that is, if and only if xf1(B)f1(B)x\in f^{-1}(B)\cap f^{-1}(B^{\prime}). Thus, f1(BB)=f1(B)f1(B)f^{-1}(B\cap B^{\prime})=f^{-1}(B)\cap f^{-1}(B^{\prime}).

The second equation in part (b) has a similar proof to (a) (just change “and” to “or”).