## Constant mapping

Let $$f: X\to X$$ be a constant mapping. For which mappings $$g: X\to X$$ is it true that $$f \circ g = g\circ f$$?
If $$c$$ is a value such that $$f(x)=c$$ for all $$x\in X$$, then $$(f\circ g)(x)=f(g(x))=c$$ for all $$x\in X$$.
Conversely $$(g\circ f)(x)=g(f(x))=g(c)$$. If both sides are to be equal, it must be that $$g(c)=c$$. The mapping of other values of $$X$$ does not matter.
The mapping $$g$$ must fulfill $$g(c)=c$$, where $$c=Rg(f)$$.