#math/calculus
An interval records whether each endpoint is included.
| Inequality | Interval | Endpoints |
|---|---|---|
| $a<x<b$ | $(a,b)$ | neither included |
| $a\leq x\leq b$ | $[a,b]$ | both included |
| $a\leq x<b$ | $[a,b)$ | only $a$ included |
| $a<x\leq b$ | $(a,b]$ | only $b$ included |
An infinite endpoint always uses a parenthesis, as in $(-\infty,a]$ or $(b,\infty)$.
The **absolute value** $|x|$ is the distance from $x$ to $0$:
$
|x|=\begin{cases}x,&x\geq 0,\\-x,&x<0.\end{cases}
$
More generally, $|x-a|$ is the distance from $x$ to $a$. For $r>0$,
$
|x-a|<r\iff a-r<x<a+r,
\qquad
|x-a|>r\iff x<a-r\text{ or }x>a+r.
$
Useful identities include $|xy|=|x||y|$, $|x/y|=|x|/|y|$ for $y\neq 0$, and the triangle inequality $|x+y|\leq |x|+|y|$.