# Germ and sheaves problem of injectivity and surjectivity

Let be $\phi: F \rightarrow G$ a morphism of sheaves and $\phi_P:F_P \rightarrow G_P$ the induced map of germs. I proved that for all $P$, $(ker \phi)_P=ker(\phi_P)$ and $(im \phi)_P= im(\phi_P)$. Now I have to show that $\phi$ is injective (resp. surjective) iff the induced map $\phi_P$ is injective (resp. surjective). How can I show that if $\phi_P$ is surjective (injective) than $\phi$ is surjective (injective)?

Assuming what you already have, this seems easy unless I am missing something: If $\phi_P$ is surjective everywhere, let $\phi:F\to G$ factor as $\newcommand{\im}{\mathrm{im}}\chi:F\to\im(\phi)$ and $\psi:\im(\phi)\to G$. The latter map is an isomorphism on stalks, because $\im(\phi)_P=\im(\phi_P)\cong G_P$. Hence, $\im(\phi)\cong G$. On the other hand if $\phi_P$ is injective, then $\ker(\phi)_P=\ker(\phi_P)=0$ so $\ker(\phi)$ is the zero sheaf.