Let $f:X\to Y$ be a morphism of algebraic varieties. Assume $Y$ is separated (meaning that the diagonal is closed in $Y\times Y$) and $X$ is complete (meaning that for all varieties $Z$ the projection $X\times Z\to Z$ is closed). Show that $f$ is a closed map.
I showed that the graph of $f$ is closed under the assumption that $Y$ is separated. I am thinking of writing $f$ as the composition of $g:X\to X\times Y,x\mapsto (x,f(x))$ and the projection onto $Y$, since the latter is closed by assumption. But then why should $g$ be closed?
We defined some weird topology on the product of two varieties, which I don't really understand, so to start and juggle with concrete closed sets doesn't seem like a good idea.
Any help is appreciated, either for this question or clearing up what exactly the topology is on $X\times Y$.