Set theory
Set theory is the study of collections of objects, which in mathematics are called sets.
A set consists of elements, for example numbers, letters or other mathematical objects. The idea is simple, but it forms the basis for large parts of discrete mathematics, logic and computer science.
What is a set
A set is a collection of elements. We say that a set consists of its elements. If we have a set A with the elements 1, 2 and 3, we can write:
$$ \large A = \{1, 2, 3\} $$
Notation
If an element is in a set, it is written with the symbol \( \large \in\). If the element is not included, the symbol \( \large \notin\) is used.
- \(\large a \in A\) means that the element \( \large a\) is in the set \( \large A\).
- \(\large a \notin A\) means that the element \( \large a\) is not in the set \( \large A\).
Logical symbols
In set theory, logical symbols are also often used to write definitions more precisely:
- \( \large \forall \) means "for all".
- \( \large \exists \) means "there exists".
- \( \large \wedge \) means "and".
- \( \large \vee \) means "or".
- \( \large \Rightarrow \) means "if … then".
- \( \large \Leftrightarrow \) means "if and only if".
More notations
Some notations are often used in connection with functions and number sets:
- \( \large \lfloor x \rfloor \): floor function, the largest integer less than or equal to \( \large x \).
- \( \large \lceil x \rceil \): ceiling function, the smallest integer greater than or equal to \( \large x \).
- Intervals:
- \( \large [a,b] \): inclusive of both \( \large a \) and \( \large b \).
- \( \large [a,b[ \): inclusive of \( \large a \), but exclusive of \( \large b \).
- \( \large ]a,b] \): exclusive of \( \large a \), but inclusive of \( \large b \).
The empty set
A set can also be empty. The empty set contains no elements and is written as:
$$ \large \emptyset \quad \text{or} \quad \{\} $$
Example: The set of whole cookies in an empty cookie jar is an empty set.
Equal sets
Two sets are equal if they contain exactly the same elements. The order does not matter, and repetitions do not count.
Example:
$$ \large A = \{1, 2, 3, 4, 5\}, \quad B = \{5, 4, 3, 2, 1\} $$
Here \( \large A = B \), since both sets contain the same elements.
Cardinality
The cardinality of a set means the number of distinct elements in the set. It is written as \( \large |A|\).
Examples:
- If \( \large A = \{1, 2, 3, 4, 5\}\), then \(|A| = 5\).
- If \( \large B = \{1, 2, 3, 4, 5, 5, 4, 3\}\), then \(|B| = 5\), because repetitions are not counted.
The important number sets
In mathematics, numbers are divided into several important sets:
- \( \large \mathbb{N} = \{1, 2, 3, 4, \ldots\} \), the set of natural numbers.
- \( \large \mathbb{Z} = \{\ldots, -2, -1, 0, 1, 2, \ldots\} \), the set of integers.
- \( \large \mathbb{Q} = \left\{\frac{p}{q} \,\middle|\, p \in \mathbb{Z}, q \in \mathbb{Z}, q \neq 0\right\} \), the set of rational numbers.
- \( \large \mathbb{R} \), the set of real numbers.
- \( \large \mathbb{C} \), the set of complex numbers.
Note: There are different conventions regarding whether 0 is included in the natural numbers.