I need help with this exercise.
I have just proven that if X is a Hausdorff space, and $f: X\to X$ is a continuous function, then the set $\{x\in X | f(x)=x\}$ is closed in X. Now I need to find an example to show that it is necessary to assume that X is Hausdorff for this set to be closed. i.e I am thinking that I have to find a set X which is not Hausdorff such that $\{x\in X | f(x)=x\}$ is not closed. But I am a little confused about how to choose X, and how to after that show that the set $\{x\in X | f(x)=x\}$ is not closed.
Take $X= \Bbb Z$ in the cofinite topology. This is $T_1$ but not Hausdorff.
Define $f(n) = n$ for all $n \ge 0$ and $ f(n)=n-1$ for $ n <0$. Then the set of fixed points is $\Bbb Z^+$ which is not finite so not closed while $f$, as any injection , is continuous on $X$.