Skip to main content
Mathematics LibreTexts

Section 2.3: Operations on Sets

  • Page ID
    212977
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

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

    Learning Objectives
    • Find the union of a set
    • Find the intersection of a set
    • Find the complement of a set
    • Find the set difference of a set
    • Order of operations on sets
    • Introduce and apply De Morgan's Laws

     


    Set Operations: Like Arithmetic for Collections

    Just as we have operations for numbers (addition, subtraction, multiplication, division), we have operations for sets. These operations let us combine, compare, and manipulate collections of objects in systematic ways.

    The Parallel to Number Operations

    With numbers: With sets:
    3 + 5 = 8 (combining quantities) We can combine sets (union)
    10 - 4 = 6 (finding the difference) We can find differences (difference and complement)
    3 × 4 = 12 (repeated addition) We can find what's shared (intersection)

     

    The 4 basic operations on sets, union, intersection, complement, and set difference are given below with along with several examples for each.

    Definition: Union, \(\cup\)

    The set \(A \cup B\) contains all elements that are in set \(A\), or in set \(B\), or in both.

    Symbolically:  \(A \cup B\) (read as "\(A\) or \(B\)" or "\(A\) union \(B\)")

    Think of it as: Adding or combining collections together

     

    Example #2.3.1 ðŸ¤”

    Let \(A = \{\)1, 2, 3\(\}\) and  \(B = \{\)3, 4, 5\(\}\). Find \(A \cup B\).


    ✅ Solution:

    \(A \cup B = \{\)1, 2, 3, 4, 5\(\}\),

    because the elements 1, 2, 3, 4, 5 are in set \(A\), or set \(B\), or in both sets \(A\) and \(B\). Notice: We don't list 3 twice, even though it appears in both sets.

    Example #2.3.2 🤔

    Students taking a math class are represented by \(M\). Students taking an English class are represented by \(E\). If \(M = \{\)Alice, Bob, Diego\(\}\) and \(E = \{\)Carlos, Diego, Emily\(\}\). Find \(M \cup E\).


    ✅ Solution:

    \(M \cup E = \{\)Alice, Bob, Carlos, Diego, Emily\(\}\),

    because Alice, Bob, Carlos, Diego, Emily are in set \(M\), or set \(E\), or in both sets \(M\) and \(E\).

    Example #2.3.3 🤔

    Let \(C = \{\)@, #, $, %\(\}\) and \(C = \{\)&, @, $\(\}\). Find \(C \cup D\).


    ✅ Solution:

    \(C \cup D = \{\)@, #, $, %, &\(\}\),

    because the elements @, #, $, %, & are in set \(C\), or set \(D\), or in both sets \(C\) and \(D\).

    Example #2.3.4 🤔

    Breakfast foods are represented by \(B\). Lunch foods are represented by \(L\). If \(B = \{\)eggs, toast, cereal\(\}\) and \(L = \{\)sandwich, salad, soup\(\}\). Find \(B \cup L\).


    ✅ Solution:

    \(B \cup L = \{\)eggs, toast, cereal, sandwich, salad, soup\(\}\),

    because eggs, toast, cereal, sandwich, salad, soup are in set \(B\), or set \(L\), or in both sets \(B\) & \(L\).

    Section 2.3: Operations on Sets [In-Class Exercises]
    1. Let \(A = \{\)1, 2, 3, 4\(\}\) and \(B = \{\)3, 4, 5, 6, 7\(\}\). Find \(A \cup B\).
    2. Let \(C = \{\)circle, triangle, rhombus\(\}\) and \(D = \{\)triangle, rectangle, hexagon\(\}\). Find \(C \cup D\).
    3. Let \(E = \{\)a, b, c, x, y\(\}\) and \(F = \{\)d, e, x, y, z\(\}\). Find \(E \cup F\).
    4. Let \(A = \{\)Broncos, Chargers, Raiders\(\}\) and \(N = \{\)Chiefs, Seahawks\(\}\). Find \(A \cup N\).
    Answers

    1) {1, 2, 3, 4, 5, 6, 7};   2) {circle, triangle, rhombus, rectangle, hexagon};   3) {a, b, c, d, e, x, y};   4) {Broncos, Chargers, Raiders, Chiefs, Seahawks}.

     

    Definition: Intersection, \(\cap\)

    The set \(A \cap B\) contains only elements that are in both sets \(A\) and \(B\).

    Symbolically: \(A \cap B\) (read as "\(A\) and \(B\)" or "\(A\) intersection \(B\)")

    Think of it as: Finding what's shared between collections

     

    Example #2.3.5 🤔

    Let \(A = \{\)1, 2, 3\(\}\) and  \(B = \{\)3, 4, 5\(\}\). Find \(A \cap B\).


    ✅ Solution:

    \(A \cap B = \{3\}\), because the element 3 is in both sets \(A\) and \(B\).

    Example #2.3.6 🤔

    Students taking a math class are represented by \(M\). Students taking an English class are represented by \(E\). If \(M = \{\)Alice, Bob, Diego\(\}\) and \(E = \{\)Carlos, Diego, Emily\(\}\). Find \(M \cap E\).


    ✅ Solution:

    \(M \cap E = \{\)Diego\(\}\), because Diego is taking both a math and an English class.

    Example #2.3.7 🤔

    Let \(C = \{\)@, #, $, %\(\}\) and \(C = \{\)&, @, $\(\}\). Find \(C \cap D\).


    ✅ Solution:

    \(C \cap D = \{\)@, $\(\}\), because the elements @ and $ are in both sets \(C\) and \(D\).

    Example #2.3.8 🤔

    Breakfast foods are represented by \(B\). Lunch foods are represented by \(L\). If \(B = \{\)eggs, toast, cereal\(\}\) and \(L = \{\)sandwich, salad, soup\(\}\). Find \(B \cap L\).


    ✅ Solution:

    \(B \cap L = \{~\}\), because there is nothing in common with either set.

    Section 2.3: Operations on Sets [In-Class Exercises]
    1. Let \(A = \{\)1, 2, 3, 4, 5, 6, 9, 10\(\}\) and \(B = \{\)2, 3, 5, 7, 8, 9\(\}\). Find \(A \cap B\).
    2. Let \(C = \{\)bird, cat, goat, pig\(\}\) and \(D = \{\)dog, cat, pig, walrus\(\}\). Find \(C \cap D\).
    3. Let \(X = \{\)a, b, c, f, h, k, m, p, t\(\}\) and \(Y = \{\)d, e, g, j, n, o, r, s, z\(\}\). Find \(X \cap Y\).
    4. Let \(P\) represent the set of all U.S. Presidents by last name. Let \(S\) represent all 50 U.S. states. Find \(P \cap S\).
    Answers

    5) {2, 3, 5, 9};   6) {cat, pig};   7) { };   8) {Washington}.

     

    Definition: Complement, \('\)

    The set \(A'\) is the set of all elements in the universal set, \(U\), that are not in \(A'\).

    Symbolically: \(A'\) (read as "\(A\) complement")

    Think of it as: Everything that's NOT in the set

     

    Example #2.3.9 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6\(\}\) and \(A = \{\)1, 2, 3, 4\(\}\). Find \(A'\).


    ✅ Solution:

    \(A' = \{\)5, 6\(\}\),

    because the elements 5, 6 are in the universe set, \(U\), but not in set \(A\). (Think of collecting Happy Meal toys from McDonalds when you were younger. There was a set of 6 different toys numbered from #1 to #6. You have collected toys #1, #2, #3, and #4. Which toys are you missing to complete your set? You are only missing toys #5 and #6 to complete your collection.)

    Example #2.3.10 🤔

    Let \(U = \{\)a, b, c, d, e, f, g, h\(\}\) and \(B = \{\)b, c, d, f, g\(\}\). Find \(B'\).


    ✅ Solution:

    \(B' = \{\)a, e, h\(\}\),

    because the elements a, e, h are in the universe set, \(U\), but not in set \(B\).

    Example #2.3.11 🤔

    Let \(U = \{\)1, 2, 3, 4, 5\(\}\) and \(A = \{\)1, 2, 3\(\}\). Find \(A'\).


    ✅ Solution:

    \(A' = \{\)4, 5\(\}\),

    because the elements 4, 5 are in the universe set, \(U\), but not in set \(A\).

    Example #2.3.12 🤔

    Let \(U = \{\)President, Vice-President, Speaker of the House\(\}\). Find \(U'\).


    ✅ Solution:

    \(U' = \{~\}\),

    because there are no elements outside the universe set, \(U\).  Every object under consideration is included in the universal set.

    Section 2.3: Operations on Sets [In-Class Exercises]
    1. Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8, 9, 10\(\}\) and \(A = \{\)1, 3, 5, 7, 9\(\}\). Find \(A'\).
    2. Let \(U = \{\)apple, banana, cherry, date\(\}\) and \(B = \{\)banana, cherry\(\}\). Find \(B'\).
    3. Let \(U = \{\)All cities in Orange County, California\(\}\), \(A = \{\)Anaheim, Costa Mesa, Huntington Beach\(\}\), \(B = \{\)Placentia, Atwood, Brea\(\}\). Find \(U'\).
    4. Let \(U = \{\)\(\alpha\), \(\beta\), \(\delta\), \(\epsilon\), \(\Sigma\), \(\mu\), \(\Omega\)\(\}\) and \(G = \{\)\(\alpha\), \(\beta\), \(\epsilon\), \(\Sigma\), \(\mu\), \(\Omega\)\(\}\). Find \(G'\).
    Answers

    9) {2, 4, 6, 8, 10};   10) {apple, date};   11) { };   12) \(\delta\).   

     

    Definition: Set Difference, –

    The set \(A\ –\ B\) is the set of all elements that are in \(A\) but not in \(B\).

    Symbolically: \(A\ –\ B\) (read as "\(A\) minus \(B\)") 

    Think of it as: Removing elements from a collection

     

    Example #2.3.13 🤔

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


    ✅ Solution:

    \(A\ –\ B\ = \{\)1, 2\(\}\).

    Why? First off, we are trying to find which elements of \(A\) that are not in \(B\). The elements 3, 4 are in both sets. The elements 1, 2 are in \(A\), but not in \(B\). The elements 5, 6 have nothing to with the operation, because the operation only considers the elements in the first set, \(A\). (Think of starting with set \(A\). Now remove any matching elements that are also in set \(B\). Remove elements 3, 4 from set \(A\). Whatever elements, if any, is/are left over is the answer.)

    Example #2.3.14 🤔

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


    ✅ Solution:

    \(B\ –\ A\ = \{\)5, 6\(\}\), 

    because the elements 5, 6 are in set \(B\), but not in set \(A\). The elements 3, 4 are in both sets \(A\) and \(B\).

    Example #2.3.15 🤔

    Let \(C = \{\)orange, blue, purple, green, red, black, white\(\}\) and \(D = \{\)blue, purple, green, red, black, white, yellow\(\}\). Find \(C\ –\ D\).


    ✅ Solution:

    \(C\ –\ D\ = \{\)orange\(\}\),

    because the element orange is in set \(C\), but not in set \(D\). The elements blue, purple, green, red, black, white are in both sets \(C\) and \(D\).

    Example #2.3.16 🤔

    Let \(E = \{\)a, b, c, d\(\}\) and \(F = \{\)x, y, z\(\}\). Find \(E\ –\ F\).


    ✅ Solution:

    \(E\ –\ F\ = \{\)a, b, c, d\(\}\),

    because the elements a, b, c, d are in set \(E\), but not in set \(F\). There are no common elements in both sets \(E\) and \(F\).

    Example #2.3.17 🤔

    Let \(S = \{\)1, 2, 3, 4, 5, 6, 7, 8, 9, 10\(\}\) and \(T = \{\)1, 3, 5, 7, 9\(\}\). Find \(T\ –\ S\).


    ✅ Solution:

    \(T\ –\ S = \{~\}\),

    because there are no elements that are in set \(T\), but not in set \(S\). The entire set \(T\) is already in \(S\), so this creates the empty set solution for the set difference.

    Section 2.3: Operations on Sets [In-Class Exercises]
    1. Let \(A = \{\)a, b, c, d, e, f\(\}\) and \(B = \{\)d, e, f, g, h\(\}\). Find \(A\ –\ B\).
    2. Let \(A = \{\)a, b, c, d, e, f\(\}\) and \(B = \{\)d, e, f, g, h\(\}\). Find \(B\ –\ A\).
    3. Let \(C = \{\)3, 5, 7, 9\(\}\) and \(D = \{\)1, 3, 4, 6, 9\(\}\). Find \(C\ –\ D\).
    4. Let \(E = \{\)cat, deer, pig\(\}\) and \(F = \{\)cat, deer, dog, goat, pig\(\}\). Find \(F\ –\ E\).
    5. Let \(P = \{\)1, 2, 3, 4\(\}\) and \(Q = \{\)5, 6, 7, 8\(\}\). Find \(Q\ –\ P\).
    6. Let \(J = \{♠, ♥\}\) and \(K = \{♦, ♣\}\). Find \(J\ –\ K\).
    Answers

    13) {a, b, c};   14) {g, h};   15) {5, 7};   16) {dog, goat};   17) {5, 6, 7, 8};   18) \(\{♠, ♥\}\).   

     

    Comparing Operations: A Summary Table

    Operation Symbol Like Number Operation Result
    Union \(A \cup B\) Addition (+) Everything from both sets
    Intersection \(A \cap B\) Finding common factors Only what's in both sets
    Complement \(A'\) Negative (-) Everything NOT in the set
    Difference \(A\ –\ B\) Subtraction (–) What's in \(A\) but not in \(B\)

     

    Order of Operations (Like PEMDAS for Sets)

    When working with set expressions that involve multiple operations, we follow a specific order of operations, similar to how PEMDAS guides us with numerical expressions.

    • First, we always evaluate anything inside parentheses or brackets, as these explicitly tell us what to compute first. For example, in \((A \cup B) \cap C\), we must find \(A \cup B\) before intersecting with \(C\).
    • Second, we evaluate complements, which act like exponents or negation in arithmetic. So, in an expression like \(A' \cap B\), we find \(A'\) before performing the intersection.
    • Third, we perform intersections (\(\cap\)) before unions (\(\cup\)), much like how multiplication comes before addition in PEMDAS. This means \(A \cup B \cap C\) is interpreted as \(A \cup (B \cap C)\), not \((A \cup B) \cap C\).
    • Finally, we evaluate unions and differences from left to right when they appear at the same level. This hierarchy exists because intersection is considered a "stronger" operation than union, binding elements more tightly together, just as multiplication binds more tightly than addition. For instance, the expression AB'CD would be evaluated as: first find \(B'\), then compute \(B' \cap C\), then evaluate \(A \cup (B' \cap C)\), and finally compute that result \(\cup D\). Understanding this order is crucial because \(A \cup B \cap C\) and \((A \cup B) \cap C\) produce completely different results—the first gives you \(A\) combined with the overlap of \(B\) and \(C\), while the second gives you only the overlap between the union of \(A\) and \(B\) with \(C\).

    When in doubt, use parentheses to make your intentions clear, as they override all other rules and ensure your expression is evaluated exactly as you intend, eliminating any ambiguity in complex set operations.

     

    Example #2.3.18 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cup B \cap C\).


    ✅ Solution:
    • Step 1 - Intersection before union:  \(B \cap C = \{\)4, 5\(\}\)
    • Step 2 - Now union:  \(A\) \(\cap\) \(\{\)4, 5\(\}\)

    \(A \cup B \cap C = \{\)1, 2, 3, 4, 5\(\}\)

    Example #2.3.19 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \((A \cup B) \cap C\).


    ✅ Solution:
    • Step 1 - Parentheses first:  \(A \cup B = \{\)1, 2, 3, 4, 5\(\}\)
    • Step 2 - Now intersection:  \(\{\)1, 2, 3, 4, 5\(\}\cap C\)

    \((A \cup B) \cap C = \{\)4, 5\(\}\)

    Notice: From examples #2.3.18 & #2.3.19, \(A \cup B \cap C \not= (A \cup B) \cap C\).

    Example #2.3.20 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A' \cap B\).


    ✅ Solution:
    • Step 1 - Complement first:  \(A' = \{\)5, 6, 7, 8\(\}\)
    • Step 2 - Now intersection:  \(\{\)5, 6, 7, 8\(\}\cap B\)

    \(A' \cap B = \{\)5\(\}\)

    Example #2.3.21 🤔

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


    ✅ Solution:
    • Step 1 - Complement first:  \(B' = \{\)1, 2, 6, 7, 8\(\}\)
    • Step 2 - Now intersection:  \(A \) \(\cap\) \( \{\)1, 2, 6, 7, 8\(\}\)

    \(A \cap B' = \{\)1, 2\(\}\)

    Note: From examples #2.3.20 & #2.3.21, \(A \cap B' \not= (A' \cap B)\).

    Example #2.3.22 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cup B' \cap C\).


    ✅ Solution:
    • Step 1 - Complement first:  \(B' = \{\)1, 2, 6, 7, 8\(\}\)
    • Step 2 - Intersection before union:  \(B' \cap C = \{\)6, 7\(\}\)
    • Step 3 - Now union:  \(A\) \(\cup\) \(\{\)6, 7\(\}\)

    \(A \cup B' \cap C = \{\)1, 2, 3, 4, 6, 7\(\}\)

    Example #2.3.23 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \((A \cup B)' \cap C\).


    ✅ Solution:
    • Step 1 - Parentheses first:  \(A \cup B = \{\)1, 2, 3, 4, 5\(\}\)
    • Step 2 - Complement:  \((A \cup B)' = \{\)6, 7, 8\(\}\)
    • Step 3 - Intersection:  \(\{\)6, 7, 8\(\}\cap C\)

    \((A \cup B)' \cap C = \{\)6, 7\(\}\)

    Notice: From examples #2.3.22 & #2.3.23, \(A \cup B' \cap C \not= (A \cup B)' \cap C\).

    Example #2.3.24 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cup (B' \cap C)\).


    ✅ Solution:
    • Step 1 - Parentheses first, complement inside:  \(B' = \{\)1, 2, 6, 7, 8\(\}\)
    • Step 2 - Still in parentheses, intersection:  \(B' \cap C = \{\)6, 7\(\}\)
    • Step 3 - Now union:  \(A\) \(\cup\) \(\{\)6, 7\(\}\)

    \(A \cup (B' \cap C) = \{\)1, 2, 3, 4, 6, 7\(\}\)

    Notice: This is the same result in Example #2.3.22.

    Example #2.3.25 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cap B \cup C\).


    ✅ Solution:
    • Step 1: Intersection first:  \(A \cap B = \{\)3, 4\(\}\)
    • Step 2: Union:  \(\{\)3, 4\(\}\cup C\)

    \(A \cap B \cup C  = \{\)3, 4, 5, 6, 7\(\}\)

    Example #2.3.26 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cap (B \cup C)\).


    ✅ Solution:
    • Step 1 - Parentheses first:  \(B \cup C = \{\)3, 4, 5, 6, 7\(\}\)
    • Step 2 - Union:  \(A\) \(\cap\) \(\{\)3, 4, 5, 6, 7\(\}\)

    \(A \cap (B \cup C) = \{\)3, 4\(\}\)

    Notice: From examples #2.3.25 & #2.3.26, \(A \cap B \cup C \not= A \cap (B \cup C)\).

    Example #2.3.27 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A \cap C \cup B\).


    ✅ Solution:
    • Step 1 - Intersection first:  \(A \cap C = \{\)4\(\}\)
    • Step 2 - Union:  \(\{\)4\(\}\cup B\)

    \(A \cap C \cup B = \{\)3, 4, 5\(\}\)

    Example #2.3.28 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \((A \cup B)'\).


    ✅ Solution:
    • Step 1 - Parentheses first:  \(A \cup B = \{\)1, 2, 3, 4, 5\(\}\)
    • Step 2 - Complement:  \(\{\)1, 2, 3, 4, 5\(\}'\)

    \((A \cup B)' = \{\)6, 7, 8\(\}\)

    Example #2.3.29 🤔

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A' \cap B'\).


    ✅ Solution:
    • Step 1 - Complements first:  \(A' = \{\)5, 6, 7, 8\(\}\)  &  \(B' = \{\)1, 2, 6, 7, 8\(\}\)
    • Step 2 - Intersection:  \(\{\)5, 6, 7, 8\(\} \cap \{\)1, 2, 6, 7, 8\(\}\)

    \(A' \cap B' = \{\)6, 7, 8\(\}\)

    Notice: From examples #2.3.28 & #2.3.29, \((A \cup B)'=A' \cap B'\).

    Example #2.3.30 ðŸ¤”

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \((A \cap B)'\).


    ✅ Solution:
    • Step 1 - Parentheses first:  \(A \cap B = \{\)3, 4\(\}\)
    • Step 2 - Complement:  \(\{\)3, 4\(\}'\)

    \((A \cap B)' = \{\)1, 2, 5, 6, 7, 8\(\}\)

    Example #2.3.31 ðŸ¤”

    Let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8\(\}\), \(A = \{\)1, 2, 3, 4\(\}\), \(B = \{\)3, 4, 5\(\}\), and \(C = \{\)4, 5, 6, 7\(\}\). Find \(A' \cup B'\).


    ✅ Solution:
    • Step 1 - Complements first:  \(A' = \{\)5, 6, 7, 8\(\}\)  &  \(B' = \{\)1, 2, 6, 7, 8\(\}\)
    • Step 2 - Union:  \(\{\)5, 6, 7, 8\(\} \cup \{\)1, 2, 6, 7, 8\(\}\)

    \(A' \cup B' = \{\)1, 2, 5, 6, 7, 8\(\}\)

    Notice: From examples #2.3.30 & #2.3.31, \((A \cap B)'=A' \cup B'\).

    Notice that Example #2.3.28 and Example #2.3.29 produced the same result {6, 7, 8}. Also, notice that Example #2.3.30 and Example #2.3.31 produced the same result {1, 2, 5, 6, 7, 8} as well. This was not coincidence. In fact, regardless of what the contents are in set \(A\) or set \(B\), the outcomes would always be the same for \((A \cup B)'=A' \cap B'\) as well as \((A \cap B)'=A' \cup B'\). These are called De Morgan's Laws. De Morgan's Laws are two fundamental rules in set theory (and logic) that describe how complement interacts with union and intersection. They're named after mathematician Augustus De Morgan (1806–1871), a British mathematician and logician who made significant contributions to mathematics, particularly in the fields of logic, algebra, and set theory.

    These laws show us how to "distribute" the complement operation across unions and intersections.

    Definition: De Morgan's Laws

    For any two finite sets, \(A\) and \(B\), the following equations are always true:

    • \((A \cup B)'=A' \cap B'\)  (De Morgan’s Law of Union)
    • \((A \cap B)'=A' \cup B'\)  (De Morgan’s Law of Intersection)

    These laws were published in 1847 in his work on formal logic

     

    De Morgan's Laws tell us:

    • Complementing a union gives you an intersection of complements
    • Complementing an intersection gives you a union of complements
    • The operation "flips" and the sets become their complements

    De Morgan's Laws are essential tools in mathematics and computer science for several important reasons.

    First, they help us simplify complex set expressions by providing alternative forms that may be easier to work with or understand. What might look complicated on one side of the equation can often be expressed more simply using the other side. Second, these laws are fundamental in logic and programming, where they appear constantly in computer science applications: the principle that NOT (A OR B) equals (NOT A) AND (NOT B), and that NOT (A AND B) equals (NOT A) OR (NOT B), forms the basis of how computers process logical operations, how programming languages handle conditional statements, how database queries are optimized, and how search engines filter results. Third, De Morgan's Laws give us alternative ways to think about and solve problem. When one approach to a problem seems difficult or unclear, these laws allow us to re-frame the question in a different but equivalent way, often revealing a simpler path to the solution. Whether you're simplifying a mathematical proof, writing efficient code, designing digital circuits, or just trying to think clearly about logical relationships, De Morgan's Laws provide powerful techniques for transforming complex expressions into more manageable forms.

    Section 2.3: Operations on Sets [In-Class Exercises]

    For Exercises #19 through #25, let \(U = \{\)1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11\(\}\), \(A = \{\)1, 3, 4, 7\(\}\), \(B = \{\)1, 5, 6\(\}\), \(C = \{\)1, 10, 11\(\}\), \(D = \{\)1, 3, 5, 7, 9, 11\(\}\), \(E = \{\)2, 4, 6, 8, 10\(\}\), \(F = \{\)3, 6, 9\(\}\). 

    1. Find \(C' \cap D\).
    2. Find \((A \cup B)'\).
    3. Find (DC )'.
    4. Find \((A \cap B \cup F)'\).
    5. Find \((B \cup D \cap F)'\).
    6. Find \(((B' \cap E) \cup A)'\).
    7. Find \(((A' \cup E) \cup C')'\).
    Answers

    19) {3, 5, 7, 9};   20) {2, 8, 9, 10, 11};   21) {1, 2, 4, 6, 8, 10, 11};   22) {2, 4, 5, 7, 8, 10, 11};   23) {2, 4, 7, 8, 10, 11};   24) {5, 6, 9, 11};   25) {1}.



    This page titled Section 2.3: Operations on Sets is shared under a not declared license and was authored, remixed, and/or curated by Timothy Cooley.

    • Was this article helpful?