Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

For questions about or involving the absolute value function.

The absolute value function, usually denoted by $|x|$, is a function $\mathbb{R} \to [0, \infty)$ which can be defined in three equivalent ways:

  1. $|x| = \begin{cases}x &\ \text{if}\ x \geq 0,\\\ -x &\ \text{if}\ x <0\end{cases}$,

  2. $|x| = \sqrt{x^2}$, and

  3. $|x| = \max \{x, -x\}$.

This definition extends to complex numbers as the square root of the norm: $|x+iy|=\sqrt{x^2+y^2}$. In both cases, the function may be interpreted geometrically as the distance of the input number from the origin.

history | excerpt history