Composition of 3 functions

292 Views Asked by At

If $h:A\rightarrow B, g:B\rightarrow C, $ and $ f:B\rightarrow C$ are three functions, and $g \circ h = f \circ h$ . Is $g=h$?

Initially I want to say that $g=f$. But, the proof I came up with feels incomplete. This what I got:

Let $a \in A$ and $b \in B$, then $h(a) = b$. Since $g$ and $f$ both except b as a input and both output a $c \in C$. The fact that $g \circ h = c$ such that $c \in C$ and $f \circ h = c$ means that $g(b) = f(b)$. As such, $g$ and $f$ must be applying the same transformation for $B \rightarrow C$.

Does this proof make sense?

1

There are 1 best solutions below

0
On

Consider if $A$ has a single element, $B$ has two elements, and $C$ has (at least) two elements. It is rather easy then to construct an example of $f,g,h$ such that $g\circ h=f\circ h$ but $g\neq f$.

As pointed out by John Douma in the contents above, a function $h$ such that $f\circ h=g\circ h\implies f=g$ for all possible $f,g$ (including all possible choices of $C$) is called an epimorphism. In most contexts you'll encounter until graduate level mathematics (where there are counterexamples like schemes in algebraic geometry, or semirings in algebra), this is the same as a surjection, or an onto function.