In the proof of Proposition 5.9 (page 116) of Hartshorne's Algebraic Geometry, he wrote
... we only have to check that $(Y, \mathscr{O}_X/\mathscr{I})$ is a closed subscheme [of X]. This is a local question, so we may assume $X = \text{Spec }A$ is affine.
I wonder what he meant by that. Is it true that $f : Y \rightarrow X$ is a closed immersion if and only if for any open affine cover $U_i$ of $X$, $f : f^{-1}(U_i) \rightarrow X$ is closed immersion?
EDIT: I just realize that this is true.
http://math.stackexchange.com/questions/1570581/fx-rightarrow-y-is-a-closed-immersion-iff-ff-1u-i-rightarrow-u-i-is-a/1570605#1570605
– MooS Feb 18 '16 at 22:06