A set is a collection of distinct [[Events]].
- Finite set: $\{1,2,3\}$
- Infinite set: $\{x \in \mathbb R: x >5\}$ → All real numbers that are bigger than 5.
**Sets of Numbers:**
| Name | Notation | Description |
| ---------------- | ----------- | -------------------------------------------------------- |
| Natural numbers | $\mathbb N$ | All positive integers (excluding 0) |
| Whole numbers | $\mathbb Z$ | All integers |
| Rational numbers | $\mathbb Q$ | All integers, floats & fractions. |
| Real numbers | $\mathbb R$ | All rational & irrational numbers $(\sqrt 2, \pi \dots)$ |
**Set Operator Rules:**
| Rule | Formula |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| The complement of the complement is the regular event | $(S^C)^C=S$ |
| A union with $\Omega$ results in $\Omega$ | $S \cup \Omega = \Omega$ |
| The intersection of disjoint events is the empty set | $S \cap S^C = \emptyset$ |
| Order and braces do NOT matter, if there is always the same operator (e.g. only $\cap$). | $S \cap T = T \cap S
lt;br>$S \cup (T \cup V) = (S \cup T) \cup V$ |
| Order and braces do matter, if there is mixed operators (e.g. $\cap$ mixed with $\cup$). | $S \cap (T \cup V) = (S \cap T) \cup (S \cap V)lt;br>$S \cup (T \cap V) = (S \cup T) \cap (S \cup V)$ |
## De Morgan's Law
To perform De Morgan’s law, one needs to switch the operator $\cup \leftrightarrow \cap$ and put complements on each event separately.
$
(S \cap T)^C=S^C \cup T^C \\
(S \cup T)^C=S^C \cap T^C
$
**Derivation:**
$
\begin{align}
x \in (S \cap T)^C
&= x \not \in (S \cap T) \\[4pt]
&= (x \not \in S) \, \cup \, (x \not \in T) \\[4pt]
&= (x \in S^C) \cup (x \in T^C) \\[4pt]
&= x \in (S^C \cup T^C)
\end{align}
$
$
\begin{align}
x \in (S \cup T)^C
&= x \not \in (S \cup T) \\[4pt]
&= (x \not \in S) \, \cap \, (x \not \in T) \\[4pt]
&= (x \in S^C) \cap (x \in T^C) \\[4pt]
&=x \in (S^C \cap T^C)
\end{align}
$
![[de-morgans-law.png | alt="center" | 400]]
**Generalization:**
$
\begin{align}
\Big(\bigcap_n S_n\Big)^C &= \bigcup_n S_n^C\\
\Big(\bigcup_n S_n\Big)^C &= \bigcap_n S_n^C\\
\end{align}
$