A preimage is the set of inputs that map into a given subset of the codomain: if f:A→Bf:A\to B is a and T⊆BT\subseteq B, then

f−1(T)={a∈A:f(a)∈T}⊆A.f^{-1}(T)=\{a\in A: f(a)\in T\}\subseteq A.
Remarks

Unlike an , the preimage f−1(T)f^{-1}(T) is defined for every function and every TT of the codomain. Preimages interact well with set operations such as and .

Examples
  • For f:R→Rf:\mathbb{R}\to\mathbb{R} given by f(x)=x2f(x)=x^2, the preimage of {1}\{1\} is f−1({1})={−1,1}f^{-1}(\{1\})=\{-1,1\}.
  • For p:Z→{0,1}p:\mathbb{Z}\to\{0,1\} defined by parity, the preimage p−1({0})p^{-1}(\{0\}) is the set {2k:k∈Z}\{2k:k\in\mathbb{Z}\} of even integers.