Why is the absolute value function or modulus function $|x|$ used ? What are its uses?
For example the square of a modulus number will always be positive, but why is it used when for example the square of any number whether positive or negative is always positive ? For example, $X^2$, will give a positive number whether negative or positive where $X$ is any number positive or negative.
In the context of real numbers the absolute value of a number is used in many ways but perhaps very elementarily it is used to write numbers in a canonical form. Every real number $a\ne 0$ is uniquely equal to $\pm \left |a\right|$. So if we define the sign function $s\colon \mathbb R\setminus\{0\}\to \{+,-\}$ given by $s(a)=+$ if $a>0$ and $s(a)=-$ if $a<0$, then: for all $a\ne 0$ in $\mathbb R$ we have $a=sign(a)\cdot \left | a \right |$. In a sense this is a way to build all the reals from the positive ones. This is all just a special case of the polar representation of complex numbers, a representation of utmost importance.