✖

Unification, intersection, difference and complement of sets

Kapitoly: Quantities, Plural operations, Countable sets, Paradoxes of set theory

We can perform different set operations between sets. The most basic include union, intersection, difference and complement.

Unification of sets

We denote the union of sets by ∪, so we denote the union of the sets A and B classically: A ∪ B. The union of the sets A and B will result in a new set that contains all elements from the set A and also all elements from the set B. Definition:

$$A \cup B = \left\{x | x \in A \vee x \in B\right\}$$

Example: Let us have two sets A = {1, 3, 5, 7} and B = {2, 4, 6}. The union produces the set: A ∪ B = {1, 2, 3, 4, 5, 6, 7}. The resulting set contains elements of both sets.

Another example: A = {1, 2, 3} and B = {2, 3, 4}. Unification yields: A ∪ B = {1, 2, 3, 4}. The elements of 2 and 3 will not be in the resulting set twice because the set does not contain one element more than once.

Other properties:

  • A ∪ A = A: if we unify two identical sets, we get the same set again.
  • A ∪ B = B ∪ A: the union is commutative, no matter the order.
  • A ∪ ∅ = A: the empty set contains no element, so there is nothing to unify.

Intersection of sets

The intersection of two sets A and B will produce a new set that contains the elements that the two sets have in common. More precisely, we would say that the new set will contain elements that belong to A and also belong to B. We denote the intersection by ∩. Definition:

$$A \cap B = \left\{x | x \in A \wedge x \in B\right\}$$

Example: A = {1, 3, 5, 7, 9} and B = {4, 5, 6, 7}. The intersection is equal to A ∩ B = {5, 7}. Another example: A = {a, b, c, d, e} and B = {f, g, h, i, j}. The intersection is equal to: A ∩ B = ∅. These sets have no common element, so the intersection is the empty set.

Other properties:

  • A ∩ A = A: the intersection of two identical sets yields the same set again.
  • A ∩ B = B ∩ A: the intersection is commutative, no matter the order.
  • A ∩ ∅ = ∅: the empty set contains no element, so it certainly has no element in common with the set A.

Difference of sets

We denote the difference of sets by the standard symbol for minus − or better by such an oblique minus ∖. By the difference of two sets A and B we mean the set that will contain all the elements of A while containing no element of B. In short, you look to see which elements the first set has in common with the second and then remove those. Definition:

$$A \setminus B = \left\{x \in A | x \notin B\right\}$$

Example: A = {1, 2, 3, 4, 5} and B = {4, 5, 6, 7, 8}. The difference will then be equal to A ∖ B = {1, 2, 3}. These are the elements that remain when we remove all the elements from the set A that are in the set B. Another example: A = {a, b, d, e}. The difference A ∖ A = ∅.

Other properties:

  • A ∖ A = ∅: just as when we subtract two equal numbers from each other we get zero (e.g. 5 − 5 = 0), when we subtract two equal sets we get an empty set.
  • A ∖ ∅ = A: the empty set contains no element, so we cannot remove any element from the set A.

The complement of the set

The complement of the set A is denoted in many ways, but probably most often by a comma A' or an upper bar: $\overline{A}$. For simplicity, I will use a comma. In order to compute the complement of the set A, we need to know in which set we are computing the complement. The complement of the set represents all the elements that are not in the set A, so it is a kind of opposite of the set A.

If we have M = {1, 2, 3, …, 9, 10} as the main set , then the complement of the set A = {2, 4, 6, 8, 10} in M is the set A' = {1, 3, 5, 7, 9}. It contains all elements from M that are not in A. We can say that A' in M is equal to M ∖ A.

If we take integers as the main set, then the complement of the set of even numbers will be odd numbers. The complement of the set A = {1, 2, 3, 4} will be the set A' = {…, −3, −2, −1, 0, 5, 6, 7, …}.

For the complement, if we apply it twice, we get back the original set. For example, on integers: the complement of even numbers is odd numbers. And the complement to odd numbers are again even numbers. so A = A'' (the complement of the complement of A) applies.