A proof that shows surjective homomorphic image of prime ideal is prime Let $A, B$ be commutative rings with $1_{A}, 1_{B}$. Suppose that $\mathfrak{p} \neq (1)$ is a prime ideal in $A$ with $\mathfrak{p} \supseteq \ker{\varphi}$ where $\varphi: A \rightarrow B$ is a surjective homomorphism. I want to show $\varphi(\mathfrak{p})$ is a prime ideal.
I tried to solve it directly, but I got stuck, and I realized that it is easy to see from non-unital ring isomorphism $\mathfrak{p}/\ker{\varphi} \simeq \varphi(\mathfrak{p})$, but it is strange that I could not write more direct basic set-theoretic proof.


*

*I would like to see if someone can write it down (though the word "direct" may be ambiguous).

*If prime ideal does not contain kernel of surjective homomorphism, it seems like primeness is not preserved, but there is no reason for me to believe this yet, so I want to know if this is true and why / why not.



Add: For #2 above, now I think $\varphi(\mathfrak{p})$ is always prime as long as $\varphi$ is surjective since $\mathfrak{p}/(\ker{\varphi} \cap \mathfrak{p}) \simeq \varphi(\mathfrak{p})$. I know this may be a technical question, but it is important for me to make this accurate since many arguments that I come up with depend on this.

Add 2: With the answer that I selected, what I added above is not true.

Add 3: What I considered was $\varphi|_{\mathfrak{p}}:\mathfrak{p} \rightarrow \varphi(\mathfrak{p})$. We can think of any ideal as ring without $1$, so this gives $\mathfrak{p}/(\ker\varphi \cap \mathfrak{p}) = \mathfrak{p}/\ker\varphi|_{\mathfrak{p}} \simeq \varphi(\mathfrak{p})$. The problem here is that $\mathfrak{p}/(\ker\varphi \cap \mathfrak{p})$ is not an ideal of $A/\ker\varphi$ unless $\ker\varphi \subseteq \mathfrak{p}$.
 A: Adding to BenjaLim's answer, if $\mathfrak{p}$ does not contain $\operatorname{ker} \phi$, then $\phi(P)$ is not in general a prime ideal because $\phi^{-1}(\phi(P)) = \operatorname{ker} \phi + P$ and the latter need not be a prime ideal, since $\operatorname{ker} \phi + P \neq P$ and the inverse image of a prime ideal is always a prime ideal. (I am assuming that $\phi$ is still surjective)
Let $\phi:A \rightarrow B$ be surjective homomorphism of rings. Then $B \cong A/ \operatorname{ker} \phi$. We know that the prime ideals of $A / \operatorname{ker} \phi$ are in one to one correspondence with the prime ideals of $A$ that contain $\operatorname{ker} \phi$. In view of $B \cong A/\operatorname{ker} \phi$ you can think of the prime ideals of $B$ as the prime ideals of $ A/\operatorname{ker} \phi$. 
A: Firstly it is clear that $\varphi(\mathfrak{p})$ is an ideal. Now suppose $xy \in \varphi(\mathfrak{p})$. By surjectivity of $\varphi$ we can write $x = \varphi(x')$ and $y = \varphi(y')$ for some $x',y' \in A$. Now $xy$ can be written as $\varphi(z)$ for some $z \in \mathfrak{p}$. Thus we can write
$$\varphi(z) = \varphi(x')\varphi(y') = \varphi(x'y')$$
and hence $z - x'y' \in \ker \varphi$. Since $\mathfrak{p}$ contains $\ker\varphi$ this implies that $x'y' \in \mathfrak{p}$ since $z \in\mathfrak{p}$. By primality of $\mathfrak{p}$ this implies that $x'$ or $y'$ is in $\mathfrak{p}$ and so
$x$ or $y$ is in $\varphi(\mathfrak{p})$. Thus $\varphi(\mathfrak{p})$ is a prime ideal.
A: Suppose $x,y \in B$ and $xy \in \phi(\mathfrak{p})$.  Choose $a, b \in A$ such that $a \mapsto x$, $b \mapsto y$, and choose $c \in \mathfrak{p}$ such that $c \mapsto xy$.  Then $ab -c \in ker(\phi)$, so $ab \in \mathfrak{p}$.  Thus, either $a$ or $b$ is in $\mathfrak{p}$, which means either $x$ or $y$ is in $\phi(\mathfrak{p})$.
Why is surjectivity necessary?  Take $\mathbb{Z} \rightarrow \mathbb{Q}$, where the map is inclusion.  Why is $\mathfrak{p}$ containing the kernel necessary?  Take $\mathbb{Z} \rightarrow \mathbb{Z}/(2)$; $(3)$ does not map to a prime ideal.  
A: Yet another, more abstract proof.
If $\phi : A \to B$ is a surjective homomorphism, then for every ideal $\mathfrak{b} \subseteq B$ we get an isomorphism $\overline{\phi} : A/\phi^{-1}(\mathfrak{b}) \to B/\mathfrak{b}$. In particular, if $\phi^{-1}(\mathfrak{b}) \subseteq A$ is a prime (primary, maximal, reduced, etc.) ideal, then the same holds for $\mathfrak{b}$. Now, if $\mathfrak{a} \subseteq A$ is an ideal, then $\phi^{-1}(\phi(\mathfrak{a}))=\mathfrak{a} + \ker(\phi)$. Hence, if $\mathfrak{a}+\ker(\phi)$ is prime, then also $\phi(\mathfrak{a})$ is prime. The claim is for the special case $\ker(\phi)\subseteq \mathfrak{a}$.
