I see a problem when I read Proposition 3.16 in Atiyah-Macdonald book. The statement is:
Let $\phi : A\to B$ be a ring homomorphism and let $P$ be a prime ideal of $A$. Then $P$ is the contraction of a prime ideal of $B$ iff $P^{ec}=P$. i.e. $\phi^{-1}\phi(P)=P$.
The part "if" is easy. But the converse, I got stuck. Let $S = \phi(A \backslash p)$. They said that $P^{e}$ does not meet $S$, I do not think so. Because $0$ can be a element in $S$, then we can have $0 \in S\cap P^{e}$. At this time, $S^{-1}B$ is trivial.
If $P^{e}$ does not meet $S$, I wonder why $Q\cap S=\varnothing$ and $Q^{c}=P$
If $\varphi: A\to B$ denotes the given homomorphism, then $A\setminus{\mathfrak p}=A\setminus {\mathfrak p}^{ec}=A\setminus\varphi^{-1}({\mathfrak p}^e)=\varphi^{-1}(B\setminus{\mathfrak p}^e)$, so $S := \varphi(A\setminus{\mathfrak p})$ intersects ${\mathfrak p}^e$ trivially. Does this make things clearer?
Addition: In case you are (now or later) interested in developing geometric understanding for these kinds of algebraic statements: When wlog assuming ${\mathfrak p}=0$, the present statement means that if $\text{Spec}(B)\to\text{Spec}(A)$ is dense, then that's already true for the restriction to some irreducible component of $\text{Spec}(B)$.