Sets
Sets
A set is a collection of things.
The things are called elements of a set.
Colors = \{\text{Red}, \text{Blue}, \text{Green}\}
Numbers = \{1,2,3\}
Sets can be finite or infinite.
Some\ Even\ Integers = \{2,4,6\}
All\ Even\ Integers = \{..., -4, -2, 0, 2, 4, ...\}
The number of elements in a set is called the cardinality.
|Colors| = 3
Two sets are equal if they share exactly the same elements.
A = \{2,4,6\}, B = \{4,2,6\}, C = \{4,2,7\}
A = B A \neq C
To express that 2 is an element of A, we denote:
2 \in A \text{2 exists in A}
5 \notin A \text{5 does not exist in A}
Some sets are so significant that we reserve special symbols for them:
\emptyset = \{\} \quad \textbf{(empty set)}
\mathbb{N} = \{1, 2, 3, ... \} \quad \textbf{(natural numbers)}
\mathbb{Z} = \{..., -2, -1, 0, 1, 2, ... \} \quad \textbf{(integers)}
\mathbb{R} = \{..., -0.22,...,0,...,1,..., \pi, ... \} \quad \textbf{(real numbers)}
We visualize \mathbb{R} as an infinitely long number line.
Set-Builder Notation
A special notation called set-builder notation is used to describe sets that are too big or complex to list between braces.
All\ Even\ Integers_{1} = \{..., -4, -2, 0, 2, 4, ...\}
All\ Even\ Integers_{2} = \{2x: x \in \mathbb{Z} \}
\text{The set of all numbers of the form } 2x \text{ such that } x \in \mathbb{Z}
All\ Even\ Integers_{1} = All\ Even\ Integers_{2}