[Math] Proving a set is both open and closed

analysismetric-spaces

This question and the given solution are from my lecture notes. I don't understand why the solution makes sense. I'm only showing the proof for the closed case.

Question: Let $(X,d)$ be a metric space, where $d$ is the discrete metric. Prove that every subset $A\subseteq X$ is both open and closed.

Solution: Since $A$ is open $\forall A$ $\implies $ $X\backslash A$ is also open $\forall A$ $\implies$ $A$ is closed.

I understand the final step, just not the initial one. I know a set can be both open and closed, but why does $A$ open imply that $X\backslash A$ is open? Is it a property of the discrete metric?

Best Answer

We have $A$ is open $\forall A \subseteq X$ $(\star)$.

Let $B = X \setminus A$. Then $B \subseteq X$, so $B$ is open by $(\star)$.

Related Question