Skip to main content
Mathematics LibreTexts

4.2: Union, Intersection, and Complement

  • Page ID
    113151
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives
    • Find the union of sets
    • Find the intersection of sets
    • Find the complement of a set

    Commonly sets interact. For example, you and a new roommate decide to have a house party, and you both invite your circle of friends. At this party, two sets are being combined, though it might turn out that there are some friends that were in both sets.

    Universal Set

    A universal set is a set that contains all the elements we are interested in. This would have to be defined by the context. It is often denoted by \(U\).

    Example \(\PageIndex{1}\)
    1. If we were discussing searching for books, the universal set might be all the books in the library.
    2. If we were grouping your Discord friends, the universal set would be all your Discord friends.
    3. If you were working with sets of numbers, the universal set might be all natural numbers \( \mathbb{N} \), all integers \( \mathbb{Z} \), or all real numbers \( \mathbb{R} \).

    Set Operations: Union, Intersection, and Complement

    The union of two sets contains all the elements in either set (or both sets).

    The union is notated \(A \cup B\).

    More formally, \(x \in A \cup B\) if \(x \in A\) or \(x \in B\) (or both).

    The intersection of two sets contains only the elements that are in both sets.

    The intersection is notated \(A \cap B\).

    More formally, \(x \in A \cap B\) if \(x \in A\) and \(x \in B\).

    The complement of a set A contains everything in the universal set that is not in the set A.

    The complement is notated \(A'\), or \(A^{C}\), or sometimes \(\sim A\).

    Example \(\PageIndex{2}\)

    Suppose the universal set is \(U=\) all natural numbers from \(1\) to \(9 \) inclusive. If \(A=\{1,2,4\}\), then \(A'=\{3,5,6,7,8,9\}\).

    Example \(\PageIndex{3}\)

    Consider the sets:

    \(\quad A=\{\text {red, green, blue}\} \quad B=\{\text {red, yellow, orange}\} \quad C=\{\text {red, orange, yellow, green, blue, violet}\}\)

    1. Find \(A \cup B\).
    2. Find \(A \cap B\).
    3. Find \(A' \cap C\).
    Solution
    1. The union contains all the elements in either set: \(A \cup B=\{\text {red, green, blue, yellow, orange}\}\). Notice we only list red once.
    2. The intersection contains all the elements in both sets: \(A \cap B=\{\text {red}\}\)
    3. Here we're looking for all of the elements that are not in set \(A\) and are also in \(C\). \(A' \cap C=\{\text {orange, yellow, violet}\}\)
    Try It \(\PageIndex{1}\)

    Using the sets from the previous example, find \(A \cup C\) and \(B' \cap A\).

    Answer

    \(A \cup C=\{\text {red, orange, yellow, green, blue, violet}\}\)

    \(B' \cap A=\{\text {green, blue}\}\)

    As we saw earlier with the expression \(A' \cap C,\) set operations can be grouped together. Grouping symbols can be used like they are with arithmetic - to force an order of operations.

    Example \(\PageIndex{4}\)

    Suppose

    \(H=\{\text {cat, dog, rabbit, mouse}\}, F=\{\text {dog, cow, duck, pig, rabbit}\} \quad W=\{\text {duck, rabbit, deer, frog, mouse}\}\)

    1. Find \((H \cap F) \cup W\).
    2. Find \(H \cap(F \cup W)\).
    3. Find \((H \cap F)' \cap W\).
    Solution
    1. We start with the intersection: \(H \cap F=\{\text {dog, rabbit}\}\).
      Now we union that result with \(W:(H \cap F) \cup W=\{\text{dog, duck, rabbit, deer, frog, mouse}\}\).
    2. We start with the union: \(F \cup W=\{\text{dog, cow, rabbit, duck, pig, deer, frog, mouse}\}\).
      Now we intersect that result with \(H: H \cap(F \cup W)=\{\text {dog, rabbit, mouse}\}\).
    3. We start with the intersection: \(H \cap F=\{\text {dog, rabbit}\}\).
      Now we want to find the elements of \(W\) that are not in \(H \cap F\). \((H \cap F)' \cap W=\{\text {duck, deer, frog, mouse}\}\).
    Example \(\PageIndex{5}\)

    Let \(\quad A=\{ 1, 2, 3 \} \quad B=\{4, 5, 6\}\).

    Find \((A \cap B)\).

    Solution

    \((A \cap B)= \varnothing \). If the intersection between two sets is empty, they are called disjoint.

    Try It \(\PageIndex{2}\)

    Let \(\quad A=\{ 1, 2, 3 \} \quad B=\{3, 4, 5, 6\} \quad C=\{1, 3, 5\}\) and \( U=\{1, 2, 3, 4, 5, 6, 7\} \)

    1. Find \( (A \cup C) \cap B \).
    2. Find \(A' \cap B\).
    3. Find \( (A' \cap B) \cap C \).
    Answer

    a. \( A \cup C =\{1, 2, 3, 5 \} \) and then \( (A \cup C) \cap B =\{3, 5 \} \)

    b. \(A' =\{4, 5, 6, 7 \}\) and then \(A' \cap B =\{4, 5, 6 \}\)

    c. \( A' \cap B =\{4, 5, 6 \}\) and then \( (A' \cap B) \cap C =\{5 \}\


    This page titled 4.2: Union, Intersection, and Complement is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by David Lippman (The OpenTextBookStore) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.