Lesson 2: Set Operations

In this lesson, you will learn about the set operations, their usages, and examples to better understand the topic.

Set Operations

There are four main set’s operations:

      • Union, Donated by
      • Intersection, donated by
      • Complement donated by \overline{A}
      • Difference donated by A – B

    Set union

    The union of two set A and B is set that contains all elements from both A and B. For example:

    A = {1,2} and B ={2,3}, C={5,6,8}, then

    A ∪ B = {1,2,3}

    A ∪ C = {1,2,5,6,8}

    A ∪ C ∪ B = {1,2,3,5,6,8}

    venn diagram

    Set Intersection

    The Intersection of two sets A and B is set that all elements that exist in both Sets. For example:
    Consider the three sets A = {1,2} and B ={2,3}, C={5,6,8}, then
    A ∩ B = {2}
    B ∩ C = ∅
    A ∩ B ∩ C = ∅

    Note: if the intersection between sets A and B is empty, then A and B are disjoint.

    Set Complement

    The complement of a set A is the set of all elements in the universal set, but not in Set A. For Example:

    Consider the two sets A = { 1, 2} and U = { 1, 2, 3, 4}, find complement of A.

    The Complement of set A contains the elements present in the universal U set but not in set A.

    \overline{A} = { 3,4}.

    graph

    Set Difference

    The difference of sets A and B, donated by A – B, is set containing all elements in A but not in B. For Example:

    If A = {1, 2,5,6} and B = { 1, 2, 3, 4}

    Then A – B = {5,6}

    Practice

    Let A={1,3,5,7,9,12}, B={3,4,5,6,7} and C={2,4,6,8,10}, find

    A∪B, A∩B, A∩C, A-B, |A∪B|, |A∩C|

    Answers
    • A∪B = {1, 3, 4, 5, 6, 7, 9, 12}
    • A∩B = {3, 5, 7}
    • A∩C = ∅
    • A-B = {1, 9, 12}
    • |A∪B| = 8
    • |A∩C| = 0

    Set identities

    Below is the list of most used set identities that relate to the various set operations.

    The sets A, B, and C below are subsets of a universal set U.

    Common symbols used in Set Theory

    table in the notepad++ file a)