If $f \circ g = f$, prove that $f$ is a constant function. 
Suppose $A$ is a nonempty set and $f: A \rightarrow A$ and for all $g:A \rightarrow A,$ $f \circ g = f$. Prove that $f$ is a constant function.

This result seems obvious, but I can't seem to find a way to prove it. The book I got this problem from hinted that the reader should consider what would happen if $g$ were a constant function. I considered that case and it was easy to prove that $f$ was a constant function, but I can't find any way to prove it when $g$ is not a constant function. At this point I'm not really sure how to approach this problem anymore. Thanks in advance for any help! 

If $A$ is a one-element set, there is nothing to prove. If there are two distinct objects $a$ and $a'$ such that $f(a)\ne f(a')$, let $g$ be any function such that $g(a)=g(a')$.  
