# If $A$ is open and $B$ is closed, is $B\setminus A$ open or closed or neither?

If $A$ is open and $B$ is closed, is $B\setminus A$ open or closed or neither?

I think it is closed, is that right? How can I prove it?

-
Represent $B \setminus A$ as an intersection of two closed sets. – Alexei Averchenko Oct 25 '12 at 13:29
This can also be used to show that $A\setminus B$ is open. – Loie Benedicte Sep 2 '13 at 0:20

Yes, if $A$ is open and $B$ is closed, then $B\setminus A$ is closed. To prove it, just note that $X\setminus A$ is closed (where $X$ is the whole space), and $B\setminus A=B\cap(X\setminus A)$, so $B\setminus A$ is the intersection of two closed sets and is therefore closed.
Alternatively, you can observe that $X\setminus(B\setminus A)=(X\setminus B)\cup A$ is the union of two open sets and therefore open, so its complement, $B\setminus A$, is closed.
If $A$ is an open subset of $B$, and both $B$ and $A$ are subsets of a space $X$, then $B\backslash A=(X\backslash A)\cap B$. As $A$ is open, $X\backslash A$ is closed, and so $B\backslash A$ is the intersection of two closed sets, and is closed.