TITLE: Is this a sufficient condition for a subset of a topological space to be closed?
QUESTION [5 upvotes]: Let $X$ be a topological space, and let $\{U_i\}$ be an open cover. If $Y$ is subset of $X$ such that $Y\cap U_i$ is closed in $U_i$ (for each $i$), does this imply that $Y$ is closed in $X$?

REPLY [14 votes]: Note that $Y^c\cap U_i = U_i \setminus Y \cap U_i$ is open in $U_i$. Therefore it is open in $X$. Now, since $\bigcup U_i = X$, $Y^c = \bigcup (Y^c \cap U_i)$ is open in $X$. Hence $Y$ is closed.