If $f:\operatorname{Spec} A\to\operatorname{Spec} B$ is a map of schemes, how can I show $V(\varphi^{-1}(I)) = \overline{f(V(I))}$ for $I\subset B$? If $X = \operatorname {Spec}(A)$ and $Y = \operatorname{Spec}(B)$ are affine schemes and I have a morphism $f : X \to Y$, then I am trying to show
$$V(\varphi^{-1}(I)) = \overline{f(V(I))}$$ for any ideal $I \subset A$. I could show $$ \overline{f(V(I))} \subset V(\varphi^{-1}(I)). $$  It would be helpful if someone can give hint for other direction.
 A: If $V(\varphi^{-1}(I))$ is strictly bigger than $\overline{f(V(I))}$, then there must be a $b\in B$ so that $b$ vanishes on $\overline{f(V(I))}$ but not on $V(\varphi^{-1}(I))$. The first condition says that $\varphi(b)\in\sqrt{I}$ while the second condition says that $b\notin\sqrt{\varphi^{-1}(I)}$. Can these both be true?
A: We have the morphism of rings $\phi \colon B \to A$, and the map $\phi^{*} \colon \operatorname{Spec}(A) \to \operatorname{Spec}(B)$, $p\mapsto \phi^{-1}(p)$.
Clearly, if $I\subset p$, then $\phi^{-1}(I)\subset \phi^{-1}(p) $. We conclude   $\phi^{*}(V(I)) \subset V(\phi^{-1}(I))$, and since the RHS is closed, we get $\overline{\phi^{*}(V(I))} \subset V(\phi^{-1}(I))$. This was the immediate part.
Now  $V(J) \supset \phi^*(V(I))$ implies $J \subset \phi^{-1}(p)$ for all $p \supset I$, that is $\phi(J)\subset p$ for all $I\subset p$, so $\phi(J) \subset \sqrt{I}$ ( basic fact), which is equivalent to $J\subset \sqrt{\phi^{-1}(I)}$, and so $V(J) \supset V(\phi^{-1}(I) )$.
