Skip to main content
Mathematics LibreTexts

3.2: Operations with Sets

  • Page ID
    89959
  • \( \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

    Students will be able to:

    • Determine the union and intersection of two or more sets
    • Determine the complement of a set
    • Determine the difference between sets

    In this section, we will look at building new sets from given sets. To do this, we will define and use several "operations." This has rather practical applications. For example, you and a new roommate decide to have a house party, and you both invite your set 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.

    Definition: Union

    The union of two sets contains all the elements contained in either set (or both sets). The union is notated \(A ⋃ B\).

    Example \(\PageIndex{1}\)

    a) Given the sets A = {Daryl, Glenn, Rick} and B = {Maggie, Michonne}, find their union.

    b) Given the sets A = {Daryl, Glenn, Rick, Steve} and B = {Maggie, Michonne, Steve}, find their union.

    Solution

    a) A B = {Daryl, Glenn, Maggie, Michonne, Rick}. Notice EACH member of each set is listed in the union.

    b) A B = {Daryl, Glenn, Maggie, Michonne, Rick, Steve}. Notice again that each member of each set is in the union. Also, notice that "Steve" belongs in both sets but is only listed once in the union. Elements in sets are always only listed once.

    Definition: Intersection

    The intersection of two sets contains only the elements that are in both sets. The intersection is notated \(A ⋂ B\).

    Example \(\PageIndex{2}\)

    Given the sets A = {Aquaman, Batman, Flash, Superman, Wonder Woman} and B = {Batman, Blue Beetle, Booster Gold, Fire, Flash}, find the intersection of A and B.

    Solution

    A B = {Batman, Flash}. Notice Batman and Flash are members of BOTH sets.

    Definition: Complement

    The complement of a set \(A\) contains everything that is not in the set \(A\) but still in the universal set U. The complement is notated \(A’\), or \(A^c\), or sometimes \(A\).

    Example \(\PageIndex{3}\)

    Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9} and A = {1, 3, 5, 7, 9}. Find A'.

    Solution

    A' = {2, 4, 6, 8}. These are all the elements in U that ARE NOT in A.

    Definition: Difference

    The difference between two sets A and B, denoted A\B is the set of all the elements in A but not in B. Using complement notation, A\B = \(A ⋂ B^c \)

    Example \(\PageIndex{4}\)

    Let A = {T-Mobile, Apple, Verizon} and B = {Spectrum, Apple, Duo}. Find A\B.

    Solution

    A\B = {T-Moblie, Verizon} since these are the only elements in A but not in B. The element "Apple" is not in the difference because even though it is in A, it is also in B.

    We may perform multiple operations on sets. The next few examples illustrate how to do that.

    Example \(\PageIndex{5}\)

    Suppose H = {cat, dog, rabbit, mouse}, F = {dog, cow, duck, pig, rabbit} W = {duck, rabbit, deer, frog, mouse}

    1. Find \((H ⋂ F) ⋃ W\)
    2. Find \(H ⋂ (F ⋃ W)\)
    3. Find \((H ⋂ F)^c ⋂ W\)

    Solution

    a) We start with the intersection: \(H ⋂ F\) = {dog, rabbit}

    Now we union that result with \(W\): \((H ⋂ F) ⋃ W\) = {dog, rabbit) ⋃ {duck, rabbit, deer, frog, mouse} = {dog, duck, rabbit, deer, frog, mouse}

    b) We start with the union: \(F ⋃ W\) = {dog, cow, rabbit, duck, pig, deer, frog, mouse}

    Now we intersect that result with \(H\): \(H ⋂ (F ⋃ W)\) = H = {cat, dog, rabbit, mouse} ⋂ {dog, cow, rabbit, duck, pig, deer, frog, mouse} = {dog, rabbit, mouse}

    c) We start with the intersection: \(H ⋂ F\) = {dog, rabbit}

    Now we want to find the elements of \(W\) that are not in \(H ⋂ F\).

    \((H ⋂ F)^c ⋂ W\) = {duck, deer, frog, mouse}


    3.2: Operations with Sets is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?