Union

The union of two sets \(A\) and \(B\), denoted \(A \cup B\), is the set of things which are either in \(A\) or in \(B\) or both.

illustration of the output of the union operation

Formally stated, where \(C = A \cup B\)

$$x \in C \leftrightarrow (x \in A \lor x \in B)$$

That is, Iff \(x\) is in the union \(C\), then either \(x\) is in \(A\) or \(B\) or possibly both.

todo: more lengthy explanation for Math 2 level

Examples

  • \(\{1,2\} \cup \{2,3\} = \{1,2,3\}\)

  • \(\{1,2\} \cup \{8,9\} = \{1,2,8,9\}\)

  • \(\{0,2,4,6\} \cup \{3,4,5,6\} = \{0,2,3,4,5,6\}\)

  • \(\mathbb{R^-} \cup \mathbb{R^+} \cup \{0\} = \mathbb{R}\) (In other words, the union of the negative reals, the positive reals and zero make up all of the real numbers.)