# Thread: [SOLVED] real analysis - absolute value

1. ## [SOLVED] real analysis - absolute value

If x, y, and are elements of R and x <=z, show that x <= y <= z if and only if |x - y| + |y - z| = |x - z|.

2. ## Re: [SOLVED] real analysis - absolute value

$\textbf{Proof.}$

$(\Rightarrow) \text{We have that } x \leq y \leq z \text{.}$

$\text{i) Supose } \left | x - y \right | + \left | y - z \right | < \left | x - z \right | \text{.}$

$\Rightarrow y - x + z - y < z - x$

$\Rightarrow z - x < z - x$

$\Rightarrow \text{Contradiction!}$

$\text{ii) Supose } \left | x - y \right | + \left | y - z \right | > \left | x - z \right | \text{.}$

$\Rightarrow y - x + z - y > z - x$

$\Rightarrow z - x > z - x$

$\Rightarrow \text{Contradiction!}$

$\text{Hence, } \left | x - y \right | + \left | y - z \right | = \left | x - z \right | \text{.}$

$(\Leftarrow) \text{We have that } \left | x - y \right | + \left | y - z \right | = \left | x - z \right | \text{.}$

$\text{i) Supose } y < x \leq z \text{.}$

$\Rightarrow x - y + z - y = z - x$

$\Rightarrow 2x = 2y$

$\Rightarrow x = y$

$\Rightarrow \text{Contradiction!}$

$\text{ii) Supose } x \leq z < y \text{.}$

$\Rightarrow y - x + y - z = z - x$

$\Rightarrow 2y = 2z$

$\Rightarrow y = z$

$\Rightarrow \text{Contradiction!}$

$\text{Hence, } x \leq y \leq z \text{.}$
$\text{Q.E.D.}$