# $X$ Hausdorff and Compact, $f: X \rightarrow X$ continuous. Is the set of fixed points of $f$ Compact?

I'm trying to prove the following statement:

If $X$ is a Compact, Hausdorff Topological Space and $f:X\rightarrow X$ is a continuous function, then the set $F=\left\{ x \in X : f(x) = x\right\}$ of fixed points of the function $f$ is Compact.

Yet any clues on how to even start.

• There's an easy approach if $X$ is a vector space, which is to say that we can note the continuity of $x \mapsto f(x) - x$. I'm not sure if that argument generalizes in any way Jul 6, 2018 at 3:52
• @Omnomnomnom It's a very beautiful way of prooving the result for vector spaces, since $\{0\}$ is closed. I also coundn't think of a way to generalize it, but I would be very happy if is there's any simple way to proof this general version. ;p Jul 6, 2018 at 3:58
• This also generalizes to arbitrary metric spaces, in which $x \mapsto d(f(x),x)$ is continuous. If a counterexample exists, it must be non metrizable. Jul 6, 2018 at 4:02

The set of fixed points is closed in $X$. This is because it is the inverse image of the diagonal $\Delta=\{(x,x):x\in X\}\subseteq X\times X$ under the continuous map $x\mapsto (x,f(x))$ from $X$ to $X\times X$. Note that $\Delta$ is closed in $X\times X$ due to the Hausdorff property.
• +1. To the OP: There is a common problem in a first course on point-set topology, that says: Prove that a topological space $X$ is Hausdorff iff the diagonal of $X \times X$ is closed. You can find it posed/discussed in MSE 136922.  (Proving any closed subset of a compact space is compact is a common problem, too!) Jul 6, 2018 at 4:25