[Math] injective and surjective

functions

How to prove that a composite function $f\circ g$ is bijective$?$

because i have two questions.
if $f$ is injective and $g$ is surjective, can $g\circ f$ be both injective and surjective?
because the question assumes both sets to be the same criteria ( $f$ injective, $g$ surjective) , so one question is whether $g\circ f$ is injective and the other is if $g\circ f$ is surjective.

i proved that if $f$ is injective then, $x=y$, $f(x)=f(y)$, then $g(f(x)) = g (f(y))$ so $g\circ f$ is injective.
but is it true that if $f$ is injective and $g$ is surjective, then $g\circ f$ can also be surjective. its making me confused.

Best Answer

"if $f$ injective and $g$ surjective can $g\circ f$ be both injective and surjective?"

Sure, e.g. let $f:\{0\}\rightarrow\mathbb R$ and $g:\mathbb R\rightarrow\{0\}$.

But not always, e.g. let $g:\{0,1,2\}\rightarrow\{0,1\}$ be prescribed by $0\mapsto0$, $1\mapsto1$, $2\mapsto1$ and let $f:\{0,1\}\rightarrow\{0,1,2\}$ be prescribed by $0\mapsto1$, $1\mapsto2$.

Then $f$ is injective and $g$ is surjective.

However $g\circ f:\{0,1\}\rightarrow\{0,1\}$ is constant (and prescribed by $0\mapsto1$ and $1\mapsto1$).

It is evidently not injective and is not surjective.

Related Question