# $X$ is a Hausdorff space and $f:X \rightarrow X$ a continuous function. Prove that $\{x \in X \mid f(x)=x\}$ is closed. (Is my proof correct?)

Suppose $$X$$ is a Hausdorff space and $$f:X \rightarrow X$$ a continuous function. Prove that the set $$\{x \in X \mid f(x)=x\}$$ is closed in $$X$$.

Let $$X,Y$$ be topological spaces with $$Y$$ Hausdorff, and let $$f,g:X \rightarrow Y$$ be continuous maps. Then the set

$$\{x \in X \mid f(x)=g(x)\}$$

is closed in $$X$$.

My question is whether I can use this proposition to prove the first statement?

I think I can, because if we let $$g:X \rightarrow X$$ be the identity map, then $$g$$ is continuous aswell, and the codomain of $$f$$ and $$g$$ is obviously Hausdorff, so the conditions in the above proposition seems to be satisfied.

• Yes, taking $g$ the identity function is a particular case. If you think it will be needed add a word about why the identity is continuous. – conditionalMethod Dec 5 '19 at 20:51
• Yes... I dk what method you used to prove the general result about $X$ and $Y$ but for me it seems easiest to prove that $\{x\in X: f(x)\ne g(x)\}$ is open in $X$. A useful corollary, for continuous $f,g$ from $X$ to Hausdorff $Y,$ is that if $f,g$ agree on a dense subset of $X,$ then $f=g,$ which can put an upper limit on the cardinal of the set of continuous $f:X\to Y$, which is applied in the proof of the Jones Lemma about (some) non-normal spaces. A familiar special case, with the standard topology on $\Bbb R,$ is that if the continuous real functions $f,g$ agree on $\Bbb R$ then $f=g.$ – DanielWainfleet Dec 6 '19 at 8:00

• In general, you will have that the preimage by a continuous function of a point (closed subset by Haussdorff condition) is closed. Since $f$ is continuos, the function $g(x)=f(x)-x$ is also continuos, therefore $g^{-1}(0)$ is closed. You just need to use that the preimage by continuous functions of a closed subset is closed. – Senna Dec 5 '19 at 21:27
• @Senna What does $f(x) - x$ mean in a general Hausdorff space? The correct general argument is this: If $X$ is Hausdorff, then the diagonal $\Delta = \{(x,x)\mid x\in X\}$ is a closed subset of $X\times X$. Given a continuous function $f\colon X\to X$, we have a continuous function $(\text{id}_X,f)\colon X\to X\times X$, by $x\mapsto (x,f(x))$, and $\{x\in X\mid f(x) = x\}$ is the preimage $(\text{id}_X,f)^{-1}(\Delta)$, hence it is closed. Note that we really need the Hausdorff condition to get that $\Delta$ is closed. The condition that points are closed ($T_1$) is not enough. – Alex Kruckman Dec 5 '19 at 21:43
• For a counterexample in the $T_1$ case, let $X = \mathbb{N}$ with the cofinite topology. This is $T_1$ but not Hausdorff. Let $f\colon X\to X$ be the function which swaps $0$ and $1$ and fixes every other element. Then $f$ is continuous. But $\{x\in X\mid f(x) = x\} = \mathbb{N}\setminus \{0,1\}$, which is not closed. – Alex Kruckman Dec 5 '19 at 21:46
As an alternative proof for the general case (with both $$f$$ and $$g$$, and yes, we can of course take $$g=\textrm{id}_X$$ to derive the first from the second, as identities are always continuous), we can use nets: if $$(x_i)_{i \in I}$$ is a net in $$X$$ converging to some $$x \in X$$ and all $$x_i, i \in I$$ are in $$C:=\{x\mid f(x)=g(x)\}$$ then we know that for all $$i$$, $$f(x_i)=g(x_i)$$ by definition of $$C$$ and so, as $$f$$ and $$g$$ are continuous:
$$\lim_i f(x_i) = f(\lim_i x_i) = f(x) \text{ and } \lim_i g(x_i)=g(\lim_i x_i)=g(x)$$ and as the nets $$(f(x_i))_i$$ and $$(g(x_i))_i$$ in $$Y$$ are the same by hypothesis and $$Y$$ is Hausdorff so that limits of nets are unique: $$f(x)=g(x)$$ and so $$x \in C$$ as well.
So nets from $$C$$ can only converge to members of $$C$$, which implies $$C$$ is closed.