TITLE: Is the intersection of a closed set and a compact set always compact?
QUESTION [22 upvotes]: I am going through Rudin's Principles of Mathematical Analysis in preparation for the masters exam, and I am seeking clarification on a corollary.
Theorem 2.34 states that compact sets in metric spaces are closed. Theorem 2.35 states that closed subsets of compact spaces are compact. As a corollary, Rudin then states that if $L$ is closed and $K$ is compact, then their intersection $L \cap K$ is compact, citing 2.34 and 2.24(b) (intersections of closed sets are closed) to argue that $L \cap K$ is closed, and then using 2.35 to show that $L \cap K$ is compact as a closed subset of a compact set.
Am I correct in believing that this corollary holds for metric spaces, and not in general topological spaces?

REPLY [14 votes]: As usual, nets provide an elegant proof. Let $L$ be closed and $K$ compact. Suppose $(x_i)_i$ is a net in $L\cap K$. As $K$ is compact, there is a subnet $(x_{i_k})_k$ converging to some $x\in K$. As $L$ is closed, we must have $x\in L$. Hence $x\in L\cap K$ and consequently $L\cap K$ is compact.