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)$.

-
Spoiler found by Google (first hit on searching the title of the question): at.yorku.ca/cgi-bin/… –  lhf Apr 21 '11 at 17:39
In other words, you want to know why the image of the compact set $X$ under the continuous map $f$ is closed in the metric space $X$? –  Jonas Meyer Apr 21 '11 at 17:42
Aha, no need to post it. The proof is standard. –  Jonas Teuwen Apr 21 '11 at 17:44
@yrudoy: Have you seen any theorems involving compact spaces and continuous maps, or involving compact subsets of metric (or Hausdorff) spaces? –  Jonas Meyer Apr 21 '11 at 17:47
@yrudoy: A compact subset of a Hausdorff space is closed. i.e. the complement is open... –  Jonas Teuwen Apr 21 '11 at 17:51

$f(X)$ is compact. If $x_0\notin f(X)$, because $X$ is separated for all $x\in f(X)$ exists two disjoints open sets $U_x$ and $V_x$ such that $x_0\in U_x$ and $x\in V_x$. We can find $n\in\mathbb N$ and $x_1,\cdots,x_n\in f(X)$ such that $f(X)\subset \bigcup_{j=1}^nV_{x_j}$. Now put $U:=\bigcap_{j=1}^nU_{x_j}$.
@Henno: this is an answer to the question "I can't figure out why..." (i.e. just a proof that $f(X)$ is closed). –  wildildildlife Apr 21 '11 at 18:46
I red too fast the problem. I tought that Henno wanted a neighborhood of $x_0$ disjoint form a neighborhood of $f(X)$. –  Davide Giraudo Apr 21 '11 at 19:00