Union

Definition

The union of two Sets X,Y\mathbb{X}, \mathbb{Y} is the set of all elements that belong to X\mathbb{X} or Y\mathbb{Y}

Formally:

X∪Y={x:x∈X or x∈Y}\mathbb{X} \cup \mathbb{Y} = \{ x : x \in \mathbb{X} \text{ or } x \in \mathbb{Y} \}

This notion of "or" is foundational to computer programming and logic gates.

Properties

For arbitrary sets: X,Y,Z\mathbb{X}, \mathbb{Y}, \mathbb{Z}, and the Empty Set ∅\emptyset:

i) X∪X=X\mathbb{X} \cup \mathbb{X} = \mathbb{X}

ii) X∪Y=Y∪X\mathbb{X} \cup \mathbb{Y} = \mathbb{Y} \cup \mathbb{X}

iii) X∪(Y∪Z)=(X∪Y)∪Z\mathbb{X} \cup (\mathbb{Y} \cup \mathbb{Z}) = (\mathbb{X} \cup \mathbb{Y}) \cup \mathbb{Z}

iv) X∪∅=X\mathbb{X} \cup \emptyset = \mathbb{X}

Example

Let X={a,b,c,d}\mathbb{X}={a, b, c, d}, Y={a,e,f}\mathbb{Y}={a, e, f}

Then:

X∪Y={a,b,c,d,e,f}\mathbb{X} \cup \mathbb{Y} = \{a, b, c, d, e, f\}