Open and Closet set in relative topology at the same time Hey I was reading through my notes and I seem to have missed the lecture where our teacher introduced us to relative topology. I understand the basics of it but I can't get over the fact that a set can be closed and open at the same time in relative topology. Could you maybe send me some picture where it can be seen? I understand when the set is union of 2 sets and one of them is open I can make it open and closed in relative topology in C but what if it's just a subset of a set? Like in the following picture how exactly do i make the set B to be open and closed in A?
 
 A: In a topological space $X$, there are two sets that are always both open and closed, namely $X$ and $\varnothing$.
If you want to see more clopen sets (as they are affectionately called), consider $X=[0,1]\cup[2,3]$ with the topology induced by $\Bbb R$. $[0,1]$ is both closed and open in $X$.
A more general setting where clopen sets are important is in the definition of connected spaces: a space $X$ is connected if, for any nonempty, clopen set $A\subseteq X$, $A=X$. Thus a non-connected space contains a non-trivial clopen set, like in the previous example ($[0,1]\cup[2,3]$ is clearly not connected, for the intuitive definition).

Let $B\subseteq A$ be two sets. Define $\tau$ the topology on $A$ with only four open sets: $\tau:=(\varnothing,B,A\setminus B,A)$. $\tau$ is a topology: it contains $\varnothing$ and $A$, and is stable by countable unions and finite intersections. Moreover, $B$ is clopen in $A$.
Any refinement of $\tau$, i.e. any topology $\tau'\supseteq\tau$, will also have $B$ as a clopen set.
A: Given that all non-empty non-singleton sets are the union of two disjoint sets (just take any proper non-empty subset and its complement), I guess what you mean is that the set $A$ is connected (that is, it is not the union of two separated subsets).
But in that case, the only subsets of $A$ that are both closed and open (or clopen, in short) in the relative topology are the empty set and $A$. Indeed, it is the definition of a connected space that the only clopen sets are the empty set and the full space.
On the other hand, it does not matter whether one of the connected components of $A$ is open in the full space $C$. If the set $A$ is disconnected, then every connected component of $A$ is clopen in the relative topology.
