Skip to content

Distributivity of set operations

Textbook

For arbitrary sets $A$, $B$, and $C$, two distributive laws hold:

$$(A\cup B)\cap C=(A\cap C)\cup(B\cap C),$$

$$(A\cap B)\cup C=(A\cup C)\cap(B\cup C).$$

The first identity follows by considering an arbitrary element $x$. The left side requires membership in $C$ and at least one of $A$ or $B$. Equivalently, $x$ belongs to both $A$ and $C$, or to both $B$ and $C$. Those alternatives describe the right side. Equivalence of the conditions proves equality of the sets.

For the second identity, two cases exhaust the possibilities. If $x\in C$, it belongs to both unions on the right and to the left side. If $x\notin C$, both sides require membership in both $A$ and $B$. The conditions again agree for every $x$.

Distributivity rearranges operations while preserving the elements. It does not permit exchanging union for intersection or dropping the repeated $C$ from one branch.

In the first law, the shared requirement of membership in $C$ applies to each alternative. This also covers elements belonging to both $A$ and $B$: repeating a check creates no duplicate result element. Empty or equal sets are allowed because the proof uses neither their size nor distinctness. The identity guarantees equal results, but does not itself guarantee equal computation time or memory consumption for two program implementations.

Related concepts: Set union, Set intersection.

In plain language

A swimming pool admits holders of a pass or a single ticket, provided they have a medical certificate. Checking certificates after combining the two groups admits exactly the same people as checking each group separately and then combining the results. The dual law similarly distributes a shared permission across two required conditions. Both branches must retain the same rule; algebra does not open a side entrance without a certificate.

Example

The illustrative sets are $A=\{1,2,3\}$, $B=\{3,4\}$, and $C=\{2,3,5\}$. Both sides of each identity are computed.

Distributivity of set operations

First law: left side

Only elements of C remain from the union of A and B: 2 and 3.

Step 1 of 4: First law: left side

Read all steps
  1. First law: left side

    Only elements of C remain from the union of A and B: 2 and 3.

    A ∪ B
    1excluded2included3included4excluded
    Result
    2included3included
  2. First law: right side

    A intersects C in 2 and 3; B intersects C in 3. Uniting those results gives 2 and 3 again.

    A ∩ C
    2included3included
    B ∩ C
    3included
    Result
    2included3included
  3. Second law: left side

    A and B share 3. Adding C gives 2, 3, and 5.

    A ∩ B
    3current
    C
    2included3included5included
    Result
    2included3included5included
  4. Second law: right side

    The two unions share 2, 3, and 5. Both sides agree again.

    A ∪ C
    1excluded2included3included5included
    B ∪ C
    2included3included4excluded5included
    Result
    2included3included5included

The first two steps compare two ways to obtain $\{2,3\}$; the last two compare two ways to obtain $\{2,3,5\}$. Those two answers need not match each other because they belong to different identities. Five is a useful check: the first identity excludes it from the starting union of $A$ and $B$, whereas membership in $C$ admits it in the second. The comparison concerns the two sides of one identity; neighbouring pictures from different identities need not match.

The original text of this free article is published under CC BY-NC-ND 4.0.

Previous / next

Previous
De Morgan’s laws
Next
Decomposing a union into disjoint parts
  • Set membership

    What membership states, why order and repetition do not change a set, and how an empty set differs from a set containing it.

    Read article
    Set Theory
  • Set equality

    How to prove set equality element by element or through two inclusions, and why equal size is not enough.

    Read article
    Set Theory
  • Set inclusion

    How to check that every element of one set is in another, and why inclusion differs from membership.

    Read article
    Set Theory