abstractmath.org 2.0
help with abstract math


Produced by Charles Wells     Revised 2017-02-24

Introduction to this website    website TOC    website index   blog

Back to head of Sets chapter



# SETS: NOTATION

This section describes customary usage for defining specific sets.

## Element notation

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$.

#### Examples

• 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.

#### Pronunciation

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$".

#### Remarks

• 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.

Acknowledgment: Atish Bagchi

## List notation

### Definition: list notation

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.

#### Example

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 \}$.

### Properties of list notation

#### List notation shows every element and nothing else

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\}$.

#### The order in which the elements are listed is irrelevant

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

#### Repetitions don't matter

• $\{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 elements are sets

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$.

### Sets are arbitrary

• 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.

#### Examples

• $\{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.

## Setbuilder notation

### Definition:

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$.

#### Examples

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 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.

### Usage and terminology

• "$|$" 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$".

### Setbuilder notation is tricky

#### Looking different doesn't mean they are different.

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.

### Variations on setbuilder notation

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

#### Giving the type of the variable

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

#### Example

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 expressions on the left side

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

#### Example

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\}$.

#### Example

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

##### Warning

Be careful when you read such expressions.

#### Example

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 not an integer ruled out by the defining condition!

### References

Set notation. Blog post.

Sets. Blog post.

### Acknowledgment

Toby Bartels for corrections.