Suppose A is a non-empty set and f is a function on A. Suppose for all g(which is also a function on A), composition of functions f and g is f, then f is a constant function.
I try to prove it but the attempt turned out to be futile. First I have assumed g to be arbitrary and try to work on it, but it leads to nowhere. The hint says that what happens if g is a constant function. I think it is trying to tell me that we should define g to be a constant function. But isn't g should be arbitrary and we shall assume nothing about g? Below is the link for the same question, but I can't understand the solution: http://mathhelpforum.com/discrete-math/188033-problem-involving-composite-functions.html
Please explain, thanks in advance.
There exists at least one constant function $g$ defined on $A$. For every $a\ne b$ in $A$, $g(a)=g(b)$, hence $f\circ g=f$ implies that $f(a)=f(g(a))=f(g(b))=f(b)$. Thus, $f$ is constant.