Identity function (Topology) Let $X$ be Hausdorff and $f:X \to X$ be continuous. Prove $\{x \mid f(x)=x\}$ is closed in $X$.
I know that the points in a Hausdorff space are closed, I was thinking about the diagonal but this is with cartesian product. Could you give me any ideas about it, please?
Thanks for your help

The proof I offer differs from these of the post indicated above. It involves the basic properties of the Hausdorff space and continuity.
I will show that the complement, i.e. the set $A=\{y\in X:f(y)\ne y\}$, is open. Let $x\in A$, which means that $f(x)\ne x$. Since $X$ is Hausdorff, there exist open and disjoint sets $U,W$ s.t $x\in U$, $f(x)\in W$. By continuity there exists an open set $V$ s.t $x\in V$ and $f(V)\subset W$. Take the open neighbourhood $U\cap V$ of $x$. If $y\in U\cap V$, then $y\in V$, so $f(y)\in W$. Because $U\cap V$ and $W$ are disjoint, we have $f(y)\ne y$, hence $y\in A$. This proves that $x\in U\cap V\subset A$, so $A$ is an open set.
