= Set union
{title2=$\bigcup$}
{wiki=Union_(set_theory)}
= Union
{synonym}
The union $A\cup B$ collects the <set elements> belonging to either <set>, including those belonging to both:
$$
A\cup B=\{x:x\in A\text{ or }x\in B\},\qquad x\in A\cup B\iff(x\in A)\vee(x\in B).
$$
Thus membership in a <union> uses <logical disjunction> (OR). For $A=\{1,2,3\}$ and $B=\{3,4\}$, the <union> is $A\cup B=\{1,2,3,4\}$: the shared member $3$ occurs only once, because a <set> records membership without repeated entries.
\Image[/set-union-intersection-regions.png]
{title=<Union>, <intersection>, and the two directions of <set difference> for the same numbered <sets>}
In this <Venn diagram>, $1,2$ belong only to $A$, $3$ belongs to both <sets>, $4$ belongs only to $B$, and $5,6$ belong to neither. The surrounding <universal set> is $U=\{1,2,3,4,5,6\}$. Numbers are placed by membership; circle areas do not represent <cardinalities>. Each panel shades the region selected by its operation.
For a database illustration, let $A$ collect records matching one condition and $B$ collect records matching another. Their <union> selects records matching at least one condition, with a record satisfying both still appearing once. This interpretation turns an abstract operation into a reusable rule for combining selections. For an authored treatment of <union>, <intersection>, <set difference>, and <complement>, see https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/mit6_042js15_textbook.pdf#page=90[Lehman, Leighton and Meyer, Mathematics for Computer Science (2015), Definition 4.1.1, pp. 82–83].
More generally, the <union> $\bigcup_{i\in I}A_i$ contains exactly the <set elements> belonging to at least one <set> $A_i$:
$$
x\in\bigcup_{i\in I}A_i\iff\exists i\in I:\ x\in A_i.
$$
The <existential quantification> expresses “at least one”. With no indexing members, the <union> is the <empty set>. Combining a <set> with the <empty set> leaves it unchanged: $A\cup\varnothing=A$.
Back to article page