A dense open set is locally compact in a Hausdorff space

compactnessgeneral-topology

I've been stuck on this problem for a while:

Prove that a dense subset of a compact Hausdorff space is open iff it is locally compact.

I've solved $(\Longleftarrow)$ (it's actually been posted before) but for the other side I have no idea. I was trying to find a relatively compact open set for each point (in our dense set). That is because we know that X is locally compact iff for each point there is an open and relatively compact set containing it.

Best Answer

Let $O$ be an open subset of your $X$. Let $U$ be an open subset of $O$ and $x \in O$. Then $U$ is also open in $X$ and as $X$ is regular (being compact Hausdorff) there is an open subset $V$ of $X$ so that $x \in V \subseteq \overline{V} \subseteq U$. It follows that $\overline{V}$ is a compact neighbourhood of $x$ inside $U$ (and inside $O$) so $O$ is locally compact QED.

The density of the subspace is irrelevant and for $X$ be only need it to be a locally compact Hausdorff space, not even compact.