Give examples of compact spaces $A,B$ such that $A\cap B$ is not compact If a topological space is Hausdorff then arbitrary intersection of compact sets is compact.
How to find examples of compact  subsets $A,B$ of a topological space $X$ such that $A\cap B$ is not compact
 A: Consider two different one-point compactifications of the same non-compact space.  Each compactification will be compact, but their intersection (the original space) will not be.
For a specific example, take $\mathbb{R} \cup \{\gamma, \delta\}$ whose open sets are as follows:


*

*If a subset $U$ does not contain $\gamma$ or $\delta$, then $U$ is open $\iff$ it is open in $\mathbb{R}$.

*If a subset $U$ does contain either $\gamma$ or $\delta$ (or both), then $U$ is open $\iff$ it contains all of $\mathbb{R}$.


You can check that this topology is legitimate and that $\mathbb{R} \cup \{\delta\}$ and $\mathbb{R} \cup \{\gamma\}$ are both compact.  However, $\big( \mathbb{R} \cup \{ \delta \} \big) \cap \big( \mathbb{R} \cup \{\gamma\} \big) = \mathbb{R}$ is not compact.

P.S. this general idea has been very kind to me in the past, so it might be worth bearing in mind.  For instance, read here about how this one-point compactification also serves as a one-point connectification.
A: Let $X$ be the real line with doubled origin, i.e., $X=\mathbb R\cup\{0'\}$ where the open sets are the open sets of $\mathbb R$ as well as all sets of the form $(U\setminus\{0\})\cup\{0'\}$, where $U$ is an open neighbourhood of $0$.
Then $[0,1]$ and $([0,1]\setminus\{0\})\cup\{0'\}$ are compact, but their intersection $(0,1]$ is not.
