Tutorials › Real Analysis › Images Versus Preimages

Sets and Functions · Tutorial 71 of 1000

Images Versus Preimages

Images carry a set of inputs forward, while preimages pull a set of outputs back to the inputs that reach it.

Beginner 13 min read

What You'll Learn

  • How images and preimages start from opposite sides of a function
  • Why an image of a preimage is restricted by the range
  • What happens when each operation is followed by the other
  • How to translate inclusion between images and preimages
  • When applying both operations recovers the original set

Two Directions Through a Function

The previous tutorials defined images and preimages separately. For a function \(f:A\to B\), the image of a set \(S\subseteq A\) is the collection of values attained at inputs in \(S\): $$ f[S]=\{f(x):x\in S\}. $$ For a set \(T\subseteq B\), the preimage is the collection of inputs whose values lie in \(T\): $$ f^{-1}[T]=\{x\in A:f(x)\in T\}. $$ The square brackets emphasize that these are operations on sets. The image starts with inputs and produces outputs; the preimage starts with outputs and identifies qualifying inputs.

The difference is easy to blur because both operations involve the same function. But their inputs and outputs live in different sets: \(f[S]\subseteq B\), whereas \(f^{-1}[T]\subseteq A\). An image asks, “Where do the members of this domain set go?” A preimage asks, “Which domain elements go into this codomain set?”

Keep the direction visible. For \(f:A\to B\), an image takes a subset of \(A\) to a subset of \(B\). A preimage takes a subset of \(B\) to a subset of \(A\). Neither operation requires \(f\) to have an inverse function.

A useful way to compare the operations is to apply one and then the other. Starting from \(T\subseteq B\), first take its preimage and then the image. Starting from \(S\subseteq A\), first take its image and then the preimage. These two round trips do not generally give back the set with which they began. The range of \(f\), and the possibility that different inputs share an output, explain why.

Image After Preimage

Take a set \(T\subseteq B\). The preimage \(f^{-1}[T]\) contains exactly the inputs whose outputs belong to \(T\). Taking its image therefore collects the values in \(T\) that are actually attained by the function. Any elements of \(T\) outside the range cannot appear in this image.

Theorem (Image of a Preimage). Let \(f:A\to B\), and let \(T\subseteq B\). Then $$ f[f^{-1}[T]]=T\cap\operatorname{ran}(f). $$

Proof. We prove equality by showing that an arbitrary object belongs to the left-hand set exactly when it belongs to the right-hand set. Let \(y\) be any object. By the definition of image, $$ y\in f[f^{-1}[T]] \quad\Longleftrightarrow\quad \text{there exists }x\in f^{-1}[T]\text{ such that }y=f(x). $$ By the definition of preimage, such an \(x\) satisfies \(x\in A\) and \(f(x)\in T\). Thus \(y=f(x)\) implies both \(y\in T\) and \(y\in\operatorname{ran}(f)\). Hence \(y\in T\cap\operatorname{ran}(f)\).

Conversely, suppose \(y\in T\cap\operatorname{ran}(f)\). Then \(y\in T\), and because \(y\in\operatorname{ran}(f)\), there exists \(x\in A\) such that \(f(x)=y\). Since \(y\in T\), we have \(f(x)\in T\), so \(x\in f^{-1}[T]\). Also \(y=f(x)\), and therefore \(y\in f[f^{-1}[T]]\). We have proved membership in both directions, so the sets are equal by the Equality of Condition-Defined Sets Theorem. \(\square\)

The range restriction is essential. The theorem says that this round trip recovers exactly the part of \(T\) that the function can reach, not necessarily all of \(T\). In particular, \(f[f^{-1}[T]]=T\) precisely when \(T\subseteq\operatorname{ran}(f)\). If \(f\) is surjective, its range is all of \(B\), so this equality holds for every \(T\subseteq B\).

Worked Example: An Unattained Target Value

Let \(f:\mathbb R\to\mathbb R\) be defined by \(f(x)=x^2\), and take \(T=\{-1,4\}\). A real square is never negative, so only \(4\) in \(T\) is attained. Solving \(x^2=4\) gives \(x=-2\) or \(x=2\), and thus $$ f^{-1}[T]=\{-2,2\}. $$ Taking the image gives \(f[f^{-1}[T]]=\{4\}\). The range is \([0,\infty)\), so $$ T\cap\operatorname{ran}(f)=\{-1,4\}\cap[0,\infty)=\{4\}. $$ The identity accounts for the missing value \(-1\): it belongs to the target but not to the range.

Preimage After Image

Now begin with \(S\subseteq A\). The image \(f[S]\) records outputs reached by at least one member of \(S\). Its preimage contains every input in \(A\) that reaches any of those outputs. It must contain \(S\), but it can contain additional inputs outside \(S\) if they share an output with an element of \(S\).

Theorem (Preimage of an Image). Let \(f:A\to B\), and let \(S\subseteq A\). Then $$ S\subseteq f^{-1}[f[S]]. $$ Moreover, if \(f\) is injective, then $$ f^{-1}[f[S]]=S. $$

Proof. Let \(x\in S\). By the definition of image, \(f(x)\in f[S]\). Therefore \(x\in A\) and \(f(x)\in f[S]\), which by the definition of preimage means \(x\in f^{-1}[f[S]]\). This proves the inclusion.

Now suppose \(f\) is injective. We already have \(S\subseteq f^{-1}[f[S]]\), so it remains to prove the reverse inclusion. Let \(x\in f^{-1}[f[S]]\). Then \(x\in A\) and \(f(x)\in f[S]\). By the definition of image, there exists \(s\in S\) such that \(f(x)=f(s)\). Since \(f\) is injective, equality of these function values implies \(x=s\). Because \(s\in S\), it follows that \(x\in S\). Thus \(f^{-1}[f[S]]\subseteq S\), and equality follows by equality by double inclusion. \(\square\)

Injectivity is a sufficient condition for equality for every \(S\), but it is not necessary for a particular set \(S\). The exact issue is whether an input outside \(S\) has the same output as some input in \(S\). If so, that outside input appears in \(f^{-1}[f[S]]\). A set that contains every domain element sharing an output with one of its members is sometimes described as a union of whole fibers of \(f\).

Worked Example: A Noninjective Function and a Whole Fiber

Let \(q:\mathbb R\to\mathbb R\) be given by \(q(x)=x^2\), and let \(S=\{-3,3\}\). This function is not injective because \(q(-3)=q(3)\), but here the set \(S\) contains both inputs with output \(9\). We have $$ q[S]=\{9\} \qquad\text{and}\qquad q^{-1}[q[S]]=q^{-1}[\{9\}]=\{-3,3\}=S. $$ Thus the round trip happens to recover \(S\), even though the function is not injective. By contrast, for \(S=\{3\}\), the image is still \(\{9\}\), but the preimage of that image is \(\{-3,3\}\), which strictly contains \(S\).

Worked Example: A Linear Function on the Integers

Define \(g:\mathbb Z\to\mathbb Z\) by \(g(n)=2n\), and let \(T=\{1,2,4,7\}\). The preimage consists of the integers \(n\) for which \(2n\) equals one of these values. The odd values \(1\) and \(7\) have no integer preimages, while \(2\) and \(4\) have preimages \(1\) and \(2\). Hence $$ g^{-1}[T]=\{1,2\}, \qquad g[g^{-1}[T]]=\{2,4\}. $$ The range of \(g\) is the set of even integers, so \(T\cap\operatorname{ran}(g)=\{2,4\}\), as the image-of-a-preimage theorem predicts.

Inclusion Translates in Both Directions

Images and preimages also give a precise way to express that all outputs from one set lie in a specified target. The key equivalence below says that placing the image of \(S\) inside \(T\) is exactly the same as requiring every member of \(S\) to lie in the preimage of \(T\). This provides a useful translation between a statement about outputs and a statement about inputs.

Theorem (Image–Preimage Inclusion Equivalence). Let \(f:A\to B\), \(S\subseteq A\), and \(T\subseteq B\). Then $$ f[S]\subseteq T \quad\Longleftrightarrow\quad S\subseteq f^{-1}[T]. $$

Proof. First suppose \(f[S]\subseteq T\). Let \(x\in S\). By definition, \(f(x)\in f[S]\), and the assumed inclusion gives \(f(x)\in T\). Since \(x\in A\), the definition of preimage gives \(x\in f^{-1}[T]\). Thus \(S\subseteq f^{-1}[T]\).

Conversely, suppose \(S\subseteq f^{-1}[T]\). Let \(y\in f[S]\). By the definition of image, there exists \(x\in S\) such that \(y=f(x)\). The assumed inclusion implies \(x\in f^{-1}[T]\), so \(f(x)\in T\). Therefore \(y\in T\), and every element of \(f[S]\) belongs to \(T\). Hence \(f[S]\subseteq T\). Both implications hold, proving the equivalence. \(\square\)

This equivalence does not say that an image and a preimage are the same kind of object. Rather, it links two inclusion statements, each in the correct set. It is especially useful when the target condition is simpler to check on function values, or when a desired image inclusion can be rephrased as a condition on the original inputs.

Worked Example: Verifying an Image Is Inside an Interval

Let \(r:\mathbb R\to\mathbb R\) be defined by \(r(x)=x^2+1\), let \(S=[-2,2]\), and let \(T=[1,5]\). For every \(x\in S\), we have \(0\leq x^2\leq4\), so adding \(1\) gives \(1\leq r(x)\leq5\). Therefore \(r(x)\in T\) for each \(x\in S\), which shows \(S\subseteq r^{-1}[T]\). By the Image–Preimage Inclusion Equivalence, $$ r[S]\subseteq T. $$ Indeed, the endpoint values are \(r(-2)=r(2)=5\), and \(r(0)=1\), so the image is \([1,5]\) and the inclusion is exact.

A Practical Comparison

When working with these operations, identify the starting set before manipulating notation. If the starting set is in the domain, taking its image moves it to the codomain. If the starting set is in the codomain, taking its preimage moves it to the domain. The direction helps catch errors such as claiming that \(f^{-1}[T]\) is a subset of \(B\) or that \(f[S]\) is a subset of \(A\).

Question Image Preimage
Starting set \(S\subseteq A\) \(T\subseteq B\)
Membership condition \(y=f(x)\) for some \(x\in S\) \(x\in A\) and \(f(x)\in T\)
Resulting set \(f[S]\subseteq B\) \(f^{-1}[T]\subseteq A\)
Typical round trip \(f[f^{-1}[T]]=T\cap\operatorname{ran}(f)\) \(S\subseteq f^{-1}[f[S]]\)

The round-trip results summarize two distinct limitations. Image after preimage cannot recover output values that the function never attains. Preimage after image may include extra inputs that share outputs with the original set. Surjectivity removes the first limitation for all codomain subsets; injectivity removes the second for all domain subsets. These are different properties, addressing different directions of the comparison.

1
Check where the set lies: an image starts with a subset of \(A\), and a preimage starts with a subset of \(B\).
2
Write the membership condition: use \(y=f(x)\) for image membership and \(f(x)\in T\) for preimage membership.
3
Track what a round trip can lose or add: unattained outputs are lost, while inputs sharing an output can be added.
4
Translate inclusions: \(f[S]\subseteq T\) and \(S\subseteq f^{-1}[T]\) express the same condition.
Key takeaway. An image moves a domain set forward; a preimage moves a codomain set backward. Their round trips are controlled by the range and by whether distinct inputs can have the same output. The Image–Preimage Inclusion Equivalence gives a reliable way to translate between their inclusion statements.

Check Your Understanding

  1. If \(f:A\to B\), which set contains \(f[S]\) when \(S\subseteq A\), and which set contains \(f^{-1}[T]\) when \(T\subseteq B\)?
  2. Let \(f(x)=x^2\) on \(\mathbb R\) and \(T=\{-4,9\}\). Find \(f^{-1}[T]\) and \(f[f^{-1}[T]]\).
  3. State the identity for \(f[f^{-1}[T]]\) in terms of \(T\) and the range of \(f\).
  4. Why does \(S\subseteq f^{-1}[f[S]]\) always hold? What property of \(f\) guarantees equality for every \(S\subseteq A\)?
  5. Let \(f:A\to B\), \(S\subseteq A\), and \(T\subseteq B\). State the equivalence relating \(f[S]\subseteq T\) to an inclusion involving \(f^{-1}[T]\).