# Disjoint sets

**Disjoint sets** are sets that have no elements in common: two sets \( A \) and \( B \) are disjoint exactly when their intersection is empty, \( A \cap B = \varnothing \).<sup>[1](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)</sup> The property extends to families of sets, underlies the notion of a partition, and gives the ordinary union its counting and probability rules. A related construction, the disjoint union, builds a single set out of arbitrary sets by tagging each element with the set it came from.<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup>

| Key fact | Detail |
|---|---|
| Definition | \( A \) and \( B \) are disjoint (mutually exclusive) iff \( A \cap B = \varnothing \)<sup>[1](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)</sup> |
| Families | \( A_1, A_2, \ldots \) are pairwise disjoint if \( A_i \cap A_j = \varnothing \) for all \( i \neq j \)<sup>[3](https://www.nsm.buffalo.edu/~cowen/teaching/course_material/411_511/reviewsets.pdf)</sup> |
| Counting | If \( A \) and \( B \) are disjoint, \( \#(A \cup B) = \#A + \#B \); in general \( \#(A \cup B) = \#A + \#B - \#(A \cap B) \)<sup>[4](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/09%3A_Cardinality/9.03%3A_Cardinality_of_a_union)</sup> |
| Partitions | A partition of \( A \) is a collection of nonempty, mutually disjoint sets whose union is \( A \)<sup>[5](https://math.libretexts.org/Courses/Monroe_Community_College/MTH_220_Discrete_Math/4%253A_Sets/4.5%253A_Index_Sets_and_Partitions)</sup> |
| Disjoint union | \( \coprod_{\lambda} X_{\lambda} = \bigcup_{\lambda} X_{\lambda} \times \{\lambda\} \), the union of disjoint tagged copies; it is the coproduct in the category of sets<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup> |
| Probability | Disjoint events are called mutually exclusive, and \( P(E_1 \cup E_2) = P(E_1) + P(E_2) \) for them<sup>[6](https://web.stanford.edu/class/stats305c/lectures/Probability.html)</sup> |

## Definition and basic examples

Two sets are disjoint when they share no element, that is, when there is no \( x \) with \( x \in A \) and \( x \in B \).<sup>[1](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)</sup> The sets \( \{1,3,5\} \) and \( \{2,4,6\} \) are disjoint, while \( \{1,3,5\} \) and \( \{2,3,4\} \) are not, because 3 lies in both.<sup>[1](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)</sup> The empty set is disjoint from every set, since its intersection with any set is empty.<sup>[3](https://www.nsm.buffalo.edu/~cowen/teaching/course_material/411_511/reviewsets.pdf)</sup>

**Families of sets.** For more than two sets the condition is stated pairwise: sets \( A_1, A_2, A_3, \ldots \) are mutually disjoint, or pairwise disjoint, if \( A_i \cap A_j = \varnothing \) whenever \( i \neq j \).<sup>[3](https://www.nsm.buffalo.edu/~cowen/teaching/course_material/411_511/reviewsets.pdf)</sup> Pairwise disjointness is a stronger condition than the intersection of the whole family being empty: a family can have no element common to all its members while two individual members still overlap.<sup>[7](https://planetmath.org/DisjointUnion)</sup> For example, the singletons \( \{n\} \) for \( n \in \mathbb{N} \) form a pairwise disjoint family whose union is \( \mathbb{N} \).<sup>[8](https://github.com/antoniolupetti/algebrica/blob/main/sets-and-numbers/sets.md)</sup>

## Partitions

A partition of a set \( A \) is a finite or infinite collection of nonempty sets \( \{A_1, A_2, A_3, \ldots\} \) such that \( A \) is the union of all the \( A_i \) and the \( A_i \) are mutually disjoint.<sup>[5](https://math.libretexts.org/Courses/Monroe_Community_College/MTH_220_Discrete_Math/4%253A_Sets/4.5%253A_Index_Sets_and_Partitions)</sup> When the members of a disjoint family have union \( Y \), one also says they form a decomposition of \( Y \).<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup> Partitions matter in probability, where breaking the sample space into disjoint pieces lets any event \( B \) be split into pieces over the partition, the idea used in [Bayes' theorem](https://www.edgepedia.org/bayes-theorem).<sup>[9](https://connect.gonzaga.edu/asset/file/1257/Chapter02_v07.html)</sup>

## Counting with disjoint sets

Disjointness makes the size of a union the sum of the sizes. For finite sets, \( \#(A \cup B) = \#A + \#B \) when \( A \) and \( B \) are disjoint, and the same holds for any finite number of pairwise disjoint sets.<sup>[4](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/09%3A_Cardinality/9.03%3A_Cardinality_of_a_union)</sup> When the sets overlap, the general formula \( \#(A \cup B) = \#A + \#B - \#(A \cap B) \) corrects for the double counting of shared elements; the sets \( A \backslash B \), \( B \backslash A \), and \( A \cap B \) are always pairwise disjoint and their union is \( A \cup B \).<sup>[4](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/09%3A_Cardinality/9.03%3A_Cardinality_of_a_union)</sup> If \( A \) and \( B \) are finite and not disjoint, then \( \#(A \cup B) < \#A + \#B \).<sup>[1](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)</sup>

## The disjoint union

The term disjoint union, written \( A \sqcup B \) or \( \coprod \), carries two distinct meanings.<sup>[10](https://math.stackexchange.com/questions/1631396/what-is-the-difference-between-disjoint-union-and-union)</sup> The first is an ordinary union that happens to be disjoint: \( A \sqcup B \) equals \( A \cup B \), but the notation may be used only when \( A \cap B = \varnothing \).<sup>[10](https://math.stackexchange.com/questions/1631396/what-is-the-difference-between-disjoint-union-and-union)</sup> The second is a construction that forces disjointness. For a family \( X_\lambda \) indexed by \( \lambda \in \Lambda \), the external disjoint union is built by tagging each element with its index, \( \coprod_{\lambda \in \Lambda} X_\lambda = \bigcup_{\lambda \in \Lambda} X_\lambda \times \{\lambda\} \), with injections \( i_\lambda(x) = (x, \lambda) \) whose images are disjoint.<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup> For two sets one may take \( A \sqcup B = A \times \{0\} \cup B \times \{1\} \).<sup>[10](https://math.stackexchange.com/questions/1631396/what-is-the-difference-between-disjoint-union-and-union)</sup> If the original sets are already pairwise disjoint, the tagged construction is isomorphic to their ordinary union.<sup>[7](https://planetmath.org/DisjointUnion)</sup>

The disjoint union has a universal property: for any family of maps \( f_\lambda : X_\lambda \to Z \), there is a map \( F \) from the disjoint union to \( Z \) whose restriction to each copy is \( f_\lambda \).<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup> This makes it the coproduct in the category of sets.<sup>[11](https://mathworld.wolfram.com/Coproduct.html)</sup> The same object appears in other categories with different names: in topological spaces the coproduct is the disjoint union with the expected topology, in abelian groups it is the direct sum, and in groups it is the free product.<sup>[11](https://mathworld.wolfram.com/Coproduct.html)</sup> A bouquet or wedge is a disjoint union of pointed sets, with the distinguished points identified.<sup>[2](https://encyclopediaofmath.org/wiki/Disjoint_union)</sup>

## Uses in probability and computing

In probability theory, sets representing events are called mutually exclusive when they are disjoint, and probabilities of mutually exclusive events add: \( P(E_1 \cup E_2) = P(E_1) + P(E_2) \), extended to \( \sum_{i=1}^{n} P(E_i) \) for \( n \) mutually exclusive events.<sup>[6](https://web.stanford.edu/class/stats305c/lectures/Probability.html)</sup> An event \( E \) and its complement \( E^c \) are always mutually exclusive, with \( S = E \cup E^c \).<sup>[6](https://web.stanford.edu/class/stats305c/lectures/Probability.html)</sup>

Programming treatments use disjoint unions to combine sets holding different forms of data, for example a set of barcoded items with a set of weighed-item purchase records.<sup>[12](https://www.open.edu/openlearn/digital-computing/data-and-processes-computing/content-section-4.4)</sup>

## History

[Georg Cantor](https://www.edgepedia.org/georg-cantor) used set braces \( \{a, b\} \) in his 1878 paper "Ein Beitrag zur Mannifaltigkeitslehre" in *Crelles Journal für Mathematik* in a different sense from the modern one: there \( \{a,b\} \) denoted the disjoint union of the sets \( a \) and \( b \), not a set with two elements. The modern two-element reading of \( \{a,b\} \) was introduced by [Ernst Zermelo](https://www.edgepedia.org/ernst-zermelo) in 1907.<sup>[13](https://mathshistory.st-andrews.ac.uk/Miller/mathsym/set/)</sup>

## References

1. [3.3: Operations on Sets, Mathematics LibreTexts (Morris and Morris)](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/03%3A_Sets/3.03%3A_Operations_on_sets)
2. [Disjoint union, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Disjoint_union)
3. [MTH 411/511 review: sets, University at Buffalo](https://www.nsm.buffalo.edu/~cowen/teaching/course_material/411_511/reviewsets.pdf)
4. [9.3: Cardinality of a Union, Mathematics LibreTexts (Morris and Morris)](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/09%3A_Cardinality/9.03%3A_Cardinality_of_a_union)
5. [4.5: Index Sets and Partitions, Mathematics LibreTexts](https://math.libretexts.org/Courses/Monroe_Community_College/MTH_220_Discrete_Math/4%253A_Sets/4.5%253A_Index_Sets_and_Partitions)
6. [Probability, STATS305C, Stanford University](https://web.stanford.edu/class/stats305c/lectures/Probability.html)
7. [Disjoint union, PlanetMath](https://planetmath.org/DisjointUnion)
8. [Sets, algebrica (GitHub, antoniolupetti)](https://github.com/antoniolupetti/algebrica/blob/main/sets-and-numbers/sets.md)
9. [Math 321, Chapter 2: Counting and Probability, Gonzaga University](https://connect.gonzaga.edu/asset/file/1257/Chapter02_v07.html)
10. [What is the difference between disjoint union and union? Mathematics Stack Exchange, answer by Eric Wofsey](https://math.stackexchange.com/questions/1631396/what-is-the-difference-between-disjoint-union-and-union)
11. [Coproduct, Wolfram MathWorld](https://mathworld.wolfram.com/Coproduct.html)
12. [Data and processes in computing: 3.3 Mixing different forms of data, OpenLearn, The Open University](https://www.open.edu/openlearn/digital-computing/data-and-processes-computing/content-section-4.4)
13. [Earliest Uses of Symbols of Set Theory and Logic, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathsym/set/)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Logic and discrete mathematics › Formal logic and foundations › Set theory › Elementary set theory*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
