Cardinality of Set Union

Theorem
Let $S_1, S_2, \ldots$ be sets.

Then:
 * $\left|{S_1 \cup S_2}\right| = \left|{S_1}\right| + \left|{S_2}\right| - \left|{S_1 \cap S_2}\right|$

Also:

and in general:

Corollary
Let $\mathcal S$ be an algebra of sets.

Let $S_1, S_2, \ldots, S_n$ be finite sets of $\mathcal S$ which are pairwise disjoint.

Then:


 * $\displaystyle \left\vert{\bigcup_{i=1}^n S_i}\right\vert = \sum_{i=1}^n \left\vert{S_i}\right\vert$

Proof
From the fact that Cardinality is an Additive Function, we can directly apply the Inclusion-Exclusion Principle:

If $f: \mathcal S \to \R$ is an additive function, then:

Proof of Corollary
As $S_1, S_2, \ldots, S_n$ are pairwise disjoint, their intersections are all empty.

The main result holds, but from Cardinality of Empty Set, all the terms apart from the first vanish.