# When does locally closed imply closed?

I suppose that this is false in general: A map of topological spaces $f:X\to Y$ is closed iff it is locally closed, i.e. there is an open covering $\{V_i\hookrightarrow X\}$ such that each $f|_{V_i}$ is closed.

Let $f:X\to Y$ be a map of noetherian schemes, so in particular a map of noetherian topological spaces equipped with the Zariski topology. Does "locally closed" imply "closed" in this case?

(Actually, I want to test if $f$ is a closed immersion and I know that it is "locally" (in the above sense) a closed immersion.)

If $X$ is quasi-compact (e.g. the underlying space of a Noetherian scheme), then $\{V_i\}$ has a finite subcover, and replacing it with such, we may assume it is a finite cover. If $Z$ is any closed subset of $X$, then $Z = \bigcup_i (Z\cap V_i)$, so $f(Z) = \bigcup_i f(Z\cap V_i)$ is the finite union of closed sets (using that $Z\cap V_i$ is closed in $V_i$ and $f_{| V_i}$ is closed). Thus $f$ is closed in this case.
Just to give a counterexample in the non-quasi-compact case, let $Y$ be any space in which points are closed, and let $X$ denote the same underlying set as $Y$, but with the discrete topology. We take $f$ to the identity $X \to Y$. If we let $\{V_i\}$ denote the set of singleton subsets of $X$, then $f_{| V_i}$ is closed (since each point in $Y$ is closed by assumption), but $f$ is typically not closed. (Any subset $Z$ if $X$ is closed, but unless $Y$ is also discrete, not all $Z$ will be closed as a subset of $Y$.)