Finite morphisms of schemes are closed. Let $f : X \rightarrow Y$ be a finite morphism of schemes. I have to show $f$ is closed. I have been able to prove that for any open affine $V= \mathrm{Spec}(B)$ in $Y$, $f : f^{-1}V \rightarrow V$ is a closed morphism. But I am having trouble to extend this globally. I am arguing as follows: say $C$ is some closed set in $X$. Then $C \cap f^{-1}V$ being closed in $f^{-1}V, f(C \cap f^{-1}V)$ is closed in $V$ for any open affine $V$. But how to conclude from this $f(C)$ is closed in $Y$ without any assumption of quasicompactness ?

It follows from the following lemma:
Lemma: Let $X$ be a topological space, and let $\{U_{i}\}_{i \in I}$ be an open cover for $X$. Then a subset $C \subset X$ is closed if and only if $C \cap U_{i}$ is closed in $U_{i}$ for each $i \in I$.
(Note that there are no assumptions on the cardinality of the index set $I$!)
Proof: We prove the interesting direction, namely that if $C_{i} := C \cap U_{i}$ is closed in $U_{i}$ for each $i \in I$, then $C$ is closed in $X$. It suffices to show that $O := X\setminus C$ is open in $X$. We have 
$$X \setminus C = (\bigcup_{i \in I} U_{i}) \setminus C = \bigcup_{i \in I} U_{i} \setminus C_{i}  $$
Since $C_{i}$ is a closed subset of $U_{i}$ for each $i \in I$, $U_{i} \setminus C_{i}$ is an open subset of $U_{i}$, hence an open subset of $X$. Thus, $X$ is a union of open subsets, hence open as desired. $\square$
Now, your claim follows from the observation that $f(C \cap f^{-1}V) = f(C) \cap V$ and taking an appropriate affine cover of $Y$. 
