# Transformations that preserve distance inequality

I'm just sharing something that caught my attention these days. This question reminded me in turn of an older question, and had me thinking about what kind of transformations preserve distance comparison in Euclidean space, meaning that

$$\lVert u_1-u_2\rVert > \lVert v_1 - v_2\rVert \implies \lVert Tu_1- Tu_2\rVert > \lVert Tv_1 - Tv_2\rVert$$

for all $$u_1,u_2,v_1,v_2$$.

If $$T$$ is continuous, then we can obtain that

$$\lVert u_1-u_2\rVert = \lVert v_1 - v_2\rVert \implies \lVert Tu_1- Tu_2\rVert = \lVert Tv_1 - Tv_2\rVert$$

for all $$u_1,u_2,v_1,v_2$$. To that end, pick some sequence $$a_n \to u_1$$ with $$\lVert a_n-u_2\rVert > \lVert v_1 - v_2\rVert$$ and some sequence $$b_n \to u_1$$ with $$\lVert b_n-u_2\rVert < \lVert v_1 - v_2\rVert$$. Taking limits, we find that both $$\lVert Tu_1- Tu_2\rVert \geqslant \lVert Tv_1 - Tv_2\rVert$$ and $$\lVert Tu_1- Tu_2\rVert \leqslant \lVert Tv_1 - Tv_2\rVert$$.

This answer then implies that $$T$$ is affine.

Write $$Tv = Av + c$$ for some linear transformation $$A$$ and constant vector $$c$$ (for all $$v$$). It follows that

$$\lVert u \rVert > \lVert v \rVert \implies \lVert Au \rVert > \lVert Av \rVert\tag{1}$$

$$\lVert u \rVert = \lVert v \rVert \implies \lVert Au \rVert = \lVert Av \rVert\tag{2}$$

for all $$u,v$$. We can characterize $$A$$ as follows: pick some $$u\neq 0$$ and consider

$$\tilde A = \frac{\lVert u \rVert}{\lVert Au\rVert}A.$$

This is well-defined: by $$(2)$$, if $$A$$ failed to be injective it would be identically $$0$$. But this would contradict $$(1)$$, so $$A$$ must be injective and $$\lVert Au\rVert > 0$$.

By construction, $$\lVert \tilde Au\rVert = \lVert u\rVert$$. Notice that $$\tilde A$$ still satisfies properties $$(1)$$ and $$(2)$$, and so $$\lVert \tilde Av\rVert = \lVert v\rVert$$ for all $$v$$ with $$\lVert v \rVert = \lVert u \rVert$$. Any $$w$$ can be written as a scalar multiple of some such $$v$$, and by linearity will be such that $$\lVert \tilde Aw\rVert = \lVert w\rVert$$.

It follows that $$\tilde A$$ preserves length, and is hence orthogonal, so $$A$$ is the composition of some orthogonal transformation and some scaling.

We conclude that whenever $$T$$ is continuous, we have

$$Tv = \lambda Qv +c$$

for some $$\lambda >0$$, $$Q$$ orthogonal and constant vector $$c$$.

Can we say something about $$T$$ if continuity is not presumed?

If such $$T$$ is continuous at one point $$u_0$$ then it is continuous everywhere. To see this, take $$u\in X$$, $$d\in X\setminus\{0\}$$, $$X$$ normed space.
Then the property of $$T$$ implies $$0\le \|T(u+d)-T(u)\| < \|T(u_0+2d)-T(u_0)\|.$$ Let $$\epsilon>0$$. Since $$T$$ is continuous at $$u_0$$, there is $$\delta>0$$ such that $$\|T(u_0+2d)-T(u_0)\|\le \epsilon$$ for $$d\in B_\delta(0)$$. And $$T$$ is continuous at $$u$$ for all $$u$$.