# Example of Composition of 2 functions onto or one one but that both function need not onto or one-one.

I know that
$\sigma , \delta$ be 2 function then
$1)$ $\sigma \circ \delta$ is onto or one-one if both $\sigma$ and $\delta$ is onto or one one.
I can prove this fact . I wanted to find the counterexample for both cases if the converse is not true.
Any Help will be appreciated

• Let them be functions acting on small sets (sets with 2-3 elements). Then you can play around with them much easier. – Arthur Jul 11 '18 at 8:13

Suppose $\sigma : B \to C$, $\delta : A \to B$. The composition is $$\sigma \circ \delta : A \to C.$$ Note that if $\sigma$ is not onto, then the composition cannot be onto. If $\sigma$ is not onto, then there exists $c\in C$, such that for all $b\in B$, $\sigma(b) \neq c$. Put another way, $c \notin \sigma(B)$.

But $\delta(A) \subseteq B$, hence $$\sigma \circ \delta (A) \subseteq \sigma(B),$$ and since $c \notin \sigma(B)$, the composition cannot be onto.

In a similar fashion you can show that if the composition is one-to-one, then $\delta$ must be one-to-one.

Here constant functions can be helpful to find counterexamples.

If $\sigma$ or $\delta$ is constant then so is $\sigma\circ\delta$, so if the codomain of $\sigma$ contains more than one element then $\sigma\circ\delta$ is not onto.

Specifically if $\sigma$ is constant and the domain of $\delta$ has more than one element then $\sigma\circ\delta$ is not one-to-one.

Further if $\delta$ is not one-to-one then distinct $x,y$ exist with $\delta(x)=\delta(y)$. Then also $\sigma\circ\delta(x)=\sigma\circ\delta(y)$ so also $\sigma\circ\delta$ is not one-to-one.