isometry on compact space

I need to prove that an isometry $f$ on a compact metric space $X$ is necessarily bijective. I’ve got most of the proof, but I can’t figure out why any point in $X-f(X)$ would necessarily have to have some open neighborhood disjoint from $f(X)$.

Solutions Collecting From Web of "isometry on compact space"