I need help to show the following:
Let $f: A \to B$ and $g: B \to C$, then the following holds:
$1)$ $g(f(x))$ is surjective if and only if $g$ restricted to $f(A)$ is surjective.
$2)$ $g(f(x))$ is injective if and only if $f$ is injective and $g$ restricted to $f(A)$ is injective.
In $1)$ I first assume that $g(f(x))$ is surjective. Choose $y\in C$. Since $g(f(x))$ is surjective, there exists an $x\in A$ s.t. $g(f(x))=y$. But I got stuck here.
In the other direction I first assume that $g$ restricted to $f(A)$ is surjective, this means that there exists $x\in f(A)$ s.t. $g$ restricted to $f(A) = y$.
Any help, please?
1)
($\implies$) Let $g\circ f$ be surjective and let $y\in C$. Then there exist an $x\in A$ such that $g(f(x))=y$. From $x\in A$ it follows directly that $f(x)\in f(A)$ so apparantly there is an element $z=f(x)\in f(A)$ such that $g(z)=g(f(x))=y$. This proves that $g$ restricted to $f(A)$ is surjective.
($\impliedby$) Let $g$ restricted to $f(A)$ be surjective and let $y\in C$. Then $g(z)=y$ for some $z\in f(A)$, and from $z\in f(A)$ it follows immediately that $z=f(x)$ for some $x\in A$. So we have $g(f(x))=g(z)=y$ for $x\in A$ proving that $g\circ f$ is surjective.