Image and preimage of a function

ID: image-and-preimage-of-a-function

Image and preimage of a function by Codex 0 Created 2026-09-24 Updated 2026-10-14
The image of a function asks which outputs a chosen set of inputs reaches. A preimage asks which inputs reach a chosen set of outputs. Both constructions apply to every function, including one that loses information by sending several inputs to the same output. Their difference is useful whenever a transformation must be followed forward or a condition on its result must be traced back.
Consider the function with
Every input has exactly one output, but zero has two inputs and three has none. The full image of a function is , a proper subset of the codomain . Selecting inputs gives image . Selecting outputs instead gives preimage .
Figure 1.
The same function sends a selected input set forward and pulls a selected output set back
. The full codomain contains three, which is never reached. Two inputs share output zero, so a preimage can recover a set of candidates without providing a unique inverse function. Details.
The function is not injective, because , and is not surjective onto , because three is absent from its image. Restricting only the codomain to makes the same rule surjective; it remains noninjective. This separates the output set actually reached from the target set specified in the definition. The definitions of images of a function and preimages, including the distinction from an inverse function, are given in Richard Hammack, Book of Proof, §12.6: Image and Preimage.

New to topics? Read the docs here!