Intersection Union and Complement Sets
Intersection of Sets
Definition: The intersection of two sets $A$ and $B$ denoted $A \cap B = \{ x : x \in A \: \mathrm{and} \: x \in B \}$ is the set containing elements $x$ where $x \in A$ and $x \in B$. The intersection of the $n$ sets $A_1$, $A_2$, …, $A_n$ denoted $\bigcap_{i=1}^{n} A_i = \{ x : x \in A_i \: \mathrm{for\:every\:i} \}$. |
Consider the set $A = \{ a, b, c, d, e \}$ and $B = \{ b, e, f, g, h, i \}$ as illustrated above. The gray region represents the intersection of set $A$ and $B$. We say $A \cap B = \{ b, e \}$.
Now consider the sets $A_1$, $A_2$ and $A_3$ above. We say that $\bigcap_{i=1}^{3} A_i = A_1 \cap A_2 \cap A_3$, which is the set of elements $x$ such that $x \in A_1$, $x \in A_2$ and $x \in A_3$. We will now look at an important definition.
Disjoint Sets
Definition: Two sets $A$ and $B$ are said to be disjoint if $A \cap B = \emptyset$ where $\emptyset = \{ \}$ is defined to be the empty set, that is, a set which contains no elements and thus $A$ and $B$ are disjoint if they have no elements in common. |
The diagram above shows an example where two sets $A$ and $B$ are disjoint and hence their intersection $A \cap B$ is empty.
Union of Sets
Definition: The union of two sets $A$ and $B$ denoted $A \cup B = \{ x : x \in A \: \mathrm{or} \: x \in B \}$ is the set containing elements $x$ where $x \in A$ or $x \in B$ or $x \in A \cap B$. The union of the $n$ sets $A_1$, $A_2$, …, $A_n$ denoted $\bigcup_{i = 1}^{n} A_i = \{ x : x \in A_i \: \mathrm{for\:any\: i} \}$. |
We note that from our definition, the union of two sets is the set of elements $x$ where $x$ is in either the first set or the second set. We note that hence if $x$ is in both sets $x \in A \cap B$, then that is fine. The diagram above illustrates three sets. $A = \{ a, b, c, d \}$, $B = \{ d, e, f \}$ and $C = \{ g, h \}$. We note that $A \cup B = \{ a, b, c, d, e, f \}$ as each of those elements appears in either set $A$ or $B$. We note that $g, h, i \not \in A \cup B$ though since $g, h, i \not \in A$ and $g, h, i \not \in B$.
Complements of Sets
Definition: The complement of $A$ written $B \setminus A = \{ x \in B : x \not \in A \}$ is the set of elements $x$ that are not in the set $A$. Similarly, the complement of $B$ written $A \setminus B = \{ x \in A : x \not \in B \}$. |
Consider the sets $A = \{ a, b, c, d, e \}$ and $B = \{d, e, f, g \}$ from the diagram above. We note that $B \setminus A$ denotes the set of elements that are strictly not in $A$, and therefore, $B \setminus A = \{ f, g, h, i \}$.