When is the preimage of prime ideal is not a prime ideal?

If $f\colon R\to S$ is a ring homomorphism such that $f(1)=1$, it's straightforward to show that the preimage of a prime ideal is again a prime ideal.

What happens though if $f(1)\neq 1$? I use the fact that $f(1)=1$ to show that the preimage of a prime ideal is proper, so I assume there is some example where the preimage of a prime ideal is not proper, and thus not prime when $f(1)\neq 1$? Could someone enlighten me on such an example?

-
Dear sachiko, You may be interested in this question and the accompanying answers: mathoverflow.net/questions/34332/… Regards, – Matt E Sep 23 '11 at 2:35

Consider the ring homomorphism $f:\mathbb{Z}\to\mathbb{Q}$ where $f(n)=0$; then $(0)$ is a prime ideal of $\mathbb{Q}$, but $f^{-1}(0)=\mathbb{Z}$ is not proper, hence not prime.

A different example would be $f:\mathbb{Z}\to\mathbb{Z}$ where $f(n)=2n$; then $(2)$ is a prime ideal of $\mathbb{Z}$, but $f^{-1}(2)=\mathbb{Z}$ is not proper, hence not prime.

-
is this what counts as studying these days? – jspecter Sep 23 '11 at 2:23
@jspecter: Nope, this counts firmly as procrastination... :) – Zev Chonoles Sep 23 '11 at 2:25

First, I object to the fact that you consider maps which don't take $1_R$ to $1_S$ to be ring homomorphisms.

That said, yes if you were to consider such maps there are many examples. For example let $R$ be any integral domain, $S = R\oplus R$ and $f:R \rightarrow S$ be the embedding of $R$ into the first coordinate in $S$. Then $f(R)$ is a prime ideal of $S.$ And voila a counterexample.

-
I find the idea to be objectionable too, but (depending on one's definitions) a ring need not contain a multiplicative identity, in which case it is only fair to make a distinction between "a ring homomorphism between two rings that happen to have unity" and "a ring-with-unity homomorphism". – Zev Chonoles Sep 23 '11 at 2:14