# $f: \mathbb{R}^n \to \mathbb{R}^m$ preserving distances

Let $f: \mathbb{R}^n \to \mathbb{R}^m$ be a function, that preserves distances. Prove that there exist a linear transformation $T$, and a vector $\mathbf{j} \in \mathbb{R}^m$ such that $f(\mathbf{x}) = T\mathbf{x}+\mathbf{j}$ for every $\mathbf{x} \in \mathbb{R}^n$.

First I suppose that $f(\mathbf{0})=\mathbf{0}$, since I can translate, without losing the property of preserving distances. So I need to prove that $f$ is linear.

If I simply prove that $f(\mathbf{x}+\mathbf{y}) = f(\mathbf{x})+f(\mathbf{y})$ then it´s done, because obviously I can deduce that this implies $f(r\mathbf{x}) = rf(\mathbf{x})$ with $r$ rational. But since I know that $f$ preserves distances, then in particular $f$ is continuous, and it´s easy to prove that this implies that $f(c\mathbf{x}) = cf(\mathbf{x})$ for every real number $c$.

But I don´t know How can I prove that $f$ respects the sum.

-

Consider the parallelogram determined by $\mathbf{0}$, $\mathbf{x}$, $\mathbf{y}$, and $\mathbf{x}+\mathbf{y}$. Because $f$ respects distances, the points $f(\mathbf{0}) = \mathbf{0}$, $f(\mathbf{x})$, $f(\mathbf{y})$, and $f(\mathbf{x}+\mathbf{y})$ must also give a parallelogram (since the distance from $\mathbf{0}$ to $f(\mathbf{x})$ equals the distance from $f(\mathbf{y})$ to $f(\mathbf{x}+\mathbf{y})$, and the distance from $\mathbf{0}$ to $f(\mathbf{y})$ is equal to the distance from $f(\mathbf{x})$ to $f(\mathbf{x}+\mathbf{y})$).

Therefore, $f(\mathbf{x}+\mathbf{y})$ must be the fourth vertex of the parallelogram determined by $\mathbf{0}$, $f(\mathbf{x})$ and $f(\mathbf{y})$, namely $f(\mathbf{x})+f(\mathbf{y})$.

Added. You can verify that $f(\mathbf{x}+\mathbf{y})$ lies in the same plane as $\mathbf{0}$, $f(\mathbf{x})$, and $f(\mathbf{y})$ by using the fact below that $f$ respects midpoints: the diagonals of the original parallelogram bisect each other, hence the line joining $f(\mathbf{x})$ and $f(\mathbf{y})$ and the line joining $\mathbf{0}$ and $f(\mathbf{x}+\mathbf{y})$ bisect each other.

You can also prove homogeneity by showing that $f(\frac{1}{2}(\mathbf{x}+\mathbf{y})) = \frac{1}{2}f(\mathbf{x}) + \frac{1}{2}f(\mathbf{y})$, by considering the spheres of radius $\frac{1}{2}\lVert \mathbf{x}-\mathbf{y}\rVert$ around $\mathbf{x}$, $\mathbf{y}$, $f(\mathbf{x})$ and $f(\mathbf{y})$; that is, $f$ respects midpoints of line segments. From this it follows that $f(t\mathbf{x}+(1-t)\mathbf{y}) = tf(\mathbf{x}) + (1-t)f(\mathbf{y})$ for all dyadic rationals $t\in (0,1)$, hence by continuity for all $t\in [0,1]$. From there, it follows that $f(n\mathbf{x}) = nf(\mathbf{x})$ for all integers $n$, and then homogeneity follows.

-
Maybe I'm missing something, but just because $\|f(x)\| = \|x\|$, $\|f(y)\| = \|y\|$, $\|f(x + y)\| = \|x + y\|$, $\|f(x) - f(x + y)\| = \|y\|$ and $\|f(y) - f(x + y)\| = \|x\|$, it does not follow that $f(x + y), f(x)$ and $f(y)$ all lie in the plane spanned by $f(x)$ and $f(y)$ when the dimension of the space is $> 3$. –  William Mar 26 '12 at 5:21
@WNY: Hmmm... It doesn't? My geometric intuition isn't that good beyond 3 dimensions. On the other hand, $f$ certainly respects midpoints, so the segment from $\mathbf{0}$ to $f(\mathbf{x}+\mathbf{y})$ must intersect the segment from $f(\mathbf{x})$ to $f(\mathbf{y})$ (and the two must bisect each other). Does that suffice to guarantee they are all on the same plane? –  Arturo Magidin Mar 26 '12 at 5:29
Yes, all is fine assuming that $f$ maps line segments to line segments, which I think is really what drives $f$ to be linear to begin with. In other words, one should simply prove that $f$ maps line segments to line segments. This on the other hand follows as soon as one proves that $f$ is differentiable, and for any $x, v\in\mathbb{R}^n$, $\langle Df_x(v), Df_x(v)\rangle = \langle v, v\rangle$ (i.e. the differential preserves norms). –  William Mar 26 '12 at 5:37
@WNY: Well, that will follow by showing it respects midpoints, using the argument from the last paragraph, no? $f(t\mathbf{x}+(1-t)\mathbf{y}) = tf(\mathbf{x})+(1-t)f(\mathbf{y})$ for all dyadic rationals $t$ in $(0,1)$, hence (by continuity) for all $t\in [0,1]$, hence line segments are mapped to line segments. –  Arturo Magidin Mar 26 '12 at 5:39
In the more general setting of Reimannian geometry, we are basically saying that isometry as stated in this special case coincides with the notion of isometry of Riemannian geometry (that is, differential preserving inner products). In other words, the original problem really says to prove this: $f$ is an isometry if and only if it is an isometry in the Riemannian sense, with the Riemannian metric being the usual Euclidean metric here. One can actually prove that $f(x) = g(x) + v$, $v\in\mathbb{R}^n$ and $g:\mathbb{R}^n\rightarrow\mathbb{R}^n$ a rotation. –  William Mar 26 '12 at 5:40

One trick is to use the polarization identity. This allows us to prove linearity directly, without approximation arguments.

Preserving distances means that $$\|f(x)-f(y)\|=\|x-y\|$$ for all $x,y$. The assumption $f(0)=0$ allows us to also get $$\|f(x)\|=\|x\|$$ for all $x$.

Now, using the polarization identity, $$\langle f(x),f(y)\rangle=\frac{\|f(x)\|^2+\|f(y)\|^2-\|f(x)-f(y)\|^2}4 =\frac{\|x\|^2+\|y\|^2-\|x-y\|^2}4=\langle x,y\rangle.$$ Now we get, for any $x,y,z\in\mathbb{R}^n$, $\lambda\in\mathbb{R}$, $$\langle f(\lambda x+y),f(z)\rangle=\langle\lambda x+y,z\rangle=\lambda \langle x,z\rangle+\langle y,z\rangle=\langle\lambda f(x)+f(y),f(z)\rangle,$$ so $$\langle f(\lambda x+y)-\lambda f(x)-f(y),f(z)\rangle=0$$ for any $z$, in particular $z=x$, $z=y$, $z=x+y$. But then $$\|f(\lambda x+y)-\lambda f(x)-f(y)\|^2=\langle f(\lambda x+y)-\lambda f(x)-f(y),f(\lambda x+y)-\lambda f(x)-f(y)\rangle=0$$ after distributing on the second term of the inner product.

So $f(\lambda x+y)=\lambda f(x)+f(y)$ for all $x,y\in\mathbb{R}^n$, $\lambda\in\mathbb{R}$.

-
This proof works for any real inner-product spaces, doesn't it? –  Stephen Herschkorn Dec 13 '13 at 9:44
Yes, as long as the distance is the one coming from the norm induced by the inner product. –  Martin Argerami Dec 13 '13 at 13:13

I think the second property is easier to prove, and you can probably get the first one from here...

If $f(x)=a$ and $f(2x)=b$, then $||b||=2||a|| (*)$ and $||b-a||=||a|| \,.$

From here you can deduce that $b=2a$. Indeed

$$||a||^2= ||b-a||^2=||a||^2-2 a \cdot b + \|b\|^2 \,.$$

Thus $$\|b^2\|=2a \cdot b (**)$$

Then by $(*)$ and $(**)$

$$\|b-2a\|^2=\|b\|^2-4a \cdot b+4\|a\|^2=0$$

Now, you can prove by induction exactly the same way that $f(nx)=nf(x)$.

Also, $f(-x)=-f(x)$ follows the same way. $\|f(-x)\|=\|f(x)\|$ and $\|f(x)-f(-x)\|=2\|f(x)\|$.

From here you can deduce exactly as you mentioned that $f(cx)=cf(x)$.

-