Is the closure of a compact set compact? While looking up information on compact operators I came across these two conflicting posts.


*

*If a set is compact then it is closed

*Topology: Example of a compact set but its closure not compact
So the first link says that if a set $U$ is compact then it is closed. $U$ closed means $U = \overline{U}$ and hence $\overline{U}$ is compact. This seems to be in direct contradiction with the second post?
 A: This is not a contradiction, because the main property is:

A compact subspace $K$ of a Hausdorff space $X$ is closed. 

Indeed, we show that for every $x \in X \setminus K$, there is an open set $U$ such that $x \in U \subset X \setminus K$. Fix such an $x$.
As $X$ is Hausdorff ($T2$), for every $y \in K$, there are disjoint open sets $U_y,V_y$ such that $x \in U_y$ and $y \in V_y$. Now you can use the compactness of $K \subset \bigcup_{y \in K} V_y$, so that 
$$K \subset \bigcup_{y \in E} V_y$$
for some finite subset $E \subset K$.
Define $U = \bigcap_{y \in E} U_y$, which is an open set because $E$ is finite. You can finally show that $U$ satisfies the desired conditions. I leave it to!
A: Actually, the co-finite topology on R, the set of real numbers. Every subset of R is compact. However, it is not every subset of R is closed. There is a special spaces that assumed that every compact set is closed. Certainly, in Hausdorff spaces, every compact set is closed. For your the second question, Take X=R, the set of real numbers. Define topology on X by U is a subset of X is open if and only if U contains 1 or U is the empty set.Then K={1,2} is compact, but cl(K)=R which is not compact with this topology. Actually, every point x in not K, and any open subset U contain x then 1 is also in U. So, the intersection of U and K is not empty, then x is in the closure of K. Therefore, cl(K)=R. The collection U(x)={1,x} forms an open cover of X, obvious there is no finite sub-collection of it cover X. 
