# Interval notation

Mathematicians frequently want to talk about intervals of real numbers such as “all real numbers between $1$ and $2$”, without mentioning a variable. As an example, “The range of the function $f:x\mapsto \sin x$ is all real numbers between $-1$ and $1$”.

A compact notation often used for these intervals of real numbers is as follows:

• $(1,2)$ means all real numbers between $1$ and $2$, excluding the endpoints

• $[1,2]$ means all real numbers between $1$ and $2$, including the endpoints

We can also write these intervals using set notation as $\{x:1<x<2\}$ and $\{x:1\le x\le 2\}$ respectively.

If needed, we can also mix the two types of bracket, so $(1,2]$ means the interval $\{x:1<x\le 2\}$ and $[1,2)$ means $\{x:1\le x<2\}$.

The interval “all real numbers greater than $-5$” is written as $(-5,\infty)$, and “all real numbers less than or equal to $7$” is written as $(-\infty,7]$. This does not mean that $\infty$ is a number; it is just a convenient shorthand.

Although the notation $(1,2)$ is exactly the same as the notation for coordinates, the two are rarely confused because the context will make it clear which is meant.