Produced by Charles Wells Revised 2017-02-24 Introduction to this website website TOC website index blog Back to head of Sets chapter

This section describes customary usage for defining specific sets.

The expression "$x\in A$" means that $x$ is an element of the set $A$.

The expression "$x\notin A$" means that $x$ is not an element of $A$.

- Let $P$ denote the set of all prime numbers. Then $17\in P$ but $42\notin P$.
- $42$ is an element of all the sets $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$. (See Some specific sets.)
- $-5\notin \mathbb{N}$ but it is an element of all the others just listed.

The assertion "$x\in A$" is pronounced in any of the following ways:

- "$x$ is
**in**$S$". - "$x$ is an
**element**of $S$". - "$x$ is a
**member**of $S$". -
"$S$
**contains**$x$". - "$x$
**is contained in**$S$".

**Warning:**The math English phrases "$A$ contains $B$" and "$B$ is contained in $A$" can mean either "$B\in A$" or "$B\subseteq A$". You can usually tell which one is meant for various reasons, for example if you know $B$ is not a set, or you are aware of the common (but not universal) convention that sets are written with upper case names. In my opinion, "contains" should*not ever be used with either meaning.*(If you absolutely*have*to invert the statement, you can write "$A$ contains $B$*as an element*.")- The Greek letter epsilon occurs in two forms in math, namely $\epsilon$ and $\varepsilon$. Neither of them is the symbol for "element of", which is "$\in$". Even so, it is not uncommon to see either "$\epsilon$" or "$\varepsilon$" being used to mean "element of".
- A common myth among students is that there are two kinds of mathematical objects: "sets" and "elements". But a set can be an element of another set (more about this below). "Element" is not a property that some math objects have and others don't.

A set with a small number of elements may be denoted by listing the elements inside braces (curly brackets). The list must include *exactly all of the elements of the set and nothing else.*

The set $\{1,\,3,\,\pi \}$ contains the numbers $1$, $3$ and $\pi $ as elements, and *no others.* So $3\in \{1,3,\pi \}$ but $-3\notin \{1,\,3,\,\pi \}$.

If $a$ occurs in a list notation, then $a$ is in the set the notation defines. If it does not occur, then it is *not* in the set.

When I say "$a$ occurs" I don't mean it necessarily occurs *using that name.* For example, $3\in\{2+5,2+4,1+2\}$ but $3\notin\{2+5,2+4,1+6\}$.

For example, $\{2,5,6\}$ and $\{5,2,6\}$ are the same set.

- $\{2,5,6\}$, $\{5,2,6\}$, $\{2,2,5,6 \}$ and $\{2,5,5,5,6,6\}$ are all different representations of the
*same set*. That set has exactly three elements, no matter how many numbers you see in the list notation. - The set $\{2+5,2+4,1+6\}$ mentioned above contains exactly
*two*elements.

Multisets may be written with braces and repeated entries, but then the repetitions mean something.

When (some of) the elements in list notation are themselves sets (more about that here), care is required. For example, the numbers $1$ and $2$ are not elements of the set \[S:=\left\{ \left\{ 1,\,2,\,3 \right\},\,\,\left\{ 3,\,4 \right\},\,3,\,4 \right\}\]The elements listed in $S$ include the set $\{1, 2, 3\}$ among others, but not the number $2$. The set $S$ contains four elements, two sets and two numbers.

Another way of saying this is that the element relation is not transitive: The facts that $A\in B$ and $B\in C$ do not imply that $A\in C$.

- Any mathematical object can be the element of a set.
- The elements of a set do not have to have anything in common.
- The elements of a set do not have to form a pattern.

- $\{1,3,5,6,7,9,11,13,15,17,19\}$ is a set. There is no point in asking, “Why did you put that $6$ in there?” (Sets can be arbitrary.)
- Let $f$ be the function on the reals for which $f(x)=x^3-2$. Then \[\left\{\pi^3,\mathbb{Q},f,42,\{1,2,7\}\right\}\] is a set. Sets do not have to be homogeneous in any sense.

Suppose $P$ is an assertion. Then the expression "$\left\{x\,|\,P(x) \right\}$" denotes the set of all objects $x$ for which $P(x)$ is true. It contains no other elements.

- The notation “$\left\{ x\,|\,P(x) \right\}$” is called
**setbuilder notation.** - The assertion $P$ is called the
**defining condition**for the set. - The set $\left\{ x\,|\,P(x) \right\}$ is called the
**truth set of the assertion $P$**.

In these examples, $n$ is an integer variable and $x$ is a real variable..

- The expression "$\{n\,|\, 1\lt n\lt 6 \}$" denotes the set $\{2, 3, 4, 5\}$.
- The
**defining condition**is "$1\lt n\lt 6$”. - The set $\{2, 3, 4, 5\}$ is the
**truth set**of the assertion “$n$ is an integer and $1\lt n\lt 6$”.

- The
- The notation $\left\{x\,|\,{{x}^{2}}-4=0 \right\}$ denotes the set $\{2,-2\}$.
- $\left\{ x\,|\,x+1=x \right\}$ denotes the empty set.
- $\left\{ x\,|\,x+0=x \right\}=\mathbb{R}$.
- $\left\{ x\,|\,x\gt6 \right\}$ is the infinite set of all real numbers bigger than $6$. For example, $6\notin \left\{ x\,|\,x\gt6 \right\}$ and $17\pi \in \left\{ x\,|\,x\gt6 \right\}$.
- The set $\mathbb{I}$ defined by $\mathbb{I}=\left\{ x\,|\,0\le x\le 1 \right\}$ has among its elements $0$, $1/4$, $\pi /4$, $1$, and an infinite number of
other numbers. $\mathbb{I}$ is fairly standard notation for this set – it is called the
**unit interval.**

- "$|$" is also used to mean "divides", but that is a completely independent meaning of the symbol.
- A colon may be used instead of "|". So $\{x\,|\,x\gt6\}$ could be written $\{x:x\gt6\}$.
- Logicians and some mathematicians called the truth set of $P$ the
**extension**of $P$. This is not connected with the usual English meaning of "extension" as an add-on. - When the assertion $P$ is an equation, the truth set of $P$ is usually called the
**solution set**of $P$. So $\{2,-2\}$ is the solution set of $x^2=4$. - The expression "$\{n\,|\,1\lt n\lt6\}$" is commonly pronounced as "The set of integers such that $1\lt n$ and $n\lt6$." This means
*exactly*the set $\{2,3,4,5\}$. Students whose native language does not have definite articles sometimes assume that a set such as $\{2,4,5\}$ fits the description. - The expression may be pronounced more succinctly "$n$ such that $1\lt n$ and $n\lt6$". Nevertheless, it means "All $n$ such that $1\lt n$ and $n\lt6$".

A set can be expressed in many different ways in setbuilder notation. For example, $\left\{ x\,|\,x\gt6 \right\}=\left\{ x\,|\,x\ge 6\text{ and }x\ne 6 \right\}$. Those two expressions denote exactly the same set. (But $\left\{x\,|\,x^2\gt36 \right\}$ is a *different* set!)

In certain areas of math research, setbuilder notation can go seriously wrong. See Russell’s Paradox if you are curious.

This glitch rarely causes problems in undergraduate math courses.

An expression may be used left of the vertical line in setbuilder notation, instead of a single variable.

You can use an expression on the left side of setbuilder notation to indicate the type of the variable.

The unit interval $I$ could be defined as \[\mathbb{I}=\left\{x\in \mathrm{R}\,|\,0\le x\le 1 \right\}\]making it clear that it is a set of real numbers rather than, say rational numbers. You can always get rid of the type expression to the left of the vertical line by complicating the defining condition, like this:\[\mathbb{I}=\left\{ x\,|\,x\in \mathrm{R}\text{ and }0\le x\le 1 \right\}\]

Other kinds of expressions occur before the vertical line in setbuilder notation as well.

The set\[\left\{ {{n}^{2}}\,|\,n\in \mathbb{Z} \right\}\]consists of all the squares of integers; in other words its elements are 0,1,4,9,16,…. This definition could be rewritten as $\left\{m\,|\,\text{ there is an }n\in \mathrm{}\text{ such that }m={{n}^{2}} \right\}$.

Let $A=\left\{1,3,6 \right\}$. Then $\left\{ n-2\,|\,n\in A\right\}=\left\{ -1,1,4 \right\}$.

Be careful when you read such expressions.

The integer $9$ * is* an element of the set \[\left\{{{n}^{2}}\,|\,n\in \text{ Z and }n\ne 3 \right\}\]It is true that $9={{3}^{2}}$ and that $3$ is excluded by the defining condition, but it is also true that $9={{(-3)}^{2}}$ and $-3$ is

Set notation. Blog post.

Sets. Blog post.

Toby Bartels for corrections.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.