This page is here to help review notation and terminology for those new to, or requiring a refresher, of sets and set theory.

# Set Notation¶

Recall that a set is a collection of distinct objects. In any given set each object in the set is called an element of the set.

For example, if $$S$$ represents a set, and $$a$$ is an element of set $$S$$, we denote this by writing

$a \in S.$

If $$a$$ is not an element of set $$S$$, we write it as

$a \not\in S.$

We can more explicitly write out what the specific elements of a set are by using braces: $$\{,\}$$. For example, if I wanted $$S$$ to be the set of integers between 2 and 6 inclusively, then I can write

$S = \{2,3,4,5,6\}.$

There is also the set with no elements at all in it, and it is called the empty set, and is denoted by $$\emptyset$$. Other ways of denoting are by using $$\varnothing$$, or even $$\{\}$$.

We also use colons to represent conditions on elements in a particular set. This lets us build up more complicated sets. For example, if I use $$\mathbb{Z}$$ to represent the set of all integers, then if I want $$T$$ to represent the set of all integers greater than five, I can write it as

$T = \{n \in \mathbb{Z} : n > 5\}.$

Colons in combination with braces and $$\in$$ is called set builder notation and lets us create very complicated sets. Let’s say I want to create the set of all irrational numbers, then I can do this by starting with the sets of real numbers, rational numbers, and using set builder notation:

Let $$\mathbb{R}$$ represent the set of real numbers, and $$\mathbb{Q}$$ the set of rational numbers, then if we use $$X$$ to represent the set of irrational numbers, we can write it as

$X = \{ r \in \mathbb{R} : r \not\in \mathbb{Q} \}.$

We can add even more conditions. Let us use $$Y$$ to represent the set of negative rational numbers, then we can write it as

$Y = \{ r \in\mathbb{R} : r\not\in\mathbb{Q}\ \&\ r<0 \},$

or alternatively by going back to $$X$$ and saying

$Y = \{ x \in X : x<0 \}.$

To help write conditions precisely without creating too much clutter, we will sometimes use symbols to represent logical quantifiers such as $$\exists$$ to say “there exists” or $$\forall$$ to represent “for all”. For example, if we wanted to say that a set $$S$$ was a subset of a set $$T$$, that is, any element of $$S$$ is also an element of $$T$$, we can write that as

$\forall x, x \in S \implies x \in T.$