Give an example of three functions $f,g,h$ such that $h \circ g\circ f$ is a bijection, but $g$ is neither injective or surjective.

functions

Give an example of three functions $f:A\rightarrow B, g:B\rightarrow C, h:C\rightarrow D$ such that $h \circ g\circ f$ is a bijection, but $g$ is neither injective or surjective.

I know that in order for the composition to be bijective, this means that every domain element of $f$ must be mapped to exactly one element of the range of the whole composition, and also that every range element of the composition must be paired with some domain element.

I have tried and failed to find an example. My first try was let $f:\mathbb{N}\rightarrow\mathbb{N}, g:\mathbb{N}\rightarrow\mathbb{N},h:\mathbb{N}\rightarrow\{1\},$ $f(x)=x, g(x)=1, h(x) =1$. In this scenario then the domain of $f$ is all natural numbers and they all just get mapped to themselves under $f$. Then, once you put those all into $g$, the output is just 1 – this means that $g$ is not one-to-one. Also, if $g:\mathbb{N}\rightarrow\mathbb{N}$, then it is also not surjective because 1 is the only element of the range that gets obtained. So this is okay so far. Finally, under $h$, the output from $g$ gets mapped to 1, which is the entire range of $h$. So I think this means this is surjective. However, then it fails to be injective because every element we put into $f$ at the beginning ends up just being mapped to 1 at the very end so this did not work.

My other thought was let $f:\mathbb{R}\rightarrow\mathbb{R},g:\mathbb{R}\rightarrow\mathbb{R},h:\mathbb{R+}\rightarrow\mathbb{R+},$ where $f(x)=x,g(x)=x^2 ,h(x)=x$. This way, $g$ fails to be injective and surjective because it does not obtain every value of the real numbers and also more than one input gets mapped to the same output. So that gets satisfied. All of these results get mapped to themselves under $h$, seeming to make it surjective. However, I run into the same issue where the inputs of $f$ don't end up being mapped to unique values under $h$.

Any suggestions are welcome. Thank you in advance.

Best Answer

Take $A=D=\{0\}$, $B=C=\{0,1\}$

$f(0)=0$

$g(0)=g(1)=0$

$h(0)=h(1)=0$