Agenda
<aside>
📌 Reminders
- Term Test 1 October 12, 2024
- A1 is out, due September 29, 2024 (remember Silent Running Policy)
</aside>
What is a Set?
<aside>
💡
Set: a collection of distinct elements. Elements can be numbers, strings, or even other sets.
</aside>
Example
- The set of vowels:
{a, e, i, o, u}
- The natural numbers $\mathbb{N} = \{1, 2, 3, \ldots, \}$ (sets can be infinite!)
Basic Notation
- Element of a Set: If an object $x$ belongs to a set $x$, we write $x \in A$.
- Not an Element: If $x$ does not belong to $A$, we write $x \not \in A$.
- The empty set: A set with no element, typically denoted $\emptyset$
- Subsets: A set $A$ is a subset of another set $B$ (denoted $A \subseteq B$) iff every element in $A$ is also in $B$, i.e $\forall a \in A, a \in B$
Basic Set Operations
- Union ($\cup$): The union of two sets $A$ and $B$ is the set of all elements that are in $A$, $B$, or both.
- Notation: $A ∪ B$
- Example: If $A = \{1, 2, 3\}$ and $B = \{3, 4, 5\}$, then $A ∪ B = \{1, 2, 3, 4, 5\}$.
- Intersection ($\cap$): The intersection of $A$ and $B$ is the set of elements that are in both $A$ and $B$.
- Notation: $A ∩ B$
- Example: If $A = \{1, 2, 3\}$ and $B = \{3, 4, 5\}$, then $A ∩ B = \{3\}$.
- Difference ($\setminus$ or $-$): The difference of $A$ and $B$ (or $A \setminus B$ or $A - B$) is the set of elements in $A$ but not in $B$.
- Notation: $A \setminus B$ or $A-B$
- Example: If $A = \{1, 2, 3\}$ and $B = \{3, 4, 5\}$, then $A \setminus B = \{1, 2\}$.
- Complement ($A^c$ or $\overline{A}$): The complement of a set $A$ refers to all elements not in $A$, usually within a universal set $U$.
- Notation: $A^c$ or $\overline{A}$
- Example: If the universal set $U = \{1, 2, 3, 4, 5\}$ and $A = \{1, 2\}$, then $A^c = \{3, 4, 5\}$.
Practice


