The complement of the closed subset of a closed set Suppose that I had a closed set. Suppose that I made it so that there was nothing else outside such closed set. I will call this set "A". Now, suppose that I picked a closed subset from A. I will call this subset "B". Considering this, is the complement of subset B open or closed? According to most textbooks, it would be open: the complement of a closed set is open. However, the complement of a subset B is everything that is inside a closed set, and hence it wouldn't be open. Is this a contradiction? Also, could someone clarify what assumptions concepts that I have made are erroneous? I am starting to learn about sets in my introductory real-analysis class, so I am not very familiar with set theory.
 A: If there is nothing outside the closed set $A$, then $A$ is the space itself.  Now, the complement of a closed subset $B\subset A$ is open.  The complement of $B$ may be the whole of $A$, in which case it is both open and closed.  This is absolutely allowed: sometimes sets which are both open and closed are called 'clopen'.  
Examples of clopen sets: 


*

*The empty set.

*The real numbers, considered as a subset of the space of all real numbers.

*Given any topological space $X$, X itself.

*The maximal connected components of a topological space.

*In $\mathbb Q$, $\{x\in\mathbb Q:x^2>2\}$.  


It's a bit confusing that the sets are called 'open' and 'closed' - it makes you expect that open sets can't be closed and that closed sets can't be open.  But they can.
A: Whenever we talk about the complement of a set $B$, we must be careful to specify an ambient set -- that is, what is "the set of everything" of which $B$ is a subset? 
If $B$ is a subset of $A$, its complement in $A$ is
$$A\setminus B = \{x\in A: x\not\in B\}.$$
For example, suppose $B$ is the unit interval $[0,1]$. This is a subset of $\mathbb{R}$. Its complement in $\mathbb{R}$ is
$$\mathbb{R}\setminus [0,1] = \{x\in\mathbb{R}: x\not\in [0,1]\} = (-\infty,0)\cup(1,\infty).$$
On the other hand, $B$ is also a subset of the interval $[-1,1]$. The complement of $B$ in $[-1,1]$ is
$$[-1,1]\setminus[0,1] = \{x\in [-1,1]: x\not\in [0,1] \} = [-1,0).$$
To reiterate, there is no single well-defined "complement" of a set: the notion of complement depends on the ambient set.
Sometimes we fix an ambient set implicitly. For example, if all of the sets we're talking about in some discussion are subsets of $\mathbb{R}$, we might simply refer to "the complement" of a set $B$ and implicitly mean its complement in $\mathbb{R}$. In an introductory real analysis course, this is what is usually meant by "the complement" of $B$.
