De Morgan's Laws for Sets
Suppose you are told that an element does not belong to the union of two sets and . What can you conclude about 's relationship to and to individually? Intuition suggests that must avoid both sets. Formalizing this intuition is exactly what De Morgan's Laws for sets accomplish. They translate a statement about the complement of a combined set into a statement about the combination of complements. In the process, they convert union into intersection and intersection into union. These laws matter because they are the set-theoretic shadow of a much older logical principle. Negating " or " gives "not and not ." Negating " and " gives "not or not ." Union corresponds to logical "or" and intersection to logical "and." Set complement corresponds to logical negation. So De Morgan's Laws for sets are really De Morgan's Laws for propositions in disguise. This connection is not a coincidence. It is the reason the same identity appears in Boolean algebra, digital circuit design, and formal logic under the same name. The big picture is that complementation is a duality-inducing operation. It swaps the roles of union and intersection throughout an expression. This is much as taking a dual swaps and in propositional logic. It also swaps meets and joins in lattice theory. Understanding this duality lets you rewrite any set expression involving complements, unions, and intersections. You can convert it into an equivalent "dual" form almost mechanically. There is no need to redo an element-chasing argument from scratch each time. This article states De Morgan's Laws precisely for two sets. It proves them rigorously using the method of double inclusion. It then generalizes them to arbitrary (possibly infinite) families of sets. Along the way we build the intuition with a diagram. We work two asymmetric numerical examples. We also show exactly which hypothesis is essential by breaking the theorem when it is dropped.
- De Morgan's Laws relate complements of unions/intersections to intersections/unions of complements.
- and , always relative to a fixed universal set .
- The laws generalize to arbitrary families: and .
- Proofs proceed by double inclusion or, equivalently, by translating the logical form of De Morgan's Laws for .
- The identities require a fixed ambient universal set — without it, "complement" is undefined and the laws have no meaning.
- Key idea: complementation swaps union and intersection; it is a duality operation on the algebra of sets.
Where this lives today
De Morgan's Laws are not a curiosity confined to introductory set theory — they are one of the most heavily used identities across the mathematical sciences. In <a class="wiki-link" href="/wiki/math-found-algebra-of-sets" data-track="wiki_article.body.wiki_link">The Algebra of Sets</a>, they are one of the core identities (alongside distributive and associative laws) used to simplify set expressions symbolically, exactly the way algebraic identities simplify polynomial expressions. In probability theory, De Morgan's Laws let you translate "the probability that at least one of several events occurs" into "one minus the probability that none occur," via — indispensable in inclusion–exclusion arguments and reliability analysis. In digital circuit design and computer engineering, the propositional form of the laws (NAND/NOR equivalences) underlies how logic gates are converted between equivalent circuit implementations, a technique used routinely in chip design to minimize gate count. In database query optimization and programming language semantics, De Morgan's Laws justify rewriting a negated compound filter condition (e.g., `NOT (x > 5 OR y < 2)`) into an equivalent conjunctive form (`x <= 5 AND y >= 2`), which query planners exploit for index usage. In topology, the laws underlie the fact that a set is open if and only if its complement is closed, since arbitrary unions of open sets are open and De Morgan's Laws convert this into the statement that arbitrary intersections of closed sets are closed — a bridge to <a class="wiki-link" href="/wiki/math-found-arbitrary-unions-intersections" data-track="wiki_article.body.wiki_link">Arbitrary Unions and Intersections</a> and to the axioms of a topological space. In formal verification and cryptographic protocol analysis, De Morgan-style rewriting of Boolean predicates is a standard normalization step before applying SAT solvers.
Ask the tutor: Can you show me how De Morgan's Laws combine with the distributive laws to fully simplify a three-set expression like ?
Let be a universal set, and let be subsets of . Write for the complement of relative to . Then:
More generally, let be any index set (possibly empty, finite, or infinite) and let be an indexed family of subsets of . Then:
(When , the convention is and , so both generalized identities reduce to and , which hold trivially.)
Intuition
Think of as a rectangular universe, with and drawn as circles inside it, as in a standard Venn diagram. The union is everything covered by at least one circle; its complement is therefore the region outside both circles entirely — the area that misses and misses . But "misses " is exactly membership in , and "misses " is exactly membership in . Being in both of these regions simultaneously is precisely membership in . This is the geometric content of the first law. The second law flips the picture. The intersection is the lens-shaped overlap of the two circles; its complement is everything outside that lens — which includes points outside , points outside , or both. That is a union, not an intersection, of the two complements. The key perceptual shift is that negating a combined coverage condition ("covered by at least one") turns it into an avoid-all condition (intersection of complements), while negating a joint membership condition ("in both") turns it into an avoid-at-least-one condition (union of complements). Union and intersection trade places precisely because "and" and "or" trade places under negation — the same phenomenon you meet when negating quantified or compound logical statements.
Theorem and Proofs
Let be a set, let , and let be an indexed family of subsets of for an arbitrary index set . Writing complements relative to , the following hold: 1. (Binary, union form) . 2. (Binary, intersection form) . 3. (General, union form) . 4. (General, intersection form) .
We use double inclusion: to prove for sets , it suffices to show and , since a set is determined entirely by its elements (this is the axiom of extensionality, already presumed by Proving Set Identities). Throughout, means and ; we suppress explicit mention of "" since we work entirely within and all sets in play are subsets of .
Part 1: . () Let . By definition of complement, . By definition of union, , so means it is not the case that ( or ). By De Morgan's Law for propositions applied to the statement "," we obtain
i.e., and . Hence and , so . This shows . () Let . By definition of intersection, and , i.e., and . Applying De Morgan's Law for propositions in the reverse direction,
so it is not the case that or , i.e., . Hence . This shows . Combining both inclusions, .
Part 2: . () Let , so , i.e., it is not the case that ( and ). By De Morgan's Law for propositions,
so or ; that is, or , which by definition of union means . Hence . () Let , so or , i.e., or . Applying De Morgan's Law for propositions in reverse,
so it is not the case that and , i.e., , so . Hence . Combining both inclusions, . This proves Parts 1 and 2. (Note that the entire argument reduces, at the level of elements, to the propositional De Morgan's Laws and , which themselves are verified by a four-row truth table over — a fact we take as already established from propositional logic and do not re-derive here.)
Part 3: . Recall the definitions: if and only if there exists with ; and if and only if for all , . () Let . Then , i.e., it is not the case that there exists with . By the quantifier form of De Morgan's Law (negation of an existential is a universal negation),
so for every , , i.e., . Since this holds for all , by definition of intersection . () Let . Then for every , , i.e., . Applying the quantifier De Morgan's Law in reverse,
so it is not the case that there exists with , i.e., , i.e., . Combining both inclusions gives Part 3. If , both sides are vacuously handled by the stated conventions (, so the left side is ; and vacuously, since the universal quantifier over an empty index set is vacuously true for every ), and the identity holds.
Part 4: . () Let . Then , i.e., it is not the case that for all , . By the quantifier De Morgan's Law (negation of a universal is an existential negation),
so there exists with , i.e., . By definition of union, . () Let . Then there exists with , i.e., . Applying the reverse direction,
so it is not the case that for all , i.e., , i.e., . Combining both inclusions gives Part 4, again with the empty-index-set case verified directly from the stated conventions ( so the left side is , matching ). This completes the proof of all four parts.
∎Taking , , in Parts 3 and 4 recovers Parts 1 and 2 exactly, since and . Thus the binary laws are literally instances of the general laws, not merely analogues of them.
Worked examples
Example 1 (finite, concrete, asymmetric sets). Let , and let
First compute the union and intersection directly:
Their complements relative to :
Now compute and individually:
Check the first law, :
This matches computed above — confirmed. ✓ Check the second law, :
This matches computed above — confirmed. ✓ The asymmetry of (size 5) and (size 6), with a nontrivial partial overlap , rules out the possibility that the identities held only by symmetry or by an accidental coincidence of set sizes.
Example 2 (an infinite family, indexed by natural numbers, with ). Let , and for each define the interval
These are nested, shrinking-toward- open intervals: , each strictly larger than but by a smaller and smaller margin.
Intersection side. We claim . If , then for every , , so for all , hence . Conversely, if , then either or . If , choose with (possible by the Archimedean property), so , meaning for that , so . The case is symmetric. Hence
So .
Union of complements side. Each . We compute . Take in this union: there exists with or . If for some , then since , we get . If for some , then since , we get . So . Conversely, if , choose large enough that (Archimedean property again), so , hence . If , choose with , so , hence . So . Combining, , which matches computed above. This confirms the general intersection-form law
in a genuinely infinite setting where the intersection is not achieved by any single finite stage — a phenomenon impossible to observe with only two sets.
De Morgan's Laws are stated for subsets of a fixed universal set , and complementation is always taken relative to that same . Suppose we drop this hypothesis and instead try to make sense of "complement" as an absolute notion — the collection of all things not in , with no ambient universe fixing the discourse. This is not just a technical convenience being dropped; it breaks the theorem's very well-definedness, and if patched naively, breaks the identity itself. Concretely, work naively as if "complement of " means "the set of everything not in ," with no restriction to a universe. Let and , thought of as subsets of, say, all sets whatsoever (no fixed ). Then , and its "absolute complement" would have to be every object in existence that is not , , or — this includes not just numbers but every set, every function, every abstract object one can name. This collection is not a set at all: by Russell's-paradox-style arguments, there is no set of "everything," since assuming such a universal set exists leads to a contradiction (the set of all sets not containing themselves cannot consistently be a member or non-member of itself). So is not even a well-formed set-theoretic object once is removed — the left-hand side of the identity has no meaning, and the "theorem" cannot even be stated, let alone proved. Even in a restricted, seemingly safe re-interpretation — say, fixing for computing but a different universe for computing — the identity can fail numerically. With , : relative to , ; relative to , . Then . But , and to even compute we must choose a universe — say , giving . This does not equal computed with mismatched universes. The identity is restored only once we insist are both subsets of one common, fixed throughout — exactly the hypothesis the theorem requires.
Scope, edge cases & common traps
| Situation | What happens | Why |
|---|---|---|
| Union with does nothing; consistent with | ||
| , so ; matches | ||
| (empty family) | Laws reduce to , | By convention , |
| infinite | Laws still hold verbatim | Proof uses only quantifier negation, valid for any index set |
| No fixed universal set | Complement, and hence the laws, are undefined or can fail | See counterexample above |
| Confusing with | These are generally different sets | The correct dual of union is intersection, not union again |
The mathematician behind it
Origins · 1 minAugustus De Morgan and how this was discovered
Augustus De Morgan was a British mathematician and logician, born in Madurai, India, and educated at Trinity College, Cambridge. He became the first professor of mathematics at the newly founded University College London in 1828, a post he held for most of his career, resigning twice on points of principle regarding institutional interference with academic freedom. De Morgan worked across algebra, calculus, probability, and the foundations of logic, and he was a close correspondent and intellectual partner of George Boole, whose algebraic treatment of logic would later formalize much of what De Morgan investigated informally. He is remembered above all for his systematic study of the duality between conjunction/disjunction and between union/intersection — the laws that today bear his name — which he articulated in the context of syllogistic and symbolic logic well before set theory in its modern Cantorian form existed.
Are De Morgan's Laws only true for two sets, or do they hold for any finite number?
They hold for any finite number of sets, and in fact for any index set at all, finite or infinite — this is exactly the content of the general laws stated in this article. For three sets, follows either by applying the binary law twice (treating as ) or directly from the general law with . There is no upper bound on how many sets can be involved; the proof via quantifier negation works uniformly whether has two elements or is the uncountable index set of, say, all real numbers.
Why do we need a fixed universal set at all — can't we just talk about complements freely?
No — without restricting to subsets of some fixed , "the complement of " would mean "everything that is not in ," and modern set theory (via the Zermelo–Fraenkel axioms) proves that there is no set containing everything, on pain of Russell's paradox. Fixing sidesteps this entirely: we only ever consider , a perfectly legitimate application of the axiom of specification (subset comprehension) applied to the already-existing set . Every application of De Morgan's Laws you will see assumes such a is fixed in advance, even when it is left implicit (e.g., when discussing intervals, or = the sample space in probability).
Is there a quick way to remember which operation swaps to which?
Yes: complement always swaps , never leaves the operation unchanged. A useful mnemonic is "break the bar, flip the operator" — if you distribute a complement bar over a union or intersection, breaking it into individual complements forces you to flip the connecting operation. This mirrors negating "or" into "and" (and vice versa) in ordinary English: "I did not eat cake or ice cream" means "I did not eat cake, and I did not eat ice cream," never "...or I did not eat ice cream" (which would be a weaker, different claim).
Do De Morgan's Laws hold in other algebraic structures, like Boolean algebras or lattices?
Yes, in a general Boolean algebra , De Morgan's Laws and are theorems (or sometimes taken as axioms, depending on the presentation) that hold for all elements , and the algebra of sets under is the canonical example of such a Boolean algebra. More generally, in any complemented distributive lattice, an analogous duality holds. This is why the same "De Morgan" name attaches to laws in propositional logic, set theory, and Boolean circuit algebra — they are all instances of one underlying algebraic phenomenon.
Can De Morgan's Laws fail if the sets involved are infinite?
No — the general form proven above holds for arbitrary index sets , including infinite (even uncountable) ones, with no extra hypotheses beyond each being a subset of the same fixed . The proof goes through unchanged because it relies only on the logical equivalences between "there exists such that..." and "not for all , not...", which are valid regardless of how large is. Worked Example 2 in this article demonstrates the intersection-form law explicitly for a countably infinite family of shrinking intervals.
How does this relate to proving other set identities, like the distributive laws?
De Morgan's Laws are proved by the same core technique used for all basic set identities: double inclusion, reducing element-membership statements to propositional logic and invoking the corresponding logical equivalence. The distributive laws and are proved the same way, using the propositional distributive laws for over and vice versa. Mastering the double-inclusion technique on De Morgan's Laws is directly transferable to proving essentially every identity in The Algebra of Sets.
Why does the empty index set give rather than ?
This convention exists so the general laws (and other identities) hold uniformly without exceptions. Membership in means "for all , " — a universally quantified statement over an empty domain, which is vacuously true for every (there is no to serve as a counterexample). Hence every satisfies this vacuous condition, giving . This is the same vacuous-truth phenomenon behind "all unicorns in this room are purple" being true when there are no unicorns in the room.