Absolute Value
The absolute value of a real number \(x\) is denoted by \(|x|\) and is defined as follows:
\[|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases} \]In other words, if the number is positive, the absolute value is the number itself, and if the number is negative, the absolute value is the number with the sign flipped i.e. the positive version of the number.

Example \[\begin{align*}
|3| &= 3 \\
|-3| &= 3 \\
|0| &= 0 \\
|-\frac{1}{2}| &= \frac{1}{2} \\
|5 - 7| &= 2 \\
|-3.14| &= 3.14
\end{align*}
\]
Some key properties of absolute values include:
- Non-negativity: \(|x| \geq 0\) for all real numbers \(x\).
- Identity: \(|x| = 0\) if and only if \(x = 0\).
- Triangle Inequality: \(|x + y| \leq |x| + |y|\) for all real numbers \(x\) and \(y\).
- Reverse Triangle Inequality: \(|x + y| \geq ||x| - |y||\) for all real numbers \(x\) and \(y\).
- \(x \leq |x|\) for all real numbers \(x\).
Todo
Show the proofs for the triangle inequality and reverse triangle inequality. The other ones are rather obvious. Isn’t there also some kind of geometric interpretation of the triangle inequality with regards to the distance between points. This has some interesting implications for algorithms and vectors.
Last updated on