# A subset of a metric space is open iff its complement is closed

I have been reading baby Rudin and I am currently in the topology chapter. I came across the proof that a metric space is open iff its complement is closed and I liked his slick and direct style but I also wanted to prove it on my own. So this is my attempt

The definitions that I use here are:

• $$p$$ is a limit point of a subset $$E$$ of a metric space iff every open neighborhood of $$p$$ contains a point in $$E$$ which is not equal to $$p$$

• $$E$$ is closed iff it contains all its limit points.

• A point $$p$$ is an interior point of $$E$$ if there exists an open neighborhood $$N(p)$$ of $$p$$ such that $$N(p)$$ is contained within $$E$$

• $$E$$ is open iff all its points are interior points.

Proof: Suppose $$E$$ open and $$E^c$$ not closed. Then there is a limit point $$x$$ of $$E^c$$ which is not in $$E^c$$. Then $$x \in E$$. But $$E$$ is open so there is some open neighborhood of $$x$$ which is contained within $$E$$ and hence has no element in $$E^c$$. But this is impossible since $$x$$ is a limit point of $$E^c$$.

On the converse, suppose $$E^c$$ closed and $$E$$ not open. Then there is a point $$p$$ in $$E$$ which is not an interior point of $$E$$. Then every open neighborhood of $$p$$ contains a point in $$E^c$$. Then $$p$$ is clearly a limit point of $$E^c$$. But $$E^c$$ is closed so $$p \in E^c$$ which is impossible.

$$\square$$

I'm making this post also for other people who are studying real analysis and to see different possibilities for the solutions as well as getting some feedback on my proof writing. Any comment is appreciated.

• The only problem here is you are talking about a metric space being open/closed. You should be talking about a subset of a metric space being open or closed, not the entire metric space. The entire metric space is always both open and closed. Otherwise, your proof is fine. Dec 23, 2018 at 23:24
• Thanks for the suggestion. edit made for the future viewers Dec 23, 2018 at 23:30
• You have not fixed the problem identified by Kavi in the question but only i in the title. Your list of definitions does not include a definition for $E^c$. Dec 24, 2018 at 0:18
• By convention, $E^c$ usually denotes complement of a set and I thought that it was quite obvious from the context. And for $E$ not being the entire metric space, I first define $E$ to be a subset of a metric space for the definition of a limit point. And proceed to use that notation but is that not okay? Dec 24, 2018 at 1:16