From the answer of the question isometry $f:X\to X$ is onto if $X$ is compact , I found out that the answer is valid only if the range of the sequence $\{x_n:n \in\mathbb N\}$ is infinite.
Now I'd like to know if the range is finite. Then $x_{n+k}=x_n$ for some $k\in \mathbb N$, so the sequence is periodic. By intuition, I guess the isometry $f$ satisfies $f^k=id.$, but I have no idea to prove this. I only know that the isometry is injective. Does anyone have any hints?