compact metric spaces and infimum

I am currently revising metric spaces and have come across a question which I am unable to answer and have no idea how to begin with.

Let $(M,d)$ be a compact metric space. Suppose $T \colon M \to M$ is a map such that for any $x,y \in M$ with $x \neq y$, $d(Tx,Ty) < d(x,y)$.

1. By considering the function $e(x) = d(x,Tx)$, $x \in M$ prove that $\inf\{d(x,Tx) : x \in M\}$ is attained
2. Prove that $\inf\{d(x,Tx) : x \in M\} = 0$.

I tried using contraction mappings but I'm not entirely sure if this can be applied here. Any hints would be greatly appreciated.

So let’s do as the question suggests and consider the function $$e \colon M \to \mathbb{R}, \quad x \mapsto d(x,Tx).$$ Notice that $e$ is continuous (even Lipschitz-continuous) because \begin{align*} |e(x) - e(y)| &= |d(x,Tx) - d(y,Ty)| \\ &\leq |d(x,Tx) - d(y,Tx)| + |d(y,Tx) - d(y,Ty)| \\ &\leq d(x,y) + d(Tx,Ty) \leq d(x,y) + d(x,y) = 2d(x,y). \end{align*} Because $M$ is compact it follows that $e$ attains its minimum on $M$, i.e. there exists some $x \in M$ with $$d(x,T(x)) = e(x) = \min_{y \in M} e(y) = \min \{d(y,Ty) \mid y \in M\}.$$ That shows the first part. For the second part notice that if $x \neq Tx$ then $$d(Tx,T(Tx)) < d(x,Tx) = \min\{d(y,T(y)) \mid y \in M\},$$ a contradiction. So we must have $x = Tx$ and thus $$\min \{d(y,T(y)) \mid y \in M\} = d(x,Tx) = d(x,x) = 0.$$
• The map $T$ is clearly continuous (being Lipschitzian), so also $e$ is continuous as composition of continuous functions. – egreg Jan 3 '16 at 13:56
• @egreg: This is certainly more elegant, but then you need to talk about metrizing the product $M \times M$ or topological products. This is why I chose this more low-level approach. – Jendrik Stelzner Jan 3 '16 at 14:00
• Yes, of course; I added it as a comment only for pointing out a simpler argument might be available. On the other hand, considerations about continuity of $d$ as a map $M\times M\to\mathbb{R}$ are often handy, because they avoid long chains of inequalities. – egreg Jan 3 '16 at 14:10