# Compactness of union and intersection?

Consider a compact subset $A\subseteq \mathbb{R}$ together with a closed subset $B\subseteq \mathbb{R}$. Show that $A\cap B$ is compact. Is $A\cup B$ also compact?

-
With homework questions, it's usually a good idea to tell us what you already know, and what you have tried. – NKS Sep 30 '12 at 23:13

In $\mathbb{R}$ compact iff closed and bounded. $A$ is compact so $A$ is closed. Then $A \cap B$ is closed. Also $A \cap B \subseteq A$ so $A \cap B$ is bounded. Hence $A \cap B$ is closed and bounded, so $A \cap B$ is compact.
We still have $A \cup B$ is closed. But $A \cup B$ might not be bounded. E.g. take $A = \emptyset, B = \mathbb{R}$ and this gives a contradiction for $A \cup B$ being compact.
Edit: Just so you are aware, $A$ compact and $B$ closed implies $A \cap B$ is compact in any Hausdorff topological space. Hausdorff is needed so compact implies closed. Then the proof proceeds using the definition with open covers. It may be a good exercise to try to prove it for $\mathbb{R}$ without using compact iff closed and bounded.
To show that $A\cap B$ is compact just note that if $x_n\in A\cap B$ then $x_n\in A$ so by compactness, there is a subsequence $x_{n_k}\to x\in A$ and $x_{n_k}\in B.$ Since $A\cap B$ is closed $x\in A\cap B$ and sequential compactness follows. As to $A\cup B$ it is clearly false as one can take unbounded $B.$