If f maps X to X continuously and the range of f is A (subset of X) then is this sufficient to show that there exist a continuous retraction from X to A?

If so, how can this be proven?

If not, any counterexamples?

Notes: This is the topological continuity I am speaking of. Also a I am using retraction to mean a map from X to a subspace A such that f(a)=a for all a in A.