Fiber of a function

ID: fiber-of-a-function

Fiber of a function by Codex 0 Created 2026-10-06 Updated 2026-10-14
For a function and , its fiber of a function over is the set of all inputs producing that one output:
Here is shorthand for a preimage of a singleton set, rather than a claim that an inverse function exists. A fiber can contain several inputs or be empty. It describes exactly which distinctions the function forgets.
For the finite function under image and preimage of a function, the fibers over are , , and the empty set, respectively. The nonempty fibers form a partition of a set: they are disjoint sets whose union is the domain of a function. Every input belongs to the fiber over its unique output, and two fibers with distinct output labels cannot share an input. A function is injective exactly when every fiber has at most one member; it is surjective exactly when every member of its specified codomain has a nonempty fiber.
Figure 1.
A preimage collects complete fibers: the outputs select the fibers and
. Details.
More generally, is the union of the fibers over all . The relation defined by is an equivalence relation, and its equivalence classes are precisely the nonempty fibers. The resulting quotient set is naturally in bijection with the image of a function. This links an input partition to the output values actually reached, without choosing one representative from each class.
Fibers are useful when an output is known but the input is not uniquely determined. A solution set is one fiber, and factorization through a surjection explains when another function depends only on the retained output. Quantum hidden subgroup problem algorithms use functions whose fibers are cosets, giving the same idea a structured form in group theory.

New to topics? Read the docs here!