Set Operations and Venn Diagrams

Venn Diagrams

Wind diagram is a geometrical method to represent set or sets, using a box as our population or universal set and circular shapes to represent sets inside the box.

  • Universal Set: The set of all elements or objects under consideration.
    • Denoted by uu in set theory.
    • Referred to as a sample space in probability.

Set Operations

Considering two sets aa and bb from a universal set uu:

  • Complement of a Set (aa' or aca^c):

    • The set of all elements in uu but not in aa.
    • Set builder notation: {xxbinomeu and xa}\lbrace x | x binom{e}{u} \text{ and } x \notin a \rbrace
  • Union of Two Sets (aba \cup b):

    • The set of all elements that are in aa or bb or both.
    • Set builder notation: {xxbinomea or xbinomeb}\lbrace x | x binom{e}{a} \text{ or } x binom{e}{b} \rbrace
  • Intersection of Two Sets (aba \cap b):

    • The set of all elements that are in both aa and bb at the same time (overlap area).
    • Set builder notation: {xxbinomea and xbinomeb}\lbrace x | x binom{e}{a} \text{ and } x binom{e}{b} \rbrace
  • Difference of Two Sets (aba - b):

    • The set of all elements that are in aa but not in bb.
    • Set builder notation: {xxbinomea and xb}\lbrace x | x binom{e}{a} \text{ and } x \notin b \rbrace
  • Cartesian Product (a×ba \times b):

    • The set of all ordered pairs (x,y)(x, y) where xx belongs to aa and yy belongs to bb.
    • a×bb×aa \times b \neq b \times a

Cardinality

  • Cardinality of a Union of Two Sets:
    • ab=a+bab|a \cup b| = |a| + |b| - |a \cap b|
  • Cardinality of a Union of Three Sets:
    • abc=a+b+cabbcac+abc|a \cup b \cup c| = |a| + |b| + |c| - |a \cap b| - |b \cap c| - |a \cap c| + |a \cap b \cap c|