# Understanding surjective morphism of sheaves

Given a surjective morphism of sheaves $$\varphi:\mathcal{A}\to \mathcal{B}$$ on topological space $$X$$, it may not be surjective on sections,i.e., on an open set $$U$$, $$\varphi(U):\mathcal{A}(U)\to \mathcal{B}(U)$$ may not be surjective.

I have trouble understanding the definiton of surjective morphism of sheaves. In Hartshorne's, he says that if image sheaf $$im\varphi$$, which is the sheaf associated to presheaf image $$U\to \cup _{p\in U}im(\varphi(p))$$ is equal to $$\mathcal{B}$$, then $$\varphi$$ is surjective. But this means that $$\cup _{p\in U}im(\varphi(p))=\mathcal{B}(U)$$. On the other hand, if a presheaf $$\mathcal{A}$$ is a sheaf, then the sheaf associated to presheaf $$\tilde{\mathcal{A}}=\mathcal{A}$$, i.e, $$\mathcal{A}(U)=\cup _{p\in U}\mathcal{A}_p$$. Also, $$\varphi$$ is surjective iff it's surjective at stalks, i.e, $$\mathcal{A}_p\to im(\varphi(p))=\mathcal{B}_p$$ is surjective. Combining the arguments above, it seems that we have $$\mathcal{A}(U)=\mathcal{B}(U)$$, which can't be right. So I hope someone can point out my mistakes. Thanks!

In Hartshorne the definition of presheaf image is $$U\mapsto im\varphi(U)$$. $$\varphi:\mathcal A\rightarrow \mathcal B$$ is surjective means that $$\mathcal B$$ is associated to the presheaf image.