Let $(X,d)$ be a compact metric space. Let $f:X\to X$ be such that $d(f(x),f(y))Let $(X,d)$ be a compact metric space. Let $f:X\to X$ be such that $d(f(x),f(y))<d(x,y)$ for all $x,y\in X$ but $x\neq y$. Can $f$ be surjective?
I (believe) I've shown $f$ is always continuous and always has a fixed point. But, I cannot seem to pin down whether it can be onto. I don't know if there may be some exotic compact space that would allow so, but my intuition says the answer is 'no.'
Continuous: Simply choose $\delta=\epsilon$.
Fixed point: Proof by contradiction using $x\mapsto d(x,f(x))$.
Surjective: (?)
 A: Given a metric space $(X, d)$, define its diameter to be
$$
\text{sup} \{d(x, y) |x, y \in X\}. 
$$
If $X$ is compact, then its diameter is finite and there exist two points $x_0, y_0$ whose distance is equal to the diameter, because the function
$$
d: X \times X \to \mathbb{R}
$$
has compact, and hence bounded image.
The diameter of $f(X)$ is less than that of $X$, so they cannot be the same as each other. (Proof: say $d(f(x), f(y)) \geq \text{diameter}(X)$; then $d(x, y) > \text{diameter}(X)$ which is nonsense.)
A: By way of contradiction, suppose $f$ is surjective.
Then $\forall x,y \in X$, we have $x_0,y_0 \in X$ such that $f(x_0)=x$ and $f(y_0) = y$. Then
$$d(x,y) = d(f(x_0),f(y_0)) < d(x_0,y_0)$$
Define the constant $M$ by
$$M := \sup_{(x,y) \in X \times X} d(x,y)$$
This exists since, trivially, the set of distances is nonempty. However, since metrics are continuous function and $M$ is compact, $d$ attains its supremum, and thus we may claim
$$M = \max_{(x,y) \in X \times X} d(x,y)$$
Thus, there exist some $x^*,y^*$ such that $d(x^*,y^*) = M$. However, there always exists a pair $(x_0,y_0)$ for any $(x,y)$ such that $d(x,y) < d(x_0,y_0)$. A contradiction is reached, and $f$ cannot be surjective.

Perhaps an example would be enlightening.
An easy one would be to take $X = [0,1]$ with the usual Euclidean metric $d$, and the function $f(x) = x/2$. Clearly meets the contraction criteria, but, for instance, is there $x$ such that $f(x)=1$?
I say contraction criteria because one may define a mapping $f$ to be a contraction on a metric space if $d(f(x),f(y)) \le k \cdot d(x,y)$ for every $x,y$ and for $k \in (0,1)$. Your function meets this criteria. Notice how, intuitively, the function $f$ "shrinks" the space, and reduces the distances between points.
