Table of Contents
In the parent chapter “Sets and elements,” you met the basic idea of a set and its elements. Here we focus on the symbols and ways we write sets clearly and efficiently. This is called set notation.
We will organize this into three main themes:
- How to write sets and membership
- Ways to describe sets (listing vs. describing rule)
- Common special sets and basic operations notation
Basic set symbols
A set is usually named with a capital letter such as $A$, $B$, or $S$.
- Curly braces define a set:
- $A = \{1, 2, 3\}$ means “$A$ is the set containing $1$, $2$, and $3$.”
- The symbol $\in$ means “is an element of”:
- $2 \in A$ means “$2$ is an element of $A$.”
- The symbol $\notin$ means “is not an element of”:
- $4 \notin A$ means “$4$ is not an element of $A$.”
We often use lowercase letters like $a, b, x$ for elements, and uppercase like $A, B, X$ for sets.
Example:
- $B = \{\text{red}, \text{blue}, \text{green}\}$
- $\text{red} \in B$
- \text{yellow} $\notin B$
Two main ways to describe a set
There are two very common notations to describe what elements are in a set:
- Roster (listing) notation
- Set-builder (rule) notation
Both describe the same idea, but in different styles.
Roster (listing) notation
In roster notation, you list all the elements inside curly braces, separated by commas.
Examples:
- $C = \{1, 2, 3, 4\}$
- $D = \{\text{apple}, \text{banana}, \text{cherry}\}$
If the pattern is clear and the set goes on, we often use an ellipsis “$\dots$”:
- The set of the first five positive integers:
$$\{1, 2, 3, 4, 5\}$$ - The set of all positive even numbers:
$$\{2, 4, 6, 8, 10, \dots\}$$
Here, “$\dots$” means the pattern continues in the obvious way.
Important points:
- The order in a set does not matter:
- $\{1, 2, 3\}$ and $\{3, 2, 1\}$ are the same set.
- Repetition does not change the set:
- $\{1, 1, 2\}$ is the same set as $\{1, 2\}$.
Set-builder (rule) notation
In set-builder notation, instead of listing all elements, you describe them by a property or rule they satisfy.
The basic pattern looks like:
$$
\{\, x \mid \text{condition about } x \,\}
$$
You read the vertical bar “$\mid$” as “such that.”
Examples:
- The set of integers greater than $5$:
$$\{x \mid x \text{ is an integer and } x > 5\}$$ - The set of even integers:
$$\{n \mid n \text{ is an integer and } n \text{ is even}\}$$ - You can also write where elements come from:
$$\{x \in \mathbb{R} \mid x > 0\}$$
Read: “The set of all real numbers $x$ such that $x > 0$.”
Here “$\in \mathbb{R}$” tells us the universe (or domain) we are talking about: real numbers.
Special sets and their symbols
Some sets appear so often that we give them standard symbols.
Typical number sets:
- $\mathbb{N}$: the natural numbers
Different texts use either: - $\mathbb{N} = \{1, 2, 3, 4, \dots\}$ (starting at $1$), or
- $\mathbb{N} = \{0, 1, 2, 3, 4, \dots\}$ (including $0$).
You should always check which convention is being used. - $\mathbb{Z}$: the integers:
$$\mathbb{Z} = \{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}$$ - $\mathbb{Q}$: the rational numbers (numbers that can be written as a fraction of integers, with non-zero denominator).
- $\mathbb{R}$: the real numbers (all points on the number line).
- $\mathbb{C}$: the complex numbers.
Other common notations:
- The empty set (the set with no elements):
- $\emptyset$ or $\{\}$
Examples:
- The set of real numbers greater than or equal to $2$:
$$\{x \in \mathbb{R} \mid x \ge 2\}$$ - The set of integers between $-3$ and $3$:
$$\{n \in \mathbb{Z} \mid -3 \le n \le 3\}
= \{-3, -2, -1, 0, 1, 2, 3\}$$
Subset notation
Sometimes we want to express that every element of one set is also in another set. This is written with the subset symbols.
Let $A$ and $B$ be sets.
- $A \subseteq B$ means:
“$A$ is a subset of $B$” — every element of $A$ is also in $B$.
It allows the possibility that $A = B$. - $A \subset B$ is often used to mean:
“$A$ is a proper subset of $B$” — every element of $A$ is in $B$, but $A \ne B$.
(Some authors use $\subset$ to mean “subset or equal.” Always check context.) - $A \nsubseteq B$ means:
“$A$ is not a subset of $B$” — there is at least one element of $A$ that is not in $B$.
Examples:
- Let $A = \{1,2\}$, $B = \{1,2,3\}$.
- $A \subseteq B$ is true.
- $A \subset B$ is true (since $A \ne B$).
- $B \subseteq B$ is true.
- $B \subset B$ is false (a set is not a proper subset of itself).
- Let $C = \{2, 4, 6\}$, and let $D$ be the set of all even integers.
- $C \subseteq D$.
- The empty set is a subset of every set:
- $\emptyset \subseteq A$ for any set $A$.
Notation for basic set operations
The detailed meaning of operations like union and intersection belongs to a later chapter. Here we only introduce the symbols and how they are written.
Let $A$ and $B$ be sets.
- Union (elements in $A$ or $B$ or both):
- Symbol: $\cup$
- Written: $A \cup B$
- Intersection (elements in both $A$ and $B$):
- Symbol: $\cap$
- Written: $A \cap B$
- Set difference (elements in $A$ but not in $B$):
- Symbol: backslash or minus-like: $A \setminus B$ (or sometimes $A - B$)
- Written: $A \setminus B$
- Complement (elements not in a set, relative to some universe $U$):
- Symbol: a superscript $c$ or a bar.
- If $U$ is the universe set and $A \subseteq U$, then:
- $A^c$ or $\overline{A}$ means “everything in $U$ that is not in $A$.”
Examples of notation (without going into full explanation):
- $A \cup B = \{x \mid x \in A \text{ or } x \in B\}$
- $A \cap B = \{x \mid x \in A \text{ and } x \in B\}$
- $A \setminus B = \{x \mid x \in A \text{ and } x \notin B\}$
Using “such that” and conditions carefully
Set-builder notation can include more complicated conditions, combined with logical words like “and” and “or.” Logical operators are studied in another chapter, but here is how they look in set notation:
- “and” is often written as $\land$
- “or” is often written as $\lor$
Example with symbols:
- The set of integers that are positive and even:
$$\{n \in \mathbb{Z} \mid n > 0 \land n \text{ is even}\}$$ - The set of real numbers that are less than $-1$ or greater than $1$:
$$\{x \in \mathbb{R} \mid x < -1 \lor x > 1\}$$
Often, in beginner contexts, we simply write the words “and” and “or” instead of the logical symbols, but it is useful to recognize both styles.
Common pitfalls in reading and writing set notation
A few frequent mistakes to watch out for:
- Confusing $\in$ and $\subseteq$:
- $3 \in \{1,2,3\}$ is correct.
- $\{3\} \subseteq \{1,2,3\}$ is correct.
- But $3 \subseteq \{1,2,3\}$ is not correct, because $3$ is an element, not a set.
- Forgetting the universe (domain) in set-builder notation:
- $\{x \mid x > 0\}$ can be ambiguous (are $x$ integers? real numbers?).
- Better: $\{x \in \mathbb{Z} \mid x > 0\}$ or $\{x \in \mathbb{R} \mid x > 0\}$.
- Misusing the ellipsis “$\dots$” in roster notation:
- Use it only when the pattern is clear:
- $\{1, 3, 5, 7, \dots\}$ is okay as “odd positive integers,” if the context makes that clear.
- $\{1, 4, 9, \dots\}$ might be unclear unless you say “the set of perfect squares.”
Practice reading examples
Here are a few sets written in notation. The goal is simply to be able to read them in words.
- $$A = \{x \in \mathbb{R} \mid x \le 2\}$$
Read: “$A$ is the set of all real numbers $x$ such that $x$ is less than or equal to $.” - $$B = \{n \in \mathbb{Z} \mid -5 < n < 5\}$$
Read: “$B$ is the set of all integers $n$ such that $n$ is greater than $-5$ and less than $.” - $$C = \{2, 4, 6, 8, 10\}$$
Read: “$C$ is the set whose elements are $, $, $, $, and $.” - $$D = \{x \in \mathbb{R} \mid x^2 = 1\}$$
Read: “$D$ is the set of all real numbers $x$ such that $x$ squared equals $.”
(You may later learn that this means $D = \{-1, 1\}$.)
Being comfortable with reading and writing this kind of notation will make later topics about sets, logic, functions, and beyond much easier to follow.