# Preimage of prime ideal must not be whole ring

We do not impose homomorphism must map 1 to 1. The two rings are commutative, unital rings. How to show that the preimage of a prime ideal must not be the whole ring/domain? or show a counter example.

Everything single proof I saw impose $$f(1)=1$$ for ring homomorphisms but I'm yet to see a counter example where both rings are unital, commutative.

Any help appreciated!

Consider $$f:\mathbb{R} \to \mathbb{R}$$ given by $$f(x):=0$$ for any $$x \in \mathbb{R}$$. Note that the zero ideal is a prime ideal in $$\mathbb{R}$$, but its preimage is the whole ring $$\mathbb{R}$$. This gives a counterexample when 1 is not required to be mapped to 1.
Let $$F_2$$ be the field of two elements and consider $$R=F_2\times F_2$$. Then $$x\mapsto (x,0)$$ is such a homomorphism from $$F_2\to R$$.
It maps onto a prime ideal of $$R$$ (indeed, a maximal ideal) and its inverse image is clearly all of $$F_2$$.