# If $f \circ f$ is a contractive map, is $f$ a contractive map as well?

I've been working on a problem involving fractals and iterated function systems...

Consider a contractive map $$f \circ f : X \rightarrow X$$.

Is there an easy way to prove/disprove that $$f$$ is contractive?

I've have been trying to solve using the contrapositive... i.e if $$f$$ is not contractive, is there an easy way to prove $$f \circ f$$ is not contractive.

The answer to the title question is no. Let $$f:\Bbb{R}\to\Bbb{R}$$ be the characteristic function of the rationals (so $$f(x)=1$$ if $$x$$ rational and $$0$$ otherwise). Then, $$f$$ is not continuous (actually nowhere continuous), so it cannot be a contraction (contractions are even Lipschitz continuous). On the other hand, $$f\circ f = 1$$ is constant so it is a contraction.
No, it is not true, even supposing $$f$$ smooth: let $$f\colon\mathbb{R}^2\to\mathbb{R}^2$$ the linear map defined by the matrix $$M=\begin{pmatrix} & a \\ b & \end{pmatrix},$$ then $$f\circ f$$ is defined by $$M^2=\begin{pmatrix} ab & \\ & ab\end{pmatrix}.$$
If you chose $$|a|>1$$ and $$|b|<1/|a|$$, then $$f\circ f$$ is a contraction while $$f$$ is not (in fact is a dilation in one direction).