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

Let's say I have

$f: X \to Y$ where $f(x) = x^2$

$g: Y \to Z$ where $ g(y) = \cos(y)$ and

$h: Z \to X$ where $h(z) = 2x-1$

If I take $ f \circ (g \circ h)$ I get $\cos^2(2x-1)$

What is the co-domain of this function? Is there some sort of rule for finding the co-domain? It's easy enough to find the domain and range but I'm not sure about the co-domain.

share|cite|improve this question

The codomain of a composite is always the codomain of the last function in the composite (i.e. the first appearing in the string).

For instance, if you have a sequence of compatible functions $$f_1 : A_1 \to A_2,\ \ f_2 : A_2 \to A_3,\ \ \cdots,\ \ \ f_n : A_n \to A_{n+1}$$ then the codomain of $f_n \circ f_{n-1} \circ \cdots \circ f_1$ is $A_{n+1}$, which is the codomain of $f_n$.

Likewise, the domain of a composite is always the domain of the first function in the composite (i.e. the last appearing in the string), so the domain of $f_n \circ \cdots \circ f_1$ is $A_1$, which is the domain of $f_1$.

You can apply this general result to your problem.

share|cite|improve this answer
Great, thanks. This is exactly what I was looking for. – mh234 Dec 13 '12 at 17:13
@mh234: No problem. It occurs to me that your composite seems to be written in the wrong order: $g \circ h$ doesn't exist, but $h \circ g$ does! – Clive Newstead Dec 13 '12 at 17:16

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.