Absolute value

In mathematics, an absolute value (or often modulus) of a real number is defined as a piecewise-continuous function that outputs its positive value. To put it simply, it is often defined as $$| x | = \begin{cases}x, & x \geq 0 \\ -x, & x < 0\end{cases}.$$

Algebra
In abstract algebra, the "absolute value" (often called valuation) is an extended version of the absolute value function which measures the "size" of elements in a field or integral domain. It is a mapping $$| \cdot |$$ from a set $$k$$ to $$\mathbb R$$ such that the following properties hold:


 * (Non-negative) For all $$x \in k$$, $$| x | \geq 0$$ with $$| x | = 0 \iff x = 0$$.
 * (Multiplicative) For all $$x, y \in k$$, $$| xy | = | x | | y |$$.
 * (Triangle inequality) For all $$x, y \in k$$, $$| x + y | \leq | x | + | y |$$.

If the mapping also satisfies a stronger condition: $$| x + y | \leq \max\left(| x |, | y |\right)$$, then we say that $$| \cdot |$$ is non-Archimedean. Otherwise, we say that $$| \cdot |$$ is Archimedean. Equality holds if and only if $$| x | \neq | y |$$.