I want a proof of a very elementary fact presented in all pre-calculus books:
Knowing that the distance between a point $P$ (of coordinate $p$) to the origin $O$ of the coordinate axis is $|p|$, I want to prove that $|y-x|$ is the distance between the points $X$ (of coordinate $x$) and $Y$ (of coordinate $y$) on the straight line.
The only way I could think of, was to divide it in six cases:
Both points to the right of the origin:
- The order of the points is $O,X,Y$, that is: $0>x>y$, then $|XY|=|y|-|x|=y-x$
- The order of the points is $O,Y,X$, that is: $0>y>x$, then $|XY|=|x|-|y|=x-y$
Both points to the left of the origin:
- The order of the points is $X,Y,O$, that is: $x<y<0$, then $|XY|=|x|-|y|=-x-(-y)=y-x$
- The order of the points is $Y,X,O$, that is: $y<x<0$, then $|XY|=|y|-|x|=-y-(-x)=x-y$
The origin is between the points:
- The order of the points is $X,O,Y$, that is: $x<0<y$, then $|XY|=|x|+|y|=y-x$
- The order of the points is $Y,O,X$, that is: $y<0<x$, then $|XY|=|y|+|x|=x-y$
So we see that when $y>x$, the formula is $y-x$ and it is $x-y$ when $x>y$, and so we can use the formula $d(X,Y)=|y-x|=|x-y|$ without paying attention to which one of the points is to the right or to the left of the other. Is it correct? Do I really need to divide in six cases and check they all give the same result to prove this formula? It really looks like too much for such a simple formula. There must be a simple way of showing this result...
So you want to get the distance between the points $x \in V$ and $y \in V$, where $V$ is some Euclidian Space. So the distance from the origin to the Point $x$ is simple the norm $||x||$ and notice that because for any $a \in V$ the translation mapping: \begin{align} T_y: V &\longrightarrow V\\ v &\mapsto v+y \end{align} is an isometry. You can see it by choosing any $v,w \in V$ and obtain: \begin{align} d(T_a(v),T_a(w)) = ||T_a(v)-T_a(w)|| = ||a+v-a-w|| = ||v-w|| = d(v,w) \end{align} Now your situation is exactly the case where you move the origin to the point $y\in V$ and apply the translation mapping for $a = y$ , $v = x-y$ and $w = 0$ so that: \begin{align} d(x,y) = d(T_y(x-y),T_y(0)) \overset{\text{$T_y$ isometry} }= d(x-y,0) = ||x-y|| \end{align} I hope this clarify your quastion.