Function composition and commutation exercise

44 Views Asked by At

I am learning from a self-paced math course and has this exercise on function composition that I couldn't wrap my head around, can you please help me solve it. I proved that $f^2 \circ f = f \circ f^2$ but I don't know how to answer the why part or the second part of the question so any help to solve it and understand the logic behind it is appreciated.

Suppose $f:R \rightarrow R$ is a function from the set of real numbers to the same set with $f(x)=x+1$. We write $f^{2}$ to represent $f \circ f$ and $f^{n+1}=f^n \circ f$. Is it true that $f^2 \circ f = f \circ f^2$? Why? Is the set ${g:R \rightarrow R l g \circ f=f \circ g}$ infinite? Why?