An simple example to show that every countably compact space needn't be compact

I am willing to study compact and connected in topological space and apply in other topological spaces. I am a beginner in this subject. Kindly give some examples. I have went through few books but I couldn't get clear idea.

• If you know about order topologies and ordinal numbers, the set $[0,\omega_1)$ of all countable ordinals with the order topology is a nice easy example of a countably compact space which is not compact. – bof Jun 18 '15 at 8:06
• I discussed @bof’s example in middling detail in this answer. – Brian M. Scott Jun 18 '15 at 18:56

Let $X$ be a compact space. Take a cardinal $\lambda$ and endow a set $X^\lambda$ by Tychonoff product topology. By Tychonoff Theorem, a space $X^\lambda$ is compact. Choose a point $x’\in X$, and consider a so-called $\Sigma$-product.
$$\Sigma(X,x’)=\{(x_\alpha)_{\alpha<\lambda}\in X^\lambda: |\{\alpha: x_\alpha\ne x’\}|\le\omega\}.$$
Then the space $\Sigma(X,x’)$ is countable compact dense subspace of $X^\lambda$. But if the space $X$ is Hausdorff, contains at least two points, and the cardinal $\lambda$ is uncountable then $\Sigma(X,x’)\ne X^\lambda$ and it is not compact.
• @STEPHAN A closed subset of a Hausdorff space need not be compact (for instance, each non-compact Hausdorff space is a closed subset of itself). But a closed subset $Y$ of a compact space $X$ is compact, because for each open cover $\{U_\alpha\}$ of the space $Y$ there exists an open cover $\{X\setminus Y\}\cup\{V_\alpha\}$ of the space $X$ such that $U_\alpha=Y\cap V_\alpha$ for each $\alpha$. – Alex Ravsky Jun 20 '15 at 6:44
• @STEPHAN A space $\Bbb Q$ of rational numbers endowed with the standard topology is a Lindelof non-compact space. – Alex Ravsky Jun 20 '15 at 7:49