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?
Consider the "rng" 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}\oplus\mathbb{Z}$ where $f(1)=(1,0)$; then for any prime ideal $P\subset \mathbb{Z}$, we have that $I=\mathbb{Z}\oplus P$ is a prime ideal of $\mathbb{Z}\oplus\mathbb{Z}$, but $f^{-1}(I)=\mathbb{Z}$ is not proper, hence not prime.
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.