A set is a collection of elements. These elements can be both numbers, letters, functions, or anything else you would like to group together. An important type of sets are called intervals, and they are often used to describe solutions to exercises. When you want to explain that an element belongs in a given set you use the symbol $\in $. If an element doesn’t belong in a given set you use the symbol $\notin $. There are three types of intervals:
Theory
Open interval:
$\phantom{\rule{-0.17em}{0ex}}\left(a,b\right)$ is the set of all numbers between $a$ and $b$. That is, $x\in \phantom{\rule{-0.17em}{0ex}}\left(a,b\right)$ means that $a<x<b$.
Half-open interval:
$\phantom{\rule{-0.17em}{0ex}}\left(a,b\right]$ or $\phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$ is the set of all numbers greater than $a$ and less than or equal to $b$ or the set of all numbers greater than or equal to $a$ and less than $b$. That means that $x\in \phantom{\rule{-0.17em}{0ex}}\left(a,b\right]$ is the same as $a<x\le b$ ($x$ can be all numbers between $a$ and $b$, including $b$ but not including $a)$, and $x\in \phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$ is the same as $a\le x<b$ ($x$ can be all numbers between $a$ and $b$, including $a$ but not including $b)$.
Closed interval:
$\phantom{\rule{-0.17em}{0ex}}\left[a,b\right]$ is the set of all numbers between $a$ and $b$ including both $a$ and $b$. That is, $x\in \phantom{\rule{-0.17em}{0ex}}\left[a,b\right]$ is the same as $a\le x\le b$.
If you need to add together several intervals to make one set (for example the solution space), you can use the symbol $\cup $, called the union, for example: $x\in \phantom{\rule{-0.17em}{0ex}}\left(2,3\right]\cup \phantom{\rule{-0.17em}{0ex}}\left[5,10\right)$. If you want to remove from one interval everything inside another interval, you can use the symbol $\setminus $ like this: $\mathbb{R}\setminus \{3\}$. If you have infinite intervals, you can show that by using the infinity symbol: $x\in \phantom{\rule{-0.17em}{0ex}}\left[a,\infty \right)$ ($x$ is greater than or equal to $a$) and $x\in \phantom{\rule{-0.17em}{0ex}}\left(-\infty ,b\right)$ ($x$ is less than $b$). The side of the interval that goes toward infinity is always an open interval.
Example 1
$x\in \phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$: $x$ is an element in $\phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$
$x\notin \phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$: $x$ is not an element in $\phantom{\rule{-0.17em}{0ex}}\left[a,b\right)$