From a Set of Outputs to Its Inputs
The previous tutorial asked what outputs are produced by inputs in a chosen subset of the domain. We now reverse the question. Given a set of possible outputs, which inputs are sent into that set? This collection of inputs is called a preimage. It is useful whenever a condition is imposed on function values: the preimage identifies all domain elements whose values satisfy that condition.
Let \(f:A\to B\), and choose a set \(T\subseteq B\). The condition \(T\subseteq B\) matters because every value of \(f\) lies in \(B\). A preimage consists of elements of \(A\), not elements of \(B\). Its members are selected by checking where their outputs fall.
Definition (Preimage of a Set). Let \(f:A\to B\), and let \(T\subseteq B\). The preimage of \(T\) under \(f\), denoted \(f^{-1}[T]\), is the set $$ f^{-1}[T]=\{x\in A:f(x)\in T\}. $$ Equivalently, for every object \(x\), $$ x\in f^{-1}[T] \quad\Longleftrightarrow\quad x\in A\text{ and }f(x)\in T. $$
The notation \(f^{-1}[T]\) is standard for a preimage, but it does not assert that \(f\) has an inverse function. It describes a set of inputs satisfying a membership condition, and it is defined for every function. Even when a function is not injective or not surjective, \(f^{-1}[T]\) still makes sense for every \(T\subseteq B\).
The preimage may be empty, may equal the entire domain, or may contain many inputs for a single output. If \(T=\varnothing\), no function value belongs to \(T\), so no input qualifies. If \(T=B\), every value \(f(x)\) belongs to \(B\), so every element of \(A\) qualifies. In symbols, these endpoint cases are $$ f^{-1}[\varnothing]=\varnothing \qquad\text{and}\qquad f^{-1}[B]=A. $$ Neither statement requires the function to be one-to-one or onto.
Computing a Preimage
To compute a preimage from a formula, translate membership in the target set into a condition on \(f(x)\), then solve that condition for \(x\) while retaining the domain restriction. For a finite target, test which domain elements have outputs in that target. For an interval, solve the appropriate inequality or inequalities. The result must be written as a subset of the stated domain.
Worked Example: A Quadratic Function and an Interval
Let \(f:\mathbb R\to\mathbb R\) be defined by \(f(x)=x^2\), and take \(T=(1,9]\). By definition, $$ x\in f^{-1}[T] \quad\Longleftrightarrow\quad x\in\mathbb R\text{ and }1<x^2\leq9. $$ The inequality \(x^2\leq9\) is equivalent to \(-3\leq x\leq3\). The condition \(x^2>1\) is equivalent to \(x<-1\) or \(x>1\). Combining these conditions gives $$ f^{-1}[T]=[-3,-1)\cup(1,3]. $$ The endpoints reflect the target interval: \(x=\pm3\) are included because their squares equal \(9\), while \(x=\pm1\) are excluded because their squares equal \(1\), which is not in \(T\). Both negative and positive inputs must be included, since each can have a square in the target interval.
The function’s codomain and the target set play different roles. A target need not be all of the codomain; it is simply the output set whose membership condition we are testing. Some values in the target may not be attained by the function. That does not prevent taking the preimage: such values contribute no inputs.
Worked Example: A Finite Target for an Integer Function
Define \(g:\mathbb Z\to\mathbb Z\) by \(g(n)=3n+1\), and let \(T=\{-5,1,10\}\). We seek the integers \(n\) such that \(3n+1\) equals one of the three target values. Solving each equation gives $$ 3n+1=-5\Longrightarrow n=-2,\qquad 3n+1=1\Longrightarrow n=0,\qquad 3n+1=10\Longrightarrow n=3. $$ Each solution is an integer in the domain. Direct checks give \(g(-2)=-5\), \(g(0)=1\), and \(g(3)=10\). No other integer can qualify, because any member of \(g^{-1}[T]\) must solve one of these three equations. Therefore $$ g^{-1}[T]=\{-2,0,3\}. $$
Worked Example: A Linear Function and a Half-Open Interval
Let \(h:\mathbb R\to\mathbb R\) be defined by \(h(x)=2x-1\), and let \(T=[3,7)\). Membership in the preimage means $$ x\in h^{-1}[T] \quad\Longleftrightarrow\quad 3\leq2x-1<7. $$ Adding \(1\) to each part gives \(4\leq2x<8\). Dividing by the positive number \(2\) preserves the inequality directions, so \(2\leq x<4\). Hence $$ h^{-1}[T]=[2,4). $$ At \(x=2\), the output is \(3\), which belongs to \(T\); at \(x=4\), the output is \(7\), which does not. These endpoint checks agree with the interval notation.
Preimages Preserve Inclusion
If one target set is contained in another, every output that belongs to the smaller target also belongs to the larger target. Consequently, any input whose output lands in the smaller set also has its output in the larger set. This gives an inclusion rule for preimages. Notice that this statement concerns the order of the target sets and the resulting sets of inputs.
Theorem (Preimages Preserve Inclusion). Let \(f:A\to B\), and let \(S,T\subseteq B\). If \(S\subseteq T\), then $$ f^{-1}[S]\subseteq f^{-1}[T]. $$
Proof. Suppose \(S\subseteq T\). To prove the claimed subset relation, let \(x\in f^{-1}[S]\) be arbitrary. By the definition of preimage, \(x\in A\) and \(f(x)\in S\). Since \(S\subseteq T\), membership \(f(x)\in S\) implies \(f(x)\in T\). Applying the definition again gives \(x\in f^{-1}[T]\). Thus every element of \(f^{-1}[S]\) belongs to \(f^{-1}[T]\), so \(f^{-1}[S]\subseteq f^{-1}[T]\). \(\square\)
The reverse implication need not hold: two different target sets can have the same preimage. For example, let \(c:\mathbb R\to\mathbb R\) be the constant function \(c(x)=0\). If \(S=\{0\}\) and \(T=\{0,1\}\), then \(S\subseteq T\), and both preimages equal \(\mathbb R\). More generally, a target set’s elements that are never attained by \(f\) do not add inputs to its preimage.
Preimages and Set Operations
The membership definition makes preimages especially compatible with set operations. An output belongs to a union when it belongs to at least one of the sets; an output belongs to an intersection when it belongs to both. Applying those conditions to \(f(x)\) yields corresponding identities for preimages. Complements require a specified universal set, so when \(T\subseteq B\), the complement \(T^c\) in the following identity is taken relative to \(B\).
Theorem (Preimages of Unions and Intersections). Let \(f:A\to B\), and let \(S,T\subseteq B\). Then $$ f^{-1}[S\cup T]=f^{-1}[S]\cup f^{-1}[T] $$ and $$ f^{-1}[S\cap T]=f^{-1}[S]\cap f^{-1}[T]. $$
Proof. We first prove the union identity. Let \(x\) be any object. By the definition of preimage and the membership condition for a union, $$ \begin{aligned} x\in f^{-1}[S\cup T] &\Longleftrightarrow x\in A\text{ and }f(x)\in S\cup T\\ &\Longleftrightarrow x\in A\text{ and }(f(x)\in S\text{ or }f(x)\in T)\\ &\Longleftrightarrow (x\in A\text{ and }f(x)\in S) \text{ or }(x\in A\text{ and }f(x)\in T)\\ &\Longleftrightarrow x\in f^{-1}[S]\text{ or }x\in f^{-1}[T]\\ &\Longleftrightarrow x\in f^{-1}[S]\cup f^{-1}[T]. \end{aligned} $$ Thus the two sets have exactly the same elements, so they are equal by the Equality of Condition-Defined Sets Theorem.
For the intersection identity, again let \(x\) be any object. Then $$ \begin{aligned} x\in f^{-1}[S\cap T] &\Longleftrightarrow x\in A\text{ and }f(x)\in S\cap T\\ &\Longleftrightarrow x\in A\text{ and }(f(x)\in S\text{ and }f(x)\in T)\\ &\Longleftrightarrow (x\in A\text{ and }f(x)\in S) \text{ and }(x\in A\text{ and }f(x)\in T)\\ &\Longleftrightarrow x\in f^{-1}[S]\text{ and }x\in f^{-1}[T]\\ &\Longleftrightarrow x\in f^{-1}[S]\cap f^{-1}[T]. \end{aligned} $$ The two sets therefore have the same elements, and the equality follows. \(\square\)
The same membership argument gives a complement identity. For \(T\subseteq B\), an input belongs to \(f^{-1}[T^c]\) exactly when its output belongs to \(B\) but not to \(T\). Since \(f(x)\in B\) for every \(x\in A\), this is exactly the condition that \(x\in A\) and \(x\notin f^{-1}[T]\). Therefore $$ f^{-1}[T^c]=(f^{-1}[T])^c, $$ where the complement on the right is relative to \(A\). In particular, preimages also distribute over set differences: for \(S,T\subseteq B\), $$ f^{-1}[S\setminus T]=f^{-1}[S]\setminus f^{-1}[T]. $$ Indeed, \(f(x)\in S\setminus T\) means \(f(x)\in S\) and \(f(x)\notin T\), which is precisely the condition that \(x\in f^{-1}[S]\) and \(x\notin f^{-1}[T]\).
Worked Example: Splitting a Target into Two Pieces
Let \(p:\mathbb Z\to\mathbb Z\) be defined by \(p(n)=n+2\). Take \(S=\{0,2\}\) and \(T=\{3,5\}\). Solving for inputs gives $$ p^{-1}[S]=\{-2,0\},\qquad p^{-1}[T]=\{1,3\}. $$ The union identity predicts $$ p^{-1}[S\cup T]=\{-2,0\}\cup\{1,3\} =\{-2,0,1,3\}. $$ Checking the target directly, \(S\cup T=\{0,2,3,5\}\), and \(n+2\) belongs to this set exactly when \(n\) is \(-2,0,1,\) or \(3\). Thus the direct computation agrees with the identity.
A Reliable Method and a Common Notation Trap
A preimage problem can be approached as a membership question rather than as a search for an inverse formula. State that \(x\) belongs to the domain, impose the condition that \(f(x)\) belongs to the target, and solve. This approach works even when the function has no inverse function. If a target contains values outside the range, they simply have no corresponding inputs; they do not make the preimage undefined.
The notation \(f^{-1}[T]\) can look like an instruction to apply an inverse function to every element of \(T\). That interpretation is not required here. The definition instead describes all domain elements whose function values belong to \(T\). If \(f\) is bijective, its inverse function exists and is a separate object; the preimage notation remains meaningful whether or not that function exists. This distinction lets us discuss the inputs satisfying output conditions for arbitrary functions.
Check Your Understanding
- Let \(f:A\to B\) and \(T\subseteq B\). Give the definition of \(f^{-1}[T]\), and state which set it is a subset of.
- Does the notation \(f^{-1}[T]\) require \(f\) to be bijective? Explain why or why not.
- For \(q:\mathbb R\to\mathbb R\) defined by \(q(x)=x^2\), find \(q^{-1}[\{4\}]\).
- If \(S\subseteq T\subseteq B\), what inclusion holds between \(f^{-1}[S]\) and \(f^{-1}[T]\)?
- State the identities for preimages of \(S\cup T\) and \(S\cap T\).
- If \(T^c\) is the complement of \(T\) relative to \(B\), relative to which set is the complement of \(f^{-1}[T]\) taken in the identity \(f^{-1}[T^c]=(f^{-1}[T])^c\)?