Unions

Mathematically, a union can be defined as:

\[ A \cup B = \{x | x \in A \textrm{ or } x \in B\}\\ \\ \{ 1, 2 \} \cup \{ 2, 3 \} = \{ 1, 2, 3 \}\\ \{ a, b, c \} \cup \{ a, c \} = \{ a, b, c \}\\ \{ a, b, c \} \cup \{ \{a, b\}, c \} = \{ a, b, c, \{a, b\} \}\\ \]

Maths with Unions

\[ A = \{x | x = 2n \textrm{ for some } n \in \mathbb{N} \}\\ B = \{x | x = 2n + 1 \textrm{ for some } n \in \mathbb{N} \}\\ \]

Show that $A \cup B = \mathbb{N}$

\[ \textrm{First prove that } \mathbb{N} \subseteq A \cup B\\ \\ \textrm{Let } x \in \mathbb{N}\\ \textrm{If } x \textrm{ is even, then } x=2n \textrm{ for some } n \in \mathbb{N} \textrm{ and } x \in A\\ \therefore x \in A \cup B\\ \textrm{If } x \textrm{ is odd, then } x=2n + 1 \textrm{ for some } n \in \mathbb{N} \textrm{ and } x \in B\\ \therefore x \in A \cup B\\ \]
\[ \textrm{Next prove that } A \cup B \subseteq \mathbb{N}\\ \\ \textrm{Let } x \in A \cup B\\ \textrm{If } x \in A \textrm{ then } x=2n \textrm{ for some } n \in \mathbb{N}\\ \therefore x \in \mathbb{N}\\ \\ \textrm{Let } x \in B \cup B\\ \textrm{If } x \in B \textrm{ then } x=2n+1 \textrm{ for some } n \in \mathbb{N}\\ \therefore x \in \mathbb{N} \]

Intersections

An intersection between sets $A$ and $B$ would be all the objects that are in both sets ($A$ and $B$)

Mathematically…

\[ A \cap B = \{ x | x \in A \textrm{ and } x \in B\}\\ \\ \{1, 2\} \cap \{2, 3\} = \{2\}\\ \{a, b, c\} \cap \{a, c\} = \{a, c\}\\ \{a, b, c\} \cap \{\{a, b\}, c\} = \{c\} \]

Example

\[ A = \{x | x = 2n \textrm{ for some } n \in \mathbb{N} \}\\ B = \{x | x = 3n \textrm{ for some } n \in \mathbb{N} \}\\ C = \{x | x = 6n \textrm{ for some } n \in \mathbb{N} \} \]

Show that $A \cap B = C$

\[ \textrm{First, prove that } C \subseteq A \cap B\\ \\ \textrm{If } x \in C \textrm{, then } x = 6n \textrm{ for some } n \in \mathbb{N}\\ x = 6n\\ x = 2(3n) \textrm{ and } 3n \in \mathbb{N}\\ \therefore x \in A\\ x = 3(2n) \textrm{ and } 2n \in \mathbb{N}\\ \therefore x \in B \]
\[ \textrm{Next, prove that } A \cap B \subseteq C \\ \textrm{If } x \in A \cap B \textrm{, then } x = 2n \textrm{ for some } n \in \mathbb{N} \textrm{ and } x = 3m \textrm{ for some } m \in \mathbb{N}\\ \textrm{Assuming this in "terms" of } B\\ \textrm{When } x=3m, x \textrm{ is a member of } B\\ \textrm{When } x=2n, x \textrm{ is not a member of } B\\ \textrm{In order to satisfy } x \in A \cap B \textrm{ it must be divisible by 3}\\ \textrm{whilst also being a member of } A\\ \\ \therefore n = 3k \textrm{ for some } k \in \mathbb{N}\\ \textrm{And, } x = 2(3k) = 6k \textrm{ for some } k \in \mathbb{N} \textrm{, hence } x \in C \]

Compliments

Formally…

\[ A \backslash B = \{x|x \in A \textrm{ and } x \notin B\}\\ \\ \{1, 2\} \backslash \{2, 3\} = \{1\}\\ \{a, b, c\} \backslash \{a, c\} = \{b\}\\ \{a, b, c\} \backslash \{\{a, b\}, c\} = \{a, b\} \]

Complements, Mathematically

\[ A = \{x|x = 2n \textrm{ for some } n \in \mathbb{N}\}\\ B = \{x|x = 2n + 1 \textrm{ for some } n \in \mathbb{N}\} \]

Show that $\mathbb{N} \backslash A = B$

\[ \textrm{Let } x \in \mathbb{N}\\ \textrm{If } x \textrm{ is even then } x = 2n \textrm{ for some } n \in \mathbb{N} \textrm{ and } x \in A\\ \textrm{If } x \textrm{ is odd then } x = 2n + 1\textrm{ for some } n \in \mathbb{N} \textrm{ and } x \in B\\ \\ \textrm{Given that all elements of } A \textrm{ will be excluded, }\\ \textrm{only odd numbers will remain,}\\ \textrm{which are all elements of the set } B\\ \therefore \mathbb{N} \backslash A = B \]

Partitions

A partition of a set $S$ is a set of subsets
$A_1, A_2, A_3, …, A_n$ of $S$ such that:

  • $S = A_1 \cup A_2 \cup A_3 \cup … \cup A_n$
  • Note that the subsets are pairwise disjoint:
  • Where $i \neq j$ then $A_i \cap A_j = \emptyset$

Example

\[ S = \{1, 2, 3, 4, 5\}\\ \\ \textrm{A partition of S would be:}\\ \begin{aligned} \{&\\ &\{1, 2\},\\ &\{3\},\\ &\{4, 5\}\\ \} \end{aligned} \]

Note that the following are NOT partitions of $S$

  • $\{ \{1, 2\}, \{2, 3\}, \{4, 5\} \}$
  • $\{ \{1, 2\}, \{4, 5\} \}$

Example

Prove that $\{\{A \backslash B\}, \{A \cap B\}, \{B \backslash A\}\}$ is a partition of $A \cup B$

  • $A \backslash B$, $A \cap B$ and $B \backslash A$ are disjoint
  • Each of them is a subset of $A \cup B$
  • Every element in $A \cup B$ is in one of those three (only)
  • Therefore, $A \cup B$ is equal to the union of those three eleemnts, which are disjoint. QED