Determining whether or not a composite function exists

3.2k Views Asked by At

Trying to figure out whether or not $f \circ h$ exists: The codomain of a function $h$ is $\{1,2,3\}$, and the domain of another function $f$ is $\{1,2,3,4\}$. The codomain of $h$ is a subset of the domain of $f$, but they are not equal.

So would $f \circ h$ not exist? I believe they do not exist, but I am not 100% sure.

2

There are 2 best solutions below

0
On

The codomain of $h$ has to be a subset of the domain of $f$.

Consider for $x$ in the domain of $h$ you get $f\circ h(x)= f( h(x))$. Hence, $f\circ h(x)$ is welldefined iff $h(x)$ is in the domain of $f$. But you don't need that the codomain of $h$ has to be the whole domain of $f$.

0
On

The answer to this question depends on how formal a setting you are considering this question in. In a formal theory for the operator of composition, such a for instance in category theory where maps are morphisms (arrows) in the category $\mathbf{Set}$, composition is only defined if the objects (here sets) at the interface of the two morphisms are identical (what one would call the domino rule: one can only juxtapose two dominoes if the values on the point of contact are equal). That means the codomain of the right operand must exactly match the domain of the left operand, and as you remarked this is not the case in your example.

This being said, there is an obvious and unique interpretation one can give to $f\circ h$ in the example, given by the usual rule $x\mapsto f(h(x))$ for all $x$ in the domain of $h$; the right hand side is always a well defined expression with value in the codomain as $f$, for all such $x$. What really goes on here from the formal perspective is that an "obvious" map $\{1,2,3\}\to\{1,2,3,4\}$, namely the inclusion$~\iota$, is implicitly inserted between $h$ on the right and $f$ on the left: $f\circ\iota\circ h$ is properly defined from the formal perspective, and given by $x\mapsto f(h(x))$.