As the question title states, for a composition of functions $f(g(x))$ I was taught that the domain of $g$ has to be the same as the codomain of $f$. Why? Can't you say that the image of $f$ and the domain of g must be the same? Perhaps when I was taught it was simply poorly worded and should have been that the domain of $g$ must be a subset of the codomain of $f$? Surely only every point produced by the map $f$, ie $f$'s image, needs to be then mapped by $g$.

  • $\begingroup$ $gof(x)=g(f(x))$ thus we have to have $f(X)\subseteq$ domain$g$ $\endgroup$ – R.N Nov 26 '15 at 12:27
  • $\begingroup$ It is necessary that the image of $f$ is contained in the domain of $g$, and sufficient that the codomain of $f$ is equal to the domain of $g$. $\endgroup$ – Christian Blatter Nov 26 '15 at 13:00

When you have a composition of function written as $f(g(x))$ this is equivalent to

$x \rightarrow g(x) \rightarrow f(g(x))$

applying $g$ and then $f$ on the image of $g$. This operation makes sense only when the image of $g$ is contained in the domain of $f$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.