[Math] Prove $|x|=\max\{x,-x\}$

absolute valuealgebra-precalculus

first time poster here, so please excuse my noobiness

I'm going through some basic first year college math exercises, because i found out i still can't do some of the proofs, and I've encountered this

the absolute value of x is defined as

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

prove that $|x|=\max\{x,-x\}$

i honestly have no idea on what is required from me/how should i start

can someone please help me out with a hint, or just something what would get me on the right track? thx

Best Answer

Welp, when asked do...

$|x|$ is defined conditionally on whether $x \ge 0$ or not. So we prove it as such.

If $x \ge 0$ then $-x \le 0$ and $ x \ge -x$. So $\max(x,-x) = x = |x|$.

If $x < 0$ then $-x > 0$ and $-x > x$. So $\max(x,-x) = -x = |x|$. QED.

Alternatively we could do:

$\max(x,-x) = \begin{cases}x& \text{ if } x\geq -x \iff x \ge 0\\ -x& \text{ if } x < - x \iff x< 0 \end{cases} $ which is the exact same definition as $|x|$.

===

A third way is to note $x = \pm |x|$ (plus if $x \ge 0$; minus if $x < 0$) and $-x = \mp|x|$ (vice versa). $|x| \ge 0 \ge -|x|$ so $\max(x,-x) = \max(|x|, - |x|) = |x|$.

There's so many ways to do it. Basically the definitions are equivalent.

===

Basically both absolute value and max(x,-x) are both conditional identities of the form: $f(x) = x$ if $x$ is "nice". $f(x) = -x$ otherwise. For $|x|$, "nice" means $x \ge 0$. For $\max(x,-x)$, "nice" means $x \ge -x$. As $x \ge 0 \iff x \ge -x$ these are both the same thing.

Related Question