$(X, \tau) $ be a topological space.
$K\subset X$ is compact.
I can prove if $X$ is hausdorff space then $K\subset X$ is closed.
I know that the proof strongly requires the $T_2$– property of $X$.
But if $X$ is not hausdorff then a compact subset is not necessarily closed.
The simplest example, $X=\{0, 1\}$ and $\tau=\{\emptyset ,\{0\},X\}$
Then, $K=\{0\}\subset X$ is compact but not closed.
My question : In a topological space $(X,\tau)$ if every compact subsets $K\subset X$ are closed then $(X, \tau) $ is hausdorff.
This may be a simplest question, I mean there may be some trivial example but i am not able to solve it.
Best Answer
Let $X$ be an infinite uncountable set, endowed the cocountable topology $\tau$. Then $(X,\tau)$ is not Hausdorff, but the only compact subsets of $X$ are the finite ones, which are closed subsets.