# a question about contraction maps

Let $X$ be a metric space and let $f:X\to X$ be a contraction map. If $A$ is a proper subset of $X$, can $f(A)=X$? Intuitively, the answer should be no, but I can't see why. Is there something in Munkres or a basic text that answers questions like this about contraction maps?

-
So if X is compact is it true? –  dan Aug 27 '11 at 22:56
@Akhil: How does division by 2 on $\mathbb{R}$ help? –  Nate Eldredge Aug 27 '11 at 22:59
@Nate: I misunderstood the post when I posted my (hasty and now deleted) comment. Apologies to Dan. –  Akhil Mathew Aug 28 '11 at 0:40

The answer to your first question is yes, it can. Consider $X=\mathbb R$ and the function $f$ defined by $f(x)=\frac12x$ if $x\le1$ and $f(x)=\frac12|2-x|$ if $x\ge1$ (the graph of $f$ is a kind of SW-NE oriented zigzag with every slope equal to $\pm\frac12$). Then $f(A)=X$ with $A=X\setminus(0,2)$.
@dan: Yes. If $X$ is compact, it isn’t even the image of itself under a contraction. The metric is a continuous function on the compact space $X\times X$, so it attains its maximum value: there are points $p,q\in X$ such that $d(p,q)=\max\{d(x,y):x,y\in X\}$. If $f[A]=X$, pick $a,b\in A$ such that $f(a)=p$ and $f(b)=q$. Then $d(p,q) = d(f(a),f(b)) < d(a,b)\le d(p,q)$, which is impossible. You can also get this from the Banach fixed point theorem, since every compact metric space is complete. –  Brian M. Scott Aug 28 '11 at 4:48
Another simple counterexample: $f(x) = \max(0, \frac x 2 - 1)$ is a contraction on $X = [0, \infty)$ which maps $[2,\infty) \subsetneq X$ to $X$.