My book says that a metric space $E$ is connected if the only subsets of $E$ that are both open and closed are $E$ and $\varnothing$.
It goes on to say that if a space $E$ is not connected then it has a subset $A$ that is both open and closed and whose complement is also both open and closed.
Then it says that $E$ is the union of these two sets, both of which are open … .
So how did $A$ and its complement go from being open and closed to open? (I don't really know what it means to be both open and closed either; only closed, open or neither).