Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Exercise: If $f:X\rightarrow Y$ and $g: Y\rightarrow Z$ are both onto functions, prove or disprove, $g\circ f:X\rightarrow Z$ defined by $(g\circ f)(x)=g(f(x))$ is an onto function.

Just a little confused on how to do this problem. I know what an Onto function is, and what a composition function is but I don't know how to approach this problem, please help? thanks

share|cite|improve this question
Start by writing out the definition of $g\circ f$ being onto. Make sure you know what you want to prove, precisely and explicitly. – Chris Culter Mar 3 '14 at 5:12

The standard play to verify "onto" when at the element level of functions is to pick something in the range and verify that something in the domain is mapped to it.

Since the only thing you can say about an onto function is that every element of the range is actually taken by the function for something (possibly more than one something) in the domain. Thus $ f: X \rightarrow Y$ surjective means $$\forall y \in Y, \exists x \in X \text{ such that } f(x) = y$$ Similarly $ g: Y \rightarrow Z$ surjective means $$\forall z \in Z, \exists y \in Y \text{ such that } g(y) = z$$

What you want to know is $$\forall z \in Z, \exists x \in X \text{ such that } g \circ f(x) = z$$ To check this, pick some $z \in Z$. Show there's some $y \in Y$ such that $g(y) = z$. Now show there's some $x \in X$ such that $f(x) = y$. Put those together and show $g(f(x)) = g(y) = z$. Then you've shown each thing in $Z$ has something in $X$ that is (eventually) mapped to it by $g \circ f$.

share|cite|improve this answer

Let $z\in Z$. Since $g$ is onto, there exists a $y\in Y$ such that $g(y)=z$. Since $f$ is onto, there exists an $x\in X$ such that $f(x)=y$. Can you finish the proof from here?

share|cite|improve this answer
Since g(x) and f(x) are onto functions, their compositions must be onto as well? lol How exactly can you finish this off? – Roy Kesserwani Mar 3 '14 at 5:17
The goal of the proof is to show that for every $z\in Z$ there exists an $x\in X$ such that $g(f(x))=z$. In order to do this we need to use the fact that $f$ and $g$ are onto functions. Finishing this proof is quite straightforward lol! – Brian Fitzpatrick Mar 3 '14 at 5:20

I know two equivalent definitions for an onto function:

First: $h: \text{dom}(h) \rightarrow \text{codom}(h)$ is onto if every element of $\text{codom}(h)$ be an image of some element of $\text{dom}(h)$ under h, i.e. $$\forall y\in \text{codom}(h) \exists x\in \text{dom}(h) \text{ such that } h(x) = y.$$ Second: $h: \text{dom}(h) \rightarrow \text{codom}(h)$ is onto if the range of $h$ be the codomain of $h$, i.e. $$h(\text{dom}(h))=\text{codom}(h).$$ Here I prefer to use the second one (maybe because it's faster!):

Since $f$ and $g$ are onto so $$(g\circ f)(X)=g(f(X))=g(Y)=Z$$ thus $(g\circ f): X \rightarrow Z$ is onto.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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