Set Operations

Set operations are among the most important concepts in set theory. They allow us to combine sets, identify elements they have in common, or isolate elements that belong to one set but not another.

The three fundamental set operations are union, intersection, and set difference.

This page uses Venn diagrams to explain these operations. Visual representations make it easier to see how sets relate to one another and help build an intuitive understanding of the underlying concepts.

Union

The union of two sets A and B is the set containing every element that belongs to A, to B, or to both.

the union of sets

The union operation is represented by the symbol .

the notation for union

When an element belongs to both sets, it appears only once in the union.

Union of a family of sets. The concept of union can be extended to any collection of sets. Given a family of sets \(\{A_i\}_{i \in I}\), the union is defined as $$ \bigcup_{i \in I} A_i = \{ x \mid x \in A_i \text{ for some } i \in I \}. $$ In other words, the union contains every element that belongs to at least one set in the collection.

Example: finding the union of two sets

Consider the following sets:

a practical example of calculating the union of two sets

Explanation. Set A contains the elements {2, 5, 6, 7, 8}, while set B contains the elements {1, 3, 4, 6, 7, 9}. The union includes every distinct element that appears in either set: {1, 2, 3, 4, 5, 6, 7, 8, 9} The elements 6 and 7 belong to both sets, but they are listed only once in the union.

Intersection

The intersection of two sets A and B is the set containing all elements that belong to both sets.

the intersection of sets

The intersection operation is represented by the symbol .

the notation for intersection

If two sets have no elements in common, they are called disjoint sets. In this case, their intersection is the empty set.

the case of disjoint sets

Intersection of a family of sets. For a family of sets \(\{A_i\}_{i \in I}\), the intersection is defined as $$ \bigcap_{i \in I} A_i = \{ x \mid x \in A_i \text{ for every } i \in I \}. $$ The intersection therefore consists of all elements shared by every set in the collection.

Example: finding the intersection of two sets

Consider the following sets:

example of calculating the intersection of two sets

Explanation. The elements 6 and 7 appear in both set A and set B. Therefore, the intersection is A ∩ B = {6, 7}

Set Difference

The set difference A - B is the set of all elements that belong to A but do not belong to B.

the set difference

This operation is also known as the relative complement of B in A.

the notation for set difference

Definition. The set difference is commonly written as $$ A \setminus B = \{ x \in A \mid x \notin B \}. $$ This notation describes the set of all elements that belong to A and do not belong to B.

Example: finding the set difference

Consider the following sets:

the set difference A minus B

Explanation. Set A contains the elements {2, 5, 6, 7, 8}. Since the elements 6 and 7 also belong to set B, they are removed from A - B. The remaining elements are A - B = {2, 5, 8}

Properties of Set Operations

Set operations satisfy several important algebraic laws. These properties are widely used in mathematics, logic, computer science, and probability theory.

  • Commutative Law

    A ∪ B = B ∪ A
    A ∩ B = B ∩ A

  • Associative Law

    A ∪ (B ∪ C) = (A ∪ B) ∪ C
    A ∩ (B ∩ C) = (A ∩ B) ∩ C

  • Distributive Law

    A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
    A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

  • De Morgan's Laws

    A - (B ∪ C) = (A - B) ∩ (A - C)
    A - (B ∩ C) = (A - B) ∪ (A - C)

These laws make it possible to simplify set expressions and reveal important relationships between different set operations.

 

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Set