If $X$ is a compact metric space and $f$ is a function from $X$ to $X$ such that $$d(f(x),f(y))<d(x,y)$$ for all distinct points $x$ and $y$ in $X$. How do I show that $f(x)=x$ for some $x\in X$?
If it were a question about real numbers, I would have defined $g(x)=f(x)-x$ and proceeded, but subtraction may not be defined for a general metric space.
I also tried to prove by contradiction, but didn't work.