Canonical: https://knowlpedia.com/real-analysis/absolute-value/

# Absolute value

The standard absolute value function on the real numbers.

The **absolute value** on \(\mathbb R\) is the function \(|\cdot|:\mathbb R\to[0,\infty)\) defined by
\[
|x|=\begin{cases}
x,& x\ge 0,\\
-x,& x<0.
\end{cases}
\]

## Examples

- \(|-3|=|3|=3\).
- The distance between \(2\) and \(5\) in \(\mathbb R\) is \(|2-5|=3\).

## Remarks

The formula \(d(x,y)=|x-y|\) defines the usual [metric](https://knowlpedia.com/topology/metric/) on \(\mathbb R\). Absolute value also appears in \(\varepsilon\)-\(\delta\) definitions such as the [limit at a point](https://knowlpedia.com/real-analysis/limit-at-a-point/).
