Prove there is no contraction mapping from compact metric space onto itself
Solution 1:
Suppose that $f: M \to M $ was onto. Then for every $x,y \in M$ $x \not=y$, there exists an $x',y' \in M$ s.t. $f(x')=x$ and $f(y')=y$. Then $$d(x,y)=d(f(x'),f(y'))\leq c d(x',y')<d(x',y').$$
Let $B=\max_{x,y \in M^2} d(x,y)$, this exists since $M$ is compact and $d:M^2 \to \mathbb{R}$ is continuous. But, by the above fact, for any $x,y \in M$ there exist an $x',y'$ s.t. $$d(x,y)<d(x',y'),$$ which contradicts the existence of a maximizer $B$.
Solution 2:
This probably works. Define a distance function $r:M\rightarrow M$ such that $$ r(x,y) = d(x,y). $$ Note that $r(\cdot)$ is a continuous function, whose proof can be seen here: Is the distance function in a metric space (uniformly) continuous?
Thus, since $r$ is continuous on compact $M$, it attains its supremum, say at $(x^\ast, y^\ast)$. Note that $f(x^\ast),f(y^\ast)\in M$, which means that $$ r(f(x^\ast),f(y^\ast)) = d(f(x^\ast),f(y^\ast)) \leq d(x^\ast, y^\ast) $$ by definition of $(x^\ast, y^\ast)$ resulting in a contradiction.
Solution 3:
HINT: Let $p$ be the fixed point guaranteed by the earlier question. Show that there is an $x\in X$ that maximizes $d(p,x)$. Then show that $x\notin f[X]$.