Let $\phi: \mathcal{E}\to \mathcal{E}$ be a mapping defined on a Euclidean affine space. Assume that $\phi$ preserves the distances: $$d(\phi(A),\phi(B)) = d(A,B).$$ Prove that $\phi$ is affine, and hence is an isometry.
Usually when defining isometry, we require the mapping to be affine or bijective. But does being distance-preserving alone force the mapping to be affine?
The answer is yes - this ought to be proved in any linear algebra book.
After applying a translation, we can assume that $\phi$ has a fixed point $O$. Taking $O$ as the origin, we can identify $\phi$ with a mapping of the underlying vector space $E$, which fixes the origin and preserves distances.
Now we prove $\phi$ preserves scalar products. We have $$\phi(u) \cdot \phi(v) = \frac{1}{2}\left[|\phi(u)|^2 + |\phi(v)|^2 - |\phi(u) - \phi(v)|^2 \right] = \frac{1}{2} \left[|u|^2 + |v|^2 - |u - v|^2 \right] = u \cdot v.$$
Let $(e_i)$ be an orthonormal basis of $E$. Let $f_i = \phi(e_i)$. Since $\phi$ preserves scalar products, $(f_i)$ is also an orthonormal basis of $E$.
Now if $u$ is any vector, let its coordinates in the basis $(e_i)$ be $(x_i)$. Since $x_i = u \cdot e_i$ and $\phi$ preserves scalar products, it follows that the coordinates of $\phi(u)$ in the basis $(f_i)$ are also $(x_i)$. This proves that $\phi$ is linear.