Union of sets
High school
Consider two sets $A$ and $B$. The union of $A$ and $B$, written $A \cup B$, is the set of every element that is in $A$, in $B$, or in both.
Undergraduate
Consider two sets $A$ and $B$. The union of sets $A$ and $B$ is
\[A \cup B = \lbrace x : x \in A \text{ or } x \in B \rbrace.\]More generally, the union of a family of sets \((A_i)_{i \in I}\) is the set of all $x$ with $x \in A_i$ for some $i \in I$.
Examples
Worked examples
- $A = \lbrace 1, 2 \rbrace$ and $B = \lbrace 3, 4 \rbrace$ : $A \cup B = \lbrace 1, 2, 3, 4 \rbrace$ Elementary
- $A = \lbrace \text{apple} \rbrace$ and $B = \lbrace \text{banana} \rbrace$ : $A \cup B = \lbrace \text{apple}, \text{banana} \rbrace$ High school
- $A = \lbrace \text{apple}, \text{orange} \rbrace$ and $B = \lbrace \text{orange}, \text{banana} \rbrace$ : $A \cup B = \lbrace \text{apple}, \text{orange}, \text{banana} \rbrace$ High school