Image of a maximal ideal Let $f:R\rightarrow S$ be a surjective homomorphism of commutative rings with unity. I want to prove that if $M$ is a maximal ideal then $f(M)$ is either $S$ or it is a maximal ideal of $S$. I get the feeling I should somehow use the correspondence theorem, but I just can't see how to exactly use it. Thank you in advance.

I also was wondering if the same statement holds for prime ideals?
If $f(M) \subseteq I \subseteq S$ is an ideal, then $M \subseteq f^{-1}(I) \subseteq R$. Since $M$ is maximal, we get $M=f^{-1}(I)$ or $f^{-1}(I)=R$, i.e. $f(M)=I$ or $I=S$. $\mathrm{QED}$
Let $f:R \to S$ be surjective, as above, and let $\mathfrak m$ be a maximal ideal. Then, since $f$ is surjective, the image of $\mathfrak m$ is an ideal also, which we denote by $f(\mathfrak m)$. We get an induced map on quotient rings: $f:R/\mathfrak m \to S/f(\mathfrak m)$. Now, the claim is equivalent to $S/f(\mathfrak m)$ being either a field or the zero ring.

If it is neither, it has a proper ideal, say $\mathfrak a$, whose inverse image is a proper ideal of $R/\mathfrak m$. But this is a contradiction, as $R/\mathfrak m$ is a field, thus having no proper ideals.