In casual parlance, we often distinguish collections from sets: My comic book collection consists of all the comic books I own, which may include duplicates. It is not an exhaustive collection of every comic book ever produced. However, if I happen to have a set of Groo comics, that means I have every title produced for that particular series.
In mathematics, the words “collection” and “set” are used in a similar way: A set is a collection of unique items that satisfy some condition.
If I were to take the temperature reading on my porch every day at noon for a year, I would have a collection of readings, but they wouldn’t be a set because there would be duplicates. If, in contrast, I were to pair every temperature with its date, those pairings would represent a set.
Sets can be small, such as “all the positive even single-digit numbers” (there are four of those), or very large or even infinite, such as “all prime numbers”. In sets, order doesn’t matter: If I’m listing “all the positive even single-digit numbers”, I could list them as 2, 4, 6, 8 or as 4, 8, 2, 6, or any other order I please.
However, when listing infinite sets, we tend to follow some sort of order so that the pattern is clear. For instance, “all prime numbers” would normally be listed as 2, 3, 5, 7, 11, 13, … with three dots to make it clear that the pattern keeps going without end.
To show sets explicitly, we use curly braces, and then list the individual members (called elements), separated by commas. “All the positive even single-digit numbers” might be shown as \[A=\{2, 4, 6, 8\}\]
Here, \(A\) is the name of the set. We can name sets anything we like, but the convention is to use capital letters.
The set of “all prime numbers” might be shown as \[P=\{2, 3, 5, 7, 11, 13, …\}\]
If we want to talk any arbitrary element of the set, we will use a lower case letter, typically the one that matches the name of the set. This is why we use capital letters to name the set itself. So this says that \(p\) is a prime number: \(p\in P\), given the set \(P\) shown above. This is read as “p is an element of set P”.
Some sets can be finite but very large. Other sets may be arbitrarily large, so we don’t know when they end, but they follow a pattern. In both of these cases, we can use the three dots followed by the final element: \[B = \{11, 13, 15, 17, …, 99\}\]\[C = \{1, 4, 9, 16, … , n^2\}\]
In these cases, \(B\) represents all the positive odd two-digit numbers and \(C\) represents all the perfect squares up to some unspecified value. The three dots can also be used at the beginning, such as with this listing of all integers: \[\mathbb{Z} = \{…, -3, -2, -1, 0, 1, 2, 3, …\}\]
The examples so far have involved lists of specific integers. However, we can also use a rule, often called set-builder notation. This also allows us to describe subsets that include irrational numbers. For instance, \[D = \{n\in\mathbb{R}: 0<n<1\}\] refers to all real numbers from 0 to 1 (but not including either).
The main sets of numbers are: \[\mathbb{N}^1 = \{1, 2, 3, …\}\] \[\mathbb{N}^0 = \{0, 1, 2, 3, …\}\] \[\mathbb{Z} = \{…, -3, -2, -1, 0, 1, 2, 3, …\}\] \[\mathbb{Q}: \left\{a\in\mathbb{Z}, b\in\mathbb{N}^1: \frac{a}{b}\right\}\] \[\mathbb{R}: \{n \text{ is real}\} \] \[\mathbb{C} = \{a, b\in\mathbb{R}: a + b\text{i}\} \]
The first set is commonly called counting numbers, whole numbers, or natural numbers. The second set is also commonly called natural numbers, so to be clear, a symbol is used to indicate whether 0 or 1 is the first value. The other sets, respectively, are integers, rational numbers, real numbers, and complex numbers. Notice that for these sets, a special character, called a blackboard bold letter, is used.
A set which consists entirely of some of the elements of another set is called a subset. For instance, \(A\) and \(P\) above are both subsets of \(\mathbb{N}^1\), while \(\mathbb{N}^1\subset\mathbb{N}^0\subset\mathbb{Z}\subset\mathbb{Q}\subset\mathbb{R}\subset\mathbb{C}\). The sideways U means “is a subset of”.
We can combine sets. When we do so, we remove any common elements. For instance, using \(A\) and \(P\) above, we can create a set of all elements of either (called the union), and a set of all elements in both (call the intersection). These are: \[A\cup P=\{2, 3, 4, 5, 6, 7, 8, 11, 13, …\}\] \[A\cap P=\{2\}\] Make note of the new symbols being used here.
We can also have a set which contains no elements at all. For instance, \(B\) and \(C\) above have nothing in common, so we can write \[B\cap C = \emptyset\]
The \(\emptyset\) symbol is called “the empty set” or “null”. Notice that it does not have braces around it. We can also write \(\{ \}\) with nothing inside of it, but this is not as common. That is, \(\{ \} = \emptyset\).
Another common term when discussing sets is the complement. Here’s an example.
All integers are either even or odd. So if \(E\) is the set of all even integers and \(O\) is the set of all odd integers, then: \[E\cup O=\mathbb{Z}\] \[E\cap O =\emptyset\]
In general, if \(M\) and \(N\) are subsets of \(P\), then \(M\) is the complement of \(N\) if \(M\cup N=P\) and \(M\cap N=\emptyset\). The complement is often indicated by a line over the set name. In these examples, \(\overline{E}=O\) and \(\overline{M}=N\).
This basic information is a start to set theory, and should provide a solid foundation to the field.