Let $X$ be a Hausdorff space, and $f:X \to X$ continuous. Then the following set is closed in $X$: $$B=\{x \in X;f(x)=x\}$$
I saw that question that says to consider $g:X \to X \times X$ with $g(x)=(x,f(x))$, and I could do it by arguing that $g(B)=\Delta = \{(x,x);x \in X\}$ and showing that $\Delta$ is closed. But that argument depends on $g$ being a continuous function. How can I show that?