Set operations

Union

Set operation (Union)

The union of sets and , , is the set $$ A \cup B = \{ x | x \in A \text{ (inclusive)} \text{ or } x \in B \} $$

consists of elements in either or or both.

Venn diagram of

For example, let and . Hence, .

Properties of union

  • Identity law (Sets)

    The identity law is that $A$.

    Link to original
Link to original

Intersection

Set operation (Intersection)

The intersection of sets and , , is the set $$ A \cap B = \{ x | x \in A \text{ and } x \in B \} $$

consists of elements in both and .

Venn diagram of

For example, let B = { 10, 4, 9 }. Hence .

Disjoint

Disjoint sets are sets with no common elements, $A \cap B = \emptyset$.

Link to original

Properties of intersection

  • The domination law states that .
Link to original

Difference / Complement

Set operation (Difference)

The difference of sets and , , is the set $$ A - B = \{ x | x \in A \text{ and } x \notin B \} $$

consists of those elements that are in but not in . This can also be called the complement of with respect to .

Venn diagram of

For example, let and . Hence and .

Properties of complementation

  • Complementation laws (Sets)

    There are complementation laws that say that:

    Link to original
  • De Morgan's law (Sets)

    The De Morgan’s law can be represented in sets as so: ?

    Link to original
Link to original

Absolute complement

Set operation (Absolute complement)

Sometimes we may consider all sets as being subsets of some given universal set, .

Given a universal set and , the complement of , , is the set $$ \begin{aligned} \bar A &= U - A \\ &= \{ x \in U | x \notin A \} \end{aligned} $$

Venn diagram of
Link to original

Common Laws

  • Commutative law (Sets)

    The commutative law says that $B \cup A$ and $A \cap B = B \cap A$.

    Link to original
  • Associative law (Sets)

    The associative law says that and that .

    We can meaningfully write, or .

    Similarly, we can also write, or .

    Link to original
  • Idempotent law (Sets)

    The idempotent law says that $A$ and $A \cap A = A$.

    Link to original
  • Distributive laws (Sets)

    There are two distributive laws: ?

    Link to original