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:

XY={x:xX or xY}\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) XX=X\mathbb{X} \cup \mathbb{X} = \mathbb{X}

ii) XY=YX\mathbb{X} \cup \mathbb{Y} = \mathbb{Y} \cup \mathbb{X}

iii) X(YZ)=(XY)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:

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