# Is this a sufficient condition for a subset of a topological space to be closed? [duplicate]

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$?

## marked as duplicate by user2345215, Shaun, user99914, Lord_Farin, Moishe KohanJan 31 '15 at 10:36

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.