Images and Preimages of Sets
Suppose a function scrambles a set into a new set. We want to track what happens to entire subsets, not just single points. If is a subset of the domain, where does send it as a whole? If is a subset of the codomain, which inputs land inside ? These questions define the direct image and the inverse image . These are two of the most heavily used constructions in all of mathematics. The subtlety deserves careful treatment rather than being waved through. Images and preimages interact with unions and intersections in asymmetric ways. Preimages are extremely well-behaved: they commute perfectly with unions, intersections, and complements. Images are not: they commute with unions but only partially with intersections. The failure is exactly measured by whether is injective. Students who assume the two operations behave identically make a classically documented error. This article isolates precisely where the symmetry breaks and why. This material matters because and are the basic vocabulary for describing how structure transports across a map. Continuity in analysis and topology is defined via preimages of open sets. Measurability is defined via preimages of measurable sets. The image of a set under a homomorphism is the natural object of study in algebra. Getting the union/intersection laws exactly right is a prerequisite for all of that. So is knowing which direction needs injectivity or surjectivity. We give the precise definitions and prove the full family of interaction laws, with hypotheses stated exactly. We show where the naive intersection law for images fails. We connect this machinery forward to counting arguments about Finite Sets and Counting. Those arguments rely on tracking images of subsets under injections and surjections.
- For and , the direct image is .
- For , the inverse image (preimage) is .
- Preimages always commute with unions, intersections, and complements — no hypotheses needed.
- Images commute with unions always, but images only commute with intersections when is injective.
- always, with equality iff ; always, with equality iff is injective on the relevant set.
- Key idea: preimages are "linear" with respect to set operations because they are defined by a logical condition (), while images can merge distinct elements together, which is what breaks the intersection law.
Where this lives today
In topology and analysis, continuity of is defined as: is open in for every open . The unconditional preimage laws proven above are exactly what make arbitrary unions and finite intersections of open sets pull back to open sets, which is the backbone of the definition of a topology and why continuous functions compose well. In measure theory and probability, a function is measurable precisely when preimages of measurable sets are measurable, and the -algebra axioms (closed under countable union, complement) transfer perfectly through by the same laws, which is why random variables can be built by composing measurable functions. In algebra, the image of a subgroup under a group homomorphism is again a subgroup, and the preimage of a subgroup is again a subgroup — both facts are proved by combining the definitions here with the homomorphism property, and the kernel is the cornerstone of the First Isomorphism Theorem. In cryptography and computer science, hash functions and encryption maps are studied through exactly these lenses: a hash function's collision resistance is a statement about how badly the intersection law for images fails (many inputs colliding to one output), while a cipher's invertibility is precisely the injectivity hypothesis needed for the round-trip equalities to hold. In statistics, the preimage of an event under a statistic (a function of data) is used to compute probabilities of observed outcomes, relying on the preimage-complement and preimage-union laws to manipulate events. Finally, this machinery directly foreshadows Finite Sets and Counting: counting arguments constantly ask "how big is ?" (images can only shrink or preserve cardinality, never grow it, and equality of cardinality forces injectivity on ), and pigeonhole-style reasoning is essentially a cardinality refinement of the image–intersection failure exhibited above. Understanding images and preimages of sets is also a direct prerequisite for Cardinality of Sets, since injections and bijections are defined and compared using exactly the image/preimage vocabulary developed here, building on Composition of Functions to track how images transform under composed maps.
:::quiz[Let , . Let and . What is ?]
- ✓
:::quiz[Which single hypothesis on guarantees for every ?]
- is injective
- is surjective ✓
- is the identity function
- and are finite with
:::quiz[Which of these correctly identifies the source of the failure of in general?]
- Unions of sets are not always well-defined
- Existential quantifiers cannot be swapped past each other
- Two distinct elements in and respectively can share the same image, without being in the intersection ✓
- Preimages are not defined when is not injective
:::faq[Is it true that when is a bijection?] Yes, but only under the full bijection hypothesis (both injective and surjective), and it is worth proving rather than assuming. If is a bijection, is an honest inverse function, and . Injectivity ensures no element of can also arise from a point outside , and surjectivity ensures every point of is hit by some , which (by injectivity again) must lie outside . Both hypotheses are used essentially; the counterexample block above shows the identity fails outright once injectivity alone is dropped, and a similar example shows surjectivity alone is not sufficient either.
:::faq[Does follow from ?] Yes, and this monotonicity needs no hypothesis on . If , there is with ; since , also , so . The identical argument shows whenever . Monotonicity is actually the easy half of the union and intersection laws: the union law's "" direction and the intersection law's inclusion (item 5) both follow immediately from monotonicity applied to each or respectively.
:::faq[Can the fibers for ranging over be used to reconstruct ?] Yes: the collection of nonempty fibers partitions into disjoint, nonempty blocks, one per value actually achieved. This follows directly from the preimage laws: fibers over distinct points are disjoint because when , using law (2). Their union is all of because every lies in the fiber over . This partition-by-fibers viewpoint is exactly the bridge used later to compare and in counting arguments.
Ask the tutor: Why does the preimage complement law hold with no hypotheses, while no version of a complement law holds for direct images even under injectivity alone?
Let be a function, so and .
Direct image. For , the image of under is
In particular , and .
Inverse image (preimage). For , the preimage of under is
This is defined for every function and every subset — it requires no invertibility of at all. The notation here denotes an operation on subsets of , not (necessarily) an inverse function; when happens to be a bijection, agrees with the image of under the inverse function , which is why the same symbol is safely reused. For a single point we write , the fiber of over .
Intuition
Think of as a machine with input bin and output bin . The direct image answers: "if I feed in exactly the elements of , what collection of outputs do I get?" It is a forward-looking, existential notion — an output belongs to if some element of produces it. This existential quantifier is precisely the source of all the trouble with intersections: two different elements and can both map to the same , so can appear in both and even though need not both lie in . The preimage answers a different, backward-looking question: "which inputs are guaranteed to land in ?" This is a universal, pointwise membership test: exactly when the single, well-defined value satisfies . Because each has exactly one output , testing membership in is a condition on alone, with no existential ambiguity — this is why preimages commute with all Boolean operations without any hypothesis on .
The central theorem
Let be a function. Let be any nonempty index set, and suppose is a family of subsets of and is a family of subsets of . Let and .
(Preimage laws — hold for every function , no hypotheses.) 1. . 2. . 3. .
(Image laws.) 4. — holds for every function , no hypotheses. 5. — holds for every function ; equality for all families holds if and only if is injective. 6. If is injective, need not hold in general (only under further surjectivity assumptions); no clean complement law exists for images without extra hypotheses (see remark after the proof).
(Round-trip laws.) 7. for every , with equality for all if and only if is injective. 8. for every , with equality for all if and only if is surjective.
We prove each item using direct set-membership chasing (the standard technique for these identities: show two sets are equal by showing each element of one lies in the other, using only the definitions of , , and the logical meaning of , , complement).
(1) Preimage of a union.
Each step is a definitional unwinding or the definition of union as an existential quantifier; since the chain of iff's holds for arbitrary , the two sets are equal.
(2) Preimage of an intersection.
Identical reasoning with read as a universal quantifier. Note this requires no injectivity: the value is a single fixed element, and asking whether that single element lies in every is unambiguous regardless of how behaves elsewhere.
(3) Preimage of a complement.
(The step uses the definition of directly.)
(4) Image of a union.
The middle step swaps the order of two existential quantifiers ( becomes ), which is always logically valid — swapping two 's never changes truth value, unlike swapping and . This is exactly why no hypothesis on is needed here, in contrast to (5) below.
(5) Image of an intersection — inclusion always, equality iff injective. Inclusion. Suppose . Then there is with . For every we have , hence . Since this holds for every , . This shows
for every function and every family ; no hypothesis was used. Injective equality, for all families. Suppose is injective. Let ; we must produce a single with . Fix any (nonempty index set). Since , there is with . We claim for every . Fix ; since , there is with . Then , and injectivity of gives . As was arbitrary, , and , so . Combined with the inclusion above, equality holds. Failure of equality for some family when is not injective. Suppose is not injective: there exist in with . Take , , . Then , so . But , so . Thus equality fails for this particular family, showing that injectivity is not merely sufficient but (via this counterexample construction) necessary for the universal statement "equality holds for all families of subsets." This establishes the "if and only if" in (5): equality for every family is equivalent to injectivity of .
(6) No general complement law for images. We justify the claim by example rather than by a false general proof (a genuine "no-go" statement needs a witness). Let , , and (not injective). Let , so . Then , so . But , which is not a subset of . So even the inclusion fails without injectivity, and one checks similarly that assuming injectivity alone (without surjectivity) is not enough to force in general (if is injective but not surjective, points of lie in for every , yet can never be produced as for , unless one restricts attention to ). Hence no clean, hypothesis-free complement law exists for direct images; this is listed for completeness, in contrast to the unconditional preimage complement law (3).
(7) Round trip , equality iff injective. Inclusion, always. Let . Then by definition of image, and hence by definition of preimage. This uses no hypothesis on . Injective equality for all . Suppose injective and let . Then , so there is with . Injectivity gives . Hence , and with the inclusion above, equality holds. Equality for all injective (contrapositive). Suppose is not injective, so there are with . Let . Then , and , which strictly contains since also lies in it. So equality fails for this . This proves the converse, establishing the biconditional.
(8) Round trip , equality iff surjective. Inclusion, always. Let . Then for some , meaning . Since , . No hypothesis used. Surjective equality for all . Suppose surjective and let . Since is surjective, there is with , so , and hence . Combined with the inclusion, , giving equality. Equality for all surjective (contrapositive). Suppose is not surjective, so there is . Let . Then (no maps to ), so . Equality fails for this , proving the converse. This completes the proof of all parts.
∎Worked examples
Example 1 (a genuinely non-injective, non-surjective map, tracking all six operations). Let and , and define by
So ; is neither injective (e.g. ) nor surjective (e.g. ). Take and . Images. . . Union law (item 4). , so . On the other hand . These agree, confirming (4). Intersection law (item 5), strict inclusion this time. , so . But . Indeed
a strict inclusion, exactly as predicted since is not injective: the element appears in both and via different preimages ( and , with , but and , so ). Round trip forward (item 7). Take . Then , and (both 2 and 3 map to ). Indeed , strict because is not injective and "rides along" with . Round trip backward (item 8). Take (). Then (nothing maps to ). So . Indeed , strict because is not surjective ( is never hit, so it can never re-enter the image after being "filtered" by the preimage). Preimage complement law (item 3), a direct check. Let , so . We compute , so . Directly, (since only , and nothing maps to ). Both computations give , confirming (3) concretely.
Example 2 (an infinite setting: , , illustrating the theorem with infinite index families). Let , . This is neither injective (since ) nor surjective (negative integers and non-squares are missed). For each let (so ), and consider the family . Union law. . Then
and . These match exactly, confirming (4) in an infinite setting. Intersection failing, infinite version. Let and (asymmetric, sharing only the point in a nontrivial way but also each containing a point whose image collides with the other's). Then , so . But and , so . Indeed
because and collide under (both square to ) without or lying in the intersection — the mechanism from the general proof of item (5), realized concretely. Preimage of an intersection, done correctly (contrast). Let (all squares, including ) and . Then (squares that are at least ), so
On the other hand (every integer squares to something in , since contains all perfect squares) and (since but ). So
which matches exactly, confirming (2) holds with no injectivity assumption whatsoever — even though this very same badly violates the analogous law for images.
The theorem states for all families if and only if is injective. To see the hypothesis is essential — not just convenient — drop injectivity and watch equality fail, using a clean minimal example. Let , , and define by (the unique constant function to a one-point set; certainly not injective since but ). Let and . These are disjoint: . Compute the left side:
Compute the right side:
So : the inclusion from item (5) is present () but strict, and equality genuinely fails. The single feature of responsible is that two distinct domain points, one from each set, were identified by — precisely the phenomenon that injectivity forbids. This is not a pathology of infinite sets or of a poorly chosen ; it is the smallest possible witness, occurring already with , . Contrast this with preimages: for this same non-injective , one can check directly that still holds for every (there are only two subsets of to check, and , and both cases are immediate from the definitions). This side-by-side failure/success is the entire content of the asymmetry between images and preimages.
Scope, edge cases & common traps
| Situation | What happens | Hypothesis needed |
|---|---|---|
| applied to | Always commutes exactly | None — holds for every function |
| applied to | Always commutes exactly | None |
| applied to | Only in general | Equality (for all families) injective |
| applied to complement | No general law at all | Fails even with one-sided hypotheses alone |
| Always true | Equality (for all ) injective | |
| Always true | Equality (for all ) surjective | |
| , | Both always equal | None |
| Always equals (whole domain) | None | |
| Equals , may be a proper subset of | None; this is exactly the definition of surjectivity failing |
:::warning[The classic error: assuming in general] The single most common mistake is to treat images as if they distribute over intersection the same way preimages do, silently assuming injectivity without stating it. The correct universally valid statement is only the inclusion ; equality requires injectivity and must be justified, never asserted "by symmetry" with the (unconditional) preimage law. A related quantifier trap: " injective on " is what is really needed locally, but it suffices to assume injective on all of , which is the clean global hypothesis stated in the theorem.
The mathematician behind it
Origins · 1 minRichard Dedekind and how this was discovered
Dedekind, working alongside Cantor in the emerging language of set theory, was among the first to treat "mapping" (Abbildung) as a rigorous mathematical object subject to precise laws, rather than an informal procedure. His 1888 monograph Was sind und was sollen die Zahlen? ("What are numbers and what should they be?") develops the algebra of images and preimages of sets under mappings as basic tools, using them to define injective and surjective maps and to build the natural numbers via chains and simply infinite systems. The union/intersection laws for images and preimages, and the special role of injectivity in the intersection law, appear there in essentially the modern form, decades before the Zermelo–Fraenkel axiomatization made "set" and "function" fully precise.
Why do preimages behave better than images with respect to set operations?
Because is defined by a single, unambiguous condition on each individual : does the one value lie in ? Testing this condition against a union or intersection of target sets reduces immediately to an "or" or "and" of true/false statements about that one fixed element , and set union/intersection are themselves built from "or"/"and." No information is lost. Images, by contrast, are defined by an existential quantifier over the source set ( iff some has ), and existentials do not distribute over "and" the way they distribute over "or" — this asymmetry in first-order logic is the entire reason images fail the intersection law while preimages do not.
What happens to the theorem's laws when the index set is empty?
Convention matters here, and it is worth being explicit: by convention (an empty union of subsets of contributes nothing), while is conventionally taken to be the ambient set (an empty intersection is "everything," since the universal quantifier over an empty index set is vacuously true for every element). Both preimage laws (1) and (2) remain correct under these conventions: and , matching and . The theorem statement assumed nonempty specifically to avoid needing to fuss over this convention in the intersection-of-images proof, where a genuine element had to be exhibited.
Why does the article insist on "for all families " when stating the injectivity biconditional?
Because for a specific pair , equality can hold by coincidence even if is not globally injective — for instance if and also happen to be disjoint. What characterizes injectivity is that equality holds no matter which subsets are chosen. Stating the biconditional with the correct quantifier order (" injective for all , equality holds," not "there exist with equality") is essential; getting this quantifier order backwards is a classic logical error that this article's proof of item (5) is specifically structured to avoid, by exhibiting one universal counterexample family whenever injectivity fails.
How does this connect to composition of functions?
If and , then for , one can check directly from the definitions that , and for , — note the order reversal in the preimage formula, mirroring how composition itself reverses when passing to preimages. These composition identities, built on top of Composition of Functions, are proved by the same membership-chasing technique used throughout this article, and they are exactly what makes the preimage-continuity definition well-behaved under composing continuous functions in topology.