What is the correct definition of the absolute value of $x$, $|x|$? What is the correct definition of the absolute value of $x$, $|x|$?
Option A
$$
|x|=
\begin{cases}
-x&\text{if } x < 0\\
0& \text{if } x=0\\
x&\text{if } x>0
\end{cases}
$$
Option B
$$
|x|=
\begin{cases}
-x&\text{if } x \leq 0\\
x&\text{if } x>0
\end{cases}
$$
Option C
$$
|x|=
\begin{cases}
-x&\text{if } x < 0\\
x&\text{if } x\geq 0
\end{cases}
$$
 A: A function is both a rule and a domain on which that rule takes place.  If, for two functions, the rule and the domain are the same, then the two functions are the same.  Just to be clear, you gave several different rules, but they are all equivalent, i.e., they all agree for any $x$ you insert.  And all of them have the same domain.  So, they are all the same function.  Which definition is best only depends on what you are working on.
For example, when you want to find the $\lim\limits_{x \to 0^-} \frac{|x|}{x}$, then any of your definitions will do just fine, and all work better than say $|x| = \max\{x, -x\}$ or $\sqrt{x^2}$.
$$\lim_{x \to 0^-} \frac{|x|}{x} = \lim_{x \to 0^-} \frac{-x}{x} = \lim_{x \to 0^-} -1 = -1$$
But, in other situations, maybe you'd prefer $\sqrt{x^2}$ for some reason.
A: What about Option D? That is:
$$|x|=\begin{cases}-x & x<0\\ x^2 & x=0,x=1\\ x & \text{otherwise}.\end{cases}$$
In all seriousness, there are infinitely-many (seemingly) distinct ways to define $|x|$ piecewise, but in the end, they are precisely the same. All you've got to do is pick one.
A: There are many equivalent ways describing $|x|$ as a function of $x$, what about: $\max\{x,-x\}$?
It is important to remember that the way to describe a set is not important, what important is the set itself.
I can tell you to take three rights; or I could just tell you to take one left. The input is the same and the output is the same, and that is what matters.
In the context of the real numbers there are several ways to describe the absolute value, and they are all the same.
A: Form C is the most elegant, because it breaks the problem into exactly the right cases: the subdomain of $x$ for which something has to be done to produce the absolute value, and a subdomain which is already identical to its absolute value. Only if $x$ is negative do we have to negate it, otherwise we leave it as is.
Option B is simply silly. Why include 0 in the domain that requires negating?
Option A is verbose, but it has a certain symmetry. In any case, it is better than B because at least it regards 0 as special (which it generally is, even if not specifically in this situation), rather than clumping it with the negatives.
