..and here's the proof (compare with a contracting function in a complete metric space has one fixed point (proof)).

 

Uniqueness is trivial: if x and y are distinct fixed points, d(x,y) = d(f(x),f(y)) < d(x,y), a contradiction.

 

For existence, consider the function g(x) = d(x,f(x)). It is continuous (this is a straightforward check), so by compactness g has a lower bound c, which is attained by some x∈X. If c=0 we are done (it's worth mentioning that in ariel's definition, we require a and b to be different). Suppose it is striclty positive. Then g(f(x)) = d(f(x),f(f(x))) < d(x,f(x)) = g(x) = c, a contradiction. Thus c=0 and x is the unique fixed point of f.

 

As ariels insinuated, compactness is a necessary assumption here; completeness (as in the "strongly contracting" case) will not suffice. A simple example is the function f defined on the non-negative real numbers via f(x) = x + e-x.