Let $X, Y$ be affine varieties and $\phi: X \rightarrow Y$ a morphism. Could someone please explain me why $ker \phi$ is closed?
By definition $\phi$ is continuous and satisfies for all $V \subseteq Y$ open, for all $f \in O_Y(V)$ we have $$ f \circ \phi \in O_X(\phi^{-1}(V)). $$ I don't see how from this we can see that $ker \phi$ is a closed set in $X$... Thank you.
Edit. I like to add that $X$ and $Y$ are affine algerbaic groups.