Suppose I have a function $f: \mathbb{R} \to X$, where $X$ is some non-compact metric space.
Is it possible that $f$ is injective yet has compact image? If the answer is yes, what characterizes those cases? What additional properties would make the answer negative?
My progress so far: If the image is compact, $f(n)$ has a convergent subsequence with limit in the image, i.e. $f(a_n) \to f(a)$ where $a_n \to \infty$. But I find it tricky to turn the limit into equality.
