# Is this function necessarily a contraction?

If $(X, d)$ is a compact metric space satisfying $d(f(x), f(y)) < d(x, y)$ for all $x, y \in X$ such that $x \ne y$, is $f$ necessarily a contraction?

I know an analogue of the Banach Fixed Point Theorem applies in this case, and the proof is easier than that for $X$ merely complete. But is there a short proof that there is some $\alpha \lt 1$ such that $d(f(x), f(y)) < \alpha d(x, y)$ for all $x, y \in X$ such that $x \ne y$?

I imagine there is, because of the relationship between compactness and upper bounds, and $\alpha$ acts as an upper bound of sorts here. But I can't come up with the proof.

-

No. Let $X=[0,\frac12]$ with the usual metric and $f(x)=x-x^2$.

-

No.

Take $f(x) = \sin x$ on $X=[-\pi, \pi]$.

If $x\neq y$, then $|f(x) - f(y)| \leq \int_y^x |f'(t)| dt|x-y|$. However, $|f'(t)| < 1$ for almost all $t \in X$, hence $|f(x)-f(y)| < |x-y|$.

-

In this case, $f$ is not necessarily a contraction. Consider $f:[0,1]\to[0,1]$ given by $$f(x)=x-\frac{x^2}{2}.$$ For future reference, what you have is called a shrinking map whereas when we know that for some $0<\alpha<1$, $d(f(x),f(y))\leq\alpha d(x,y)$, then it is a contraction. One interesting fact about contraction maps over compact sets is that there is still a fixed point, which we lose if we don't force compactness, as shown by the function $f:\Bbb R\to\Bbb R$, $$f(x)=\frac{x+(x^2+1)^{1/2}}{2}.$$

-