--- aliases: [union] --- #sets-functions ## Definition > [!tldr] Definition > The **union** of two [[Set|sets]] $A$ and $B$ is the set consisting of [[Set|elements]] that are in either $A$, or $B$ (or both). The notation for the union of $A$ and $B$ is $A \cup B$. > > In [[Set-builder notation|set-builder notation]], $A \cup B = \{x \, : \, x \in A \ \text{or} \ x \in B\}$. A visual representation of $A \cup B$ is this Venn diagram: ![[Pasted image 20230925103719.png]] **Notes:** - If $A \subseteq B$ (that is, $A$ is a [[Subset|subset]] of $B$) then $A \cup B = B$. ## Examples - If $A = \{1,2,3,4\}$ and $B = \{1,3,5,7,9\}$ then $A \cup B = \{1,2,3,4,5,7,9\}$. Note that although $3$ appears in both sets, we do not list it twice in the union -- because no duplicates are allowed inside a set. - If $A = \{n \in \mathbb{N} \, : \, n \ \text{is odd and greater than 3}\}$ and $B = \{n \in \mathbb{N} \, : \, n \ \text{is even and greater than 3}\}$ then $A \cup B = \{4,5,6,7,8,\dots\}$. ## Resources <iframe src="https://player.vimeo.com/video/606600971?h=e256db4c8a" width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe> <p><a href="https://vimeo.com/606600971">Screencast 3.6: Set operations</a> from <a href="https://vimeo.com/user132700952">Robert Talbert</a> on <a href="https://vimeo.com">Vimeo</a>.</p> Other resources: - Video: [Sets and set operations](https://www.youtube.com/watch?v=QiOfsWm3peE&list=PL2419488168AE7001&index=64&pp=iAQB) - Tutorial: [Union of sets](https://www.cuemath.com/algebra/union-of-sets/)