<p><a href="https://www.prepswift.com/quizzes/quiz/prepswift-set-unions-4hvy" target="_blank">Set Unions Exercise</a></p><p>A <strong><span style="color:#8e44ad;">Set Union</span></strong> is a new set that is comprised of ALL the elements of both sets.</p>
<p><strong><span style="color:#e74c3c;">Example</span></strong></p>
<p>Imagine Set $A$ is the first five positive odd integers and Set $B$ is the first five positive even integers. What is their union?</p>
<p>$$Set_A = \{ 1,3, 5, 7, 9 \}$$</p>
<p>$$Set_B = \{ 2,4, 6, 8, 10 \}$$</p>
<p>If we were to combine these two sets, we would get $\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$. So that's the new set that is their union.</p>
<p><strong><span style="color:#e74c3c;">What If There are Repeated Elements?</span></strong></p>
<p>Good question. If Set $A$ were $\{1, 2, 3, 4, 5\}$ and Set $B$ were $\{3, 4, 5, 6, 7, 8\}$, what would their union be? Remember that a set does NOT HAVE REPEATS, so we would only put the $3$, $4$, and $5$ once and the union would be below:</p>
<p>$$\{1, 2, 3, 4, 5, 6, 7, 8\}$$</p>
<p><strong><span style="color:#27ae60;">Notation</span></strong></p>
<p>If we have two Sets, Set $A$ and Set $B$, the union of both sets is represented like this:</p>
<p>$$A \cup B$$</p>
<p>Note that it looks ike a big "U" for "Union." Nice. In our example above, we would write it like this:</p>
<p>$$A \cup B = \{1, 2, 3, 4, 5, 6, 7, 8\}$$</p>