# Compact but not Hausdorff space

I think this space might be a space which is compact and non-Hausdorff, but I don't how to prove this.

Let $x,y\in\mathbb{R}^n$, define $x\sim y\leftrightarrow\exists t\neq 0(x=ty)$. Then $\sim$ is an equivalence relation and $\mathbb{R}^n/\sim$ is a compact and non-Hausdorff space.

The strategy might be constructing a "natural" compact non-Hausdorff space and proving they are homeomorphic. But how to come up with such spaces?

Let $X = \mathbb{R}^n / \sim$, and consider the projection map $\pi : \mathbb{R}^n \to X$ which maps each point to its equivalence class. By definition of the quotient topology, $\pi$ is continuous. If we let $E = S^{n-1} \cup \{0\}$ consist of the unit sphere in $\mathbb{R}^n$ together with the origin, then $E$ is compact in $\mathbb{R}^n$, and $\pi(E) = X$ (as $E$ contains at least one point from every equivalence class). Hence $X$ is the continuous image of a compact set.
To see it is not Hausdorff, notice that the only open set in $X$ which contains the equivalence class $[0]$ is $X$ itself. Indeed, if $U$ is open in $X$ and contains $[0]$, then $\pi^{-1}(U)$ contains a neighborhood of $0$ in $\mathbb{R}^n$; in particular it contains a point of every equivalence class. So in fact $U$ contains every equivalence class in $X$. Now this prevents $X$ from being Hausdorff, since we cannot find disjoint open neighborhoods of $[0]$ and any other point.
Try the indiscrete topology {$\phi$,$X$} on any space $X$, where $X$ is not a singleton . Then $X$ is clearly compact, but not Hausdorff.
HINT:$\mathbb{R}^n/\sim=\mathbb{P}^{n-1}\cup p$, where $p$ is a generic point of it. So it is a quasi-compact but not Hausdorff.