Q:

Isometries of $\mathbb{R}^n$

Let $f:\mathbb{R}^n\rightarrow \mathbb{R}^n$ be such that $\left\| f(x)-f(y)\right\| =\left\| x-y\right\|$.  Is $f$ necessarily surjective? 
If this is so, you can prove (Mazur-Ulam Theorem) that $f$ is affine, and hence you could classify all isometries of $\mathbb{R}^n$.  However, at the moment, I can't think of any good ideas to prove that $f$ is surjective.   For that matter, is it even the case that $f$ must be surjective? 
Any ideas would be most welcomed. 
Thanks much! 

A:

Let's assume WLOG that $f(0) = 0$. For every $r$, it follows that $f$ defines an isometry from the sphere of radius $r$ to the sphere of radius $r$. 
Proposition: Any isometry $f : X \to X$ of a compact metric space is bijective. 
Proof.  $f$ is clearly injective.  Suppose $f$ is not bijective.  Then $f(X)$ is compact, so given $x \in X \setminus f(X)$ the distance $\text{dist}(x, f(X))$ is positive.  Pick $\epsilon < \text{dist}(x, f(X))$. Let $N$ be the smallest positive integer for which $X$ admits a cover by $N$ open sets of diameter less than $\epsilon$. No such set containing $x$ can intersect $f(X)$, but by pulling back along $f$ it follows that we can find a cover of $X$ by $N-1$ open sets of diameter less than $\epsilon$; contradiction. 
(In fact any isometry of a compact metric space is a homeomorphism, since a continuous bijection from a compact space to a Hausdorff space is necessarily closed.) 
Apparently there are counterexamples to the above when $X$ is not compact, but I don't know any nice ones off the top of my head.  

A:

First assume $f$ fixes the origin.  Show that $f$ preserves the inner product.  Then you can show that $f$ is linear.  Since you can translate a general isometry $f$ to obtain a new isometry that fixes the origin, $f$ must be surjective, and in fact given by $Ax+b$, where $A$ is an orthogonal matrix and $b$ is a vector.