# 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. Commented Oct 25, 2012 at 13:29
• This can also be used to show that $A\setminus B$ is open. Commented Sep 2, 2013 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.
Given $$A$$ is open and $$B$$ is closed. $$\begin{eqnarray*} B-A&=&\{x|x\in B \ \& \ x\notin A\}\\ &=&\{x|x\in B \ \& \ x\in A^c\}\\ &=&\{x|x\in B\cap A^c\}\\ B-A&=&B\cap A^c \end{eqnarray*}$$ which is closed since it is the intersection of closed sets.