The absolute value on R\mathbb R is the function ∣⋅∣:R→[0,∞)|\cdot|:\mathbb R\to[0,\infty) defined by

∣x∣={x,x≥0,−x,x<0.|x|=\begin{cases} x,& x\ge 0,\\ -x,& x<0. \end{cases}
Examples
  • ∣−3∣=∣3∣=3|-3|=|3|=3.
  • The distance between 22 and 55 in R\mathbb R is ∣2−5∣=3|2-5|=3.
Remarks

The formula d(x,y)=∣x−y∣d(x,y)=|x-y| defines the usual on R\mathbb R. Absolute value also appears in ε\varepsilon-δ\delta definitions such as the .