Continuity in a compact metric space. 
Let $(X,d)$ be a compact metric space and let $f, g: X \rightarrow \mathbb{R}$ be continuous such that $$f(x) \neq g(x), \forall x\in X.$$
  Show that there exists an $\epsilon$ such that $$|f(x) - g(x)| \geq \epsilon, \forall x \in X.$$

I'm assuming he means $\epsilon > 0$. Well, suppose to the contrary that for all $\epsilon > 0$, there exists an $x' \in X$ such that $|f(x') - g(x')| < \epsilon.$ Since $f(x')$ and $g(x')$ are fixed values, we must have $f(x') = g(x')$, a contradiction. 
Seems uh... too easy? I didn't even have to use continuity or compactness? So seems wrong? (I'm really sick, so terrible at math this week, but is this right?)
 A: The problem with your proof is that you cannot fix $x'$ and vary $\epsilon$. This is because $x'$ is conditioned on your given $\epsilon$.
As for a correct solution note that $|f(x) - g(x)|$ is a continuous function from $X$ to $\mathbb{R}$. What do you know about the minimum of a continuous function from a compact space to $\mathbb{R}$?
A: Your flaw is in assuming that the values $f(x')$ and $g(x')$ are fixed; they are not, since $x'$ depends on $\varepsilon$.
To prove the claim you just need to observe that $|f-g|$ is a continuous function (since it is the composition of continuous functions) which is positive, and that it is defined in a compact set, so it attains its minimum there, and... 
A: Denying we have: given $k > 0$ there exist's $x_k$ such that $|f(x_k) - g(x_k)| < \frac{1}{k}.$
Make $x = (x_k).$ Since $M$ is compact, we have that $x$ must have a convergent subsequence to some $y \in M$. Then passing to the subsequence we must have, using continuity of $f,$ and $g$, that $g(y) = f(y)$. What is a contradiction.
