Skip to main content
Mathematics LibreTexts

7.2: Union, Intersection, and Complement

  • Page ID
    67135
  • \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    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.

    Union, Interection, and Complement

    The union of two sets contains all the elements contained 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 that is not in the set A.

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

    Example 5

    Consider the sets:

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

    1. Find \(A \cup B\)
    2. Find \(A \cap B\)
    3. Find \(A^{c} \cap C\)
    Solution

    a) The union contains all the elements in either set: \(A \cup B=\{\text { red, green, blue, yellow, orange }\}\)

    Notice we only list red once.

    b) The intersection contains all the elements in both sets: \(A \cap B=\{\text { red }\}\)

    c) Here we're looking for all the elements that are not in set \(A\) and are also in \(C\).

    \(A^{c} \cap C=\{\text { orange, yellow, purple }\}\)

    Try it Now 2

    Using the sets from the previous example, find \(A \cup C\) and \(B^{c} \cap A\)

    Answer

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

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

    Notice that in the example above, it would be hard to just ask for \(A^{c},\) since everything from the color fuchsia to puppies and peanut butter are included in the complement of the set. For this reason, complements are usually only used with intersections, or when we have a universal set in place.

    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.

    A complement is relative to the universal set, so \(A^{C}\) contains all the elements in the universal set that are not in \(A\).

    Example 6

    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 Facebook friends, the universal set would be all your Facebook friends.
    3. If you were working with sets of numbers, the universal set might be all whole numbers, all integers, or all real numbers

    Example 7

    Suppose the universal set is \(U=\) all whole numbers from \(1\) to \(9 .\) If \(A=\{1,2,4\}\), then

    \(A^{c}=\{3,5,6,7,8,9\}\)

    As we saw earlier with the expression \(A^{c} \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 8

    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 P) \cup W\)
    2. Find \(H \cap(F \cup W)\)
    3. Find \((H \cap P) \cap W\)
    Solution

    a) 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 }\}\)

    b) 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 }\}\)

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

    Now we want to find the elements of \(W\) that are not in \(\mathrm{H} \cap F\)

    \((H \cap P)^{c} \cap W=\{\text { duck, deer, frog, mouse }\}\)


    This page titled 7.2: Union, Intersection, and Complement is shared under a CC BY-SA license and was authored, remixed, and/or curated by David Lippman (The OpenTextBookStore) .