[Math] Co-Domain of composite function

functions

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.

Best Answer

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.

Related Question