TITLE: How to prove that : $Z$ is closed subset iff $X$ can be covered by open subsets $U$ such that $Z\cap U$ is closed in $U$ for each $U$
QUESTION [6 upvotes]: Let $X$ be a topological space, $Z$  is closed subset of $X$ if and only if $X$ can be covered 
by open subsets $U$ such that $Z\cap U$ is closed in $U$ for each $U.$
Can someone help me to prove this or give me a reference where I can find it, 
Thanks.

REPLY [13 votes]: Assume that there is a cover $(U_i)_{i\in I}$ of $X$ such that $Z\cap U_i$ is closed in $U_i$ for each $i$. Then
$$X-Z=(X-Z)\cap\bigcup U_i=\bigcup (U_i-Z)$$
Now $U_i-Z$ is open in $U_i$, thus open in $X$. So the complement of $Z$ is open in $X$.
The other direction is trivial.
By the way: If $(U_i)_I$ is an open cover, then $C$ is closed/open if (we have just shown that) and only if $C\cap U_i$ is closed/open in $U_i$. More generally, this holds when the $U_i$ are neighborhoods, i.e. when each point has some $U_i$ as a neighborhood. One then says that 

$(X,\tau)$ is coherent with $(U_i)_I$