My book says that if functions $f$ and $g$ are both onto then $f\circ g$ and $g\circ f$ may or may not be onto.
Why is this so? Would someone please help me understand this, maybe with an example or diagrammatically? My book states that$ f\circ g$ and $g\circ f$ may or may not be onto. I think this might be related to the domains and codomains of g and f which may not be equal. I am aware that there is a similar looking question and therefore I'm clarifying mine. With respect to the domains and codomains would someone please explain why the composite functions may or may not be onto?