Set Union

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

union of sets

The symbol used for union is .

notation for union

The expression A ∪ B is read as the union of A and B or simply A union B.

A key feature of sets is that elements cannot be repeated. Therefore, if an element belongs to both A and B, it appears only once in the union.

Union of Multiple Sets. The union operation is not limited to two sets. It can also be applied to an entire family of sets. If \( \{A_i\}_{i \in I} \) is a collection of sets, their union is written as $$ \bigcup_{i \in I} A_i = \{ x \mid x \in A_i \text{ for at least one } i \in I \} $$ This notation represents the set of all elements that belong to at least one set in the family.

A Practical Example

Consider the following sets:

$$ A = \{ 2, 5, 6, 7, 8 \} $$

$$ B = \{ 1, 3, 4, 6, 7, 9 \} $$

a practical example of calculating the union of two sets

To find the union, combine all elements from both sets and remove any duplicates.

$$ A \cup B = \{ 1, 2, 3, 4, 5, 6, 7, 8, 9 \} $$

example of union of A and B

Note. The elements 6 and 7 appear in both A and B. Even so, they are listed only once in the union because repeated elements are not allowed in a set.

Example: One Set Contained in Another

Consider the sets

$$ A = \{ 1, 2, 3, 4, 5, 6, 7, 8, 9 \} $$

$$ B = \{ 2, 4, 6, 8 \} $$

Since every element of B already belongs to A, the set B is a proper subset of A.

As a result, the union adds no new elements and is equal to A itself:

$$ A \cup B = \{ 1, 2, 3, 4, 5, 6, 7, 8, 9 \} $$

an example of union

Example: Disjoint Sets

Now consider the sets

$$ A = \{ 1, 3, 5, 7, 9 \} $$

$$ B = \{ 2, 4, 6, 8 \} $$

These sets are disjoint, meaning that they have no elements in common.

In this case, the union is simply the collection of all elements from both sets:

$$ A \cup B = \{ 1, 2, 3, 4, 5, 6, 7, 8, 9 \} $$

The Euler-Venn diagram below provides a visual representation of the union.

A union B

Union and Logical OR. Set union is often compared to the logical OR operation. More precisely, it corresponds to the inclusive OR, which is true when either condition is true or when both conditions are true. For example, if an element belongs to both A and B, it is still included in the union A∪B. the difference between inclusive and exclusive logical disjunction
This differs from the exclusive OR (XOR), which excludes cases in which both conditions are true simultaneously. For this reason, whenever set union is compared with logical disjunction, the correct comparison is with inclusive disjunction.

Properties of Union

Like many mathematical operations, union satisfies several important algebraic properties.

  • Commutative Property
    The order of the sets does not matter: $$ A \cup B = B \cup A $$

    commutative property of union

  • Associative Property
    The way the sets are grouped does not affect the result: $$ (A \cup B) \cup C = A \cup (B \cup C) $$

    associative property of union

  • Distributive Property over Intersection
    Union distributes over intersection: $$ A \cup (B \cap C) = (A \cup B) \cap (A \cup C) $$

    distributive property of union over intersection

Cardinality of a Union

The cardinality of a union depends on whether the sets share common elements.

  • Disjoint Sets
    If two sets have no elements in common, the cardinality of their union is simply the sum of their cardinalities: $$ |A \cup B| = |A| + |B| $$

    A union B

  • Non-Disjoint Sets
    If two sets have elements in common, the elements in the intersection would be counted twice when adding the cardinalities. To correct this, subtract the cardinality of the intersection: $$ |A \cup B| = |A| + |B| - |A \cap B| $$

    example of union of A and B

    Why does this formula work? The quantity |A| + |B| counts every element in A and every element in B. Elements that belong to both sets are counted twice, so subtracting |A∩B| removes the extra count.

    the cardinality of sets

    For three sets, the inclusion-exclusion principle gives:

    $$ |A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C| $$

    Why is the last term added? After subtracting the pairwise intersections, the elements belonging to all three sets have been removed too many times. Adding |A∩B∩C| restores the correct count.

    the cardinality of the union of three sets

The same idea extends naturally to unions involving any finite number of sets.

 
 

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