In mathematics, for a function f : X → Y {\displaystyle f:X\to Y} , the image of an input value x {\displaystyle x} is the single output value produced by f {\displaystyle f} when passed x {\displaystyle x} . The preimage of an output value y {\displaystyle y} is the set of input values that produce y {\displaystyle y} .
More generally, evaluating f {\displaystyle f} at each element of a given subset A {\displaystyle A} of its domain X {\displaystyle X} produces a set, called the "image of A {\displaystyle A} under (or through) f {\displaystyle f} ". Similarly, the inverse image (or preimage) of a given subset B {\displaystyle B} of the codomain Y {\displaystyle Y} is the set of all elements of X {\displaystyle X} that map to a member of B . {\displaystyle B.}
The image of the function f {\displaystyle f} is the set of all output values it may produce, that is, the image of X {\displaystyle X} . The preimage of f {\displaystyle f} , that is, the preimage of Y {\displaystyle Y} under f {\displaystyle f} , always equals X {\displaystyle X} (the domain of f {\displaystyle f} ); therefore, the former notion is rarely used.
Image and inverse image may also be defined for general binary relations, not just functions.