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.