Union and Intersection
Suppose you are told that a number belongs to the set of even integers, or to the set of multiples of , or possibly both. How should mathematics record "or" and "and" between sets as precisely as it records them between statements? This question is not idle bookkeeping. Nearly every construction in analysis, algebra, and computer science combines collections of objects. It does this by asking what is in either of two sets, or what is in both. Union and intersection are the two most basic operations for building new sets from old ones. They turn the loose vocabulary of "or" and "and" into operations with exact, checkable defining conditions. The importance of getting this right is that these two operations generate an entire algebra of sets. Together with Set Equality and Extensionality, they mirror the algebra of logical connectives almost exactly. Once union and intersection are pinned down by precise membership conditions, statements like "union distributes over intersection" become theorems. They are provable from the definitions of , , and , rather than appeals to pictures. The big picture is that set theory builds all of its machinery from a small number of primitive operations. Each is defined by a membership condition: an if-and-only-if statement. It tells you exactly when an object belongs to the newly constructed set. Union and intersection are the first and most fundamental examples of this pattern. The technique used to prove facts about them — element-chasing, guided by extensionality — is the technique used throughout the rest of set theory. This article gives the formal definitions of and . It proves the core algebraic laws (commutativity, associativity, distributivity, absorption, and idempotence) with full element-chasing proofs. It works two concrete asymmetric examples, and shows exactly what fails when a hypothesis is dropped. It closes by placing union and intersection in the wider landscape. That landscape includes Set Difference and Complement, Proving Set Identities, and Indexed Families of Sets.
- collects everything in or (inclusive or); collects everything in both.
- Both are defined by a single biconditional membership condition, then equality of sets is checked via Set Equality and Extensionality.
- Union and intersection are commutative, associative, idempotent, and each distributes over the other.
- always holds, for any sets .
- characterizes disjointness; exactly when .
- Key idea: union and intersection translate "or" and "and" from logic into operations on sets, and every set-algebra identity about them is really a logic identity in disguise.
Where this lives today
Union and intersection are the backbone of measure theory and probability, where events are subsets of a sample space and (inclusion–exclusion) governs the probability of " or ." In topology, arbitrary unions of open sets and finite intersections of open sets are declared open by definition, making union and intersection the literal generators of a topology. In computer science, database query languages implement `UNION` and `INTERSECT` as direct set operations on result tables, and Boolean circuit design uses OR-gates and AND-gates as the physical realization of and at the level of truth values. In formal logic and proof theory, the correspondence , used throughout the proofs above is an instance of the broader algebraic structure called a Boolean algebra, which unifies set algebra, propositional logic, and switching circuits under one axiomatic roof. In cryptography and coding theory, intersections of codewords or key sets determine collision and security bounds, while unions describe the total space of possible messages or attacks under consideration.
Ask the tutor: How do the distributive laws for union and intersection generalize when one of the sets is replaced by an infinite indexed family?
Let and be sets. The union of and , written , is the set defined by the membership condition
The intersection of and , written , is the set defined by the membership condition
Here is the inclusive or: holds if is in , or in , or in both. Two sets are called disjoint if . That such sets and actually exist (as genuine sets, not just descriptions) is guaranteed by the Axiom of Union and the Axiom Schema of Separation in Zermelo–Fraenkel set theory; at this level we take their existence and uniqueness (via Set Equality and Extensionality) as given, and treat the biconditionals above as the operative working definition.
Intuition
Picture and as two overlapping regions in a plane — the classical Venn diagram. The union is the entire shaded area covered by at least one of the two regions: you are asking "is in the left circle, the right circle, or the lens where they overlap?" The intersection is only the lens, the strip common to both: you are asking the much stronger question "is in the left circle and simultaneously in the right circle?" Because "and" is a stronger demand than "or," intersection always produces a smaller (or equal) set than union, and both are squeezed between the empty set and the full union of everything under discussion. A second useful picture is arithmetic with sets of numbers. If and , then merges the lists (discarding repeats) to get , while keeps only what survives in both lists, namely . This "merge vs. filter" intuition — union merges, intersection filters — is exactly the logical content of versus , transported wholesale into the language of sets.
Let , , be any sets. Then all of the following hold. 1. Commutativity: and . 2. Associativity: and . 3. Idempotence: and . 4. Identity and annihilator laws: and . 5. Absorption: and . 6. Distributivity: and . 7. Monotonicity of inclusion: . 8. Union-subset and intersection-subset criteria: .
The unifying technique is element-chasing: to prove two sets are equal, invoke Set Equality and Extensionality, which reduces to proving for an arbitrary object . Each membership statement about or is then rewritten using the defining biconditionals, reducing every set identity to a tautology of propositional logic in the variables , , . We prove each part in full; several parts are genuinely independent tautologies and each is checked separately, not merely asserted "by symmetry" without justification, though once a law is proved for the identical logical tautology (with swapped) justifies the parallel statement for .
(1) Commutativity. Fix arbitrary . By definition of union,
Disjunction is commutative as a connective ( is a tautology, verified by a two-row truth table since it has only one variable pair with symmetric truth values). Hence
So for arbitrary ; by extensionality . The same argument with (commutative by an identical truth-table check) gives .
(2) Associativity. Fix arbitrary . Unwinding definitions twice,
Associativity of , i.e. , is a tautology: both sides are true exactly when at least one of is true, and false exactly when all three are false — this is checked by an eight-row truth table exhausting all assignments to . Hence the two membership conditions above are equivalent for every , so by extensionality . The intersection case follows identically using associativity of (true exactly when all of hold).
(3) Idempotence. For arbitrary , , and is a tautology (trivial two-row check). So , giving by extensionality. Likewise gives .
(4) Identity/annihilator. For arbitrary , . Since has no members, is false for every ; thus , a tautology (). So . Similarly , and is a tautology, so is false for every , meaning has no elements; by extensionality it equals (two sets with no elements are equal, since the biconditional "" holds vacuously — both sides always false).
(5) Absorption. For arbitrary ,
The propositional identity is a tautology: if is true the left side is true (first disjunct) and the right side is true; if is false, is false, so the left side is false, matching the right side. Checking all four rows of the truth table confirms this. Hence , so . Dually, is also a tautology (identical four-row check), giving .
(6) Distributivity. For arbitrary ,
The tautology is verified by an eight-row truth table over : in every row the two sides agree (for instance, when is false the left side reduces to and the right side reduces to as well; when is true both sides are true). Hence the two membership conditions coincide for every , and extensionality gives . The dual tautology is checked the same way, giving .
(7) Monotonicity. Suppose . By definition this means , which in particular implies (conjunction elimination — a valid inference, not merely a tautology check, since is a tautology). So every element of is an element of , i.e. . Similarly, if then holds (disjunction introduction: is a tautology), so ; hence .
(8) Subset criteria. We prove the chain of three equivalences by proving , then , then ; these three implications chain into all pairwise equivalences (a standard closing-the-loop argument for proving several statements equivalent). (): Assume . By part (7), always. For the reverse inclusion, let , so . If then since ; if then trivially . Either way . So , and with the reverse inclusion, by the antisymmetry of (a set-theoretic consequence of extensionality). (): Assume . By part (7), always, so it remains to show . Let . Then (part 7 again, or directly since ), and by hypothesis , so . Thus and , i.e. . So , giving . (): Assume . Let . Then (since ), so by definition , in particular . Hence . Chaining these three implications establishes all three statements are pairwise equivalent, completing the proof of part (8) and of the theorem.
∎Worked examples
Example 1 (finite sets of mixed type, asymmetric sizes). Let
These sets have different sizes (, ) and only partial overlap, which is exactly the kind of case that exposes errors a symmetric example would hide. Union. By definition iff or . Listing every element of , then adjoining every element of not already listed:
Check: , consistent with the inclusion–exclusion count computed below. Intersection. By definition iff is in both lists. Scanning against , the only common value is . Hence
Check via Theorem, part (7). We must have . Indeed (true, is listed), and (true, every element of appears in the union list). Both inclusions hold, confirming the computation is consistent with monotonicity. Check via part (8). Since and neither is a subset of the other ( and ), the theorem predicts and — and indeed , and , matching the prediction exactly.
Example 2 (sets defined by conditions, not by listing). Let be the set of integers divisible by , and let be the set of integers divisible by :
These are infinite sets, so we cannot list elements; we must reason directly from the membership condition. Union. By definition, iff or . So, for instance, (since ), (since ), and (since both hold), but (neither nor divides ). There is no simpler single-modulus description of ; it genuinely is the union, not reducible to "divisible by " for any one . Intersection. By definition, iff and , i.e. is a common multiple of and . A standard number-theoretic fact (provable by unique factorization) is that the common multiples of and are exactly the multiples of . So
Concretely , while (since , even though ) — a useful reminder that membership in alone is not enough; both conditions in the must hold. Check via Theorem, part (7). Every multiple of is a multiple of , so ; and every multiple of satisfies "divisible by or by ," so . Both containments hold as predicted, and here neither is an equality (e.g. but , and but ), showing the inclusions in part (7) are generally strict.
Theorem parts (1)–(8) were all proved using the biconditional membership conditions
Suppose instead we weaken the definition of union to only the forward implication,
without requiring the converse. This is a genuine weakening: it says every element of lies in or , but it no longer forces every element of or to land in . Under this weaker one-directional rule, take , , and let . Check the forward implication for in place of "": every (namely ) satisfies (true, ) or (also true), so the implication holds for every . So is a perfectly legal candidate for "" under the weakened, implication-only rule — yet fails to contain and , both of which certainly ought to belong to a union. Worse, so is : vacuously every satisfies anything, so also satisfies the one-way rule. Thus the weakened definition does not pin down a unique set at all — it admits , , , , and more, all simultaneously "legal," which contradicts the very purpose of a definition together with Set Equality and Extensionality (namely, to determine one specific set). This shows precisely why the defining condition must be a biconditional: the forward direction alone only bounds from above (nothing "extra" gets in), while the backward direction is what forces everything that should be included actually to be included. Dropping either half breaks uniqueness, and every proof in the Theorem block above used both directions of the biconditional at some point (for instance, part (7)'s proof that used disjunction introduction feeding into the backward direction of the union's defining biconditional).
Scope, edge cases & common traps
| Situation | What to watch for |
|---|---|
| ; union and intersection collapse to the common value (idempotence). | |
| , disjoint | ; union has size when finite. |
| One set empty | and always — never assume . |
| and (Theorem part 8); a common source of "obvious" but unproved claims. | |
| Infinite sets given by conditions | Cannot list elements; must reason from the membership biconditional directly, as in Example 2. |
| Confusing with exclusive or | uses inclusive or; elements in both and are still counted once in . |
The mathematician behind it
Origins · 1 minGeorg Cantor and how this was discovered
Georg Cantor created set theory as an independent mathematical discipline in the 1870s–1880s, seeking a rigorous foundation for treating collections of infinite objects — such as the set of all real numbers or all points on a line — as legitimate mathematical entities subject to precise operations, including union and intersection of arbitrarily infinite families. His work provoked fierce controversy (Kronecker and others rejected completed infinities outright) but ultimately became the bedrock on which nearly all of modern mathematics, including the formal treatment given here, is built.
Is A ∪ B always at least as large as A?
Yes, whenever these are finite sets: by Theorem part (7), and a subset of a finite set has cardinality no greater than the whole set. In fact for finite sets, (inclusion–exclusion), which is at least since (because , so ). For infinite sets "size" needs cardinal arithmetic, but the inclusion itself holds unconditionally, regardless of finiteness.
Does A ∩ B always contain something, i.e. can it be empty?
Yes, it can absolutely be empty, and often is. Whenever and share no common element — for example and — the definition gives , and no satisfies both, so . This is precisely the definition of and being disjoint. There is no hypothesis in the definitions of union or intersection that forces overlap; disjointness is a special, extra condition on the pair , not a general guarantee.
How is union different from the logical "or" it is built from?
Union is a set-forming operation, while "or" () is a connective between two truth-valued statements. They are linked, not identical: is defined precisely so that the statement "" is logically equivalent to the statement " or ." Every algebraic law about (commutativity, associativity, distributivity) is literally a restatement, via this biconditional, of the corresponding tautology about . The set operation packages the logical connective into an object you can then intersect, take subsets of, or apply further operations to.
Why do we need extensionality to prove things like commutativity of union?
The definitions of and only tell you the membership condition — when an object belongs to the set. To conclude that two differently described sets, such as and , are the same set, you need a principle converting "same membership condition for every " into "same set." That principle is exactly Set Equality and Extensionality: two sets are equal if and only if they have exactly the same elements. Every proof in this article's Theorem block ends by invoking extensionality after establishing the biconditional on memberships.
What happens with unions and intersections of more than two sets, or infinitely many sets?
Everything here generalizes, but requires new notation and a new definition, covered separately under Indexed Families of Sets. Briefly, for a family , one defines by , and by , mirroring the quantifiers and the same way binary union and intersection mirror and . Associativity of the binary operations is exactly what makes finite unions and intersections well-defined regardless of parenthesization before this generalization is even needed.
Is there an operation capturing "in A but not B"? Is that related to union and intersection?
Yes — that is set difference, , treated under Set Difference and Complement. It is built from the same logical toolkit ( together with negation ), and interacts with union and intersection through identities such as De Morgan's laws, . Understanding union and intersection first, with their biconditional-and-truth-table proof method, is exactly the preparation needed to prove those difference/complement identities rigorously rather than just diagrammatically.
Can A ∪ B ever equal A ∩ B without A = B?
No. If , take any . Then (since always), so by the assumed equality , which means . This shows . By a symmetric argument starting from , one gets . Two mutual inclusions give by extensionality. So forces ; it is not a coincidence but a provable equivalence, and conversely if then trivially .