# Proving that $A$ is closed in $X$

Suppose $$X$$ is a topological space, $$A\subseteq X, f: X\to A$$ is continuous and for each $$a\in A, f(a) = a.$$ Prove that $$A$$ is closed in $$X.$$

$$\textbf{Solution:}$$ Let $$(x,y)$$ be a Hausdorff space and let $$f$$ be a continuous mapping of $$X$$ into itself. Then the set $$A= \{x\colon f(x) = x\}$$ is closed. We shall show $$X\setminus A$$ is open. If $$X\setminus A = \emptyset$$ then it is clearly open. So let $$X\setminus A \ne \emptyset$$. Let $$a$$ be an arbitrary point of $$X\setminus A$$. Then $$f(a) \ne a.$$ Since $$X$$ is a Hausdorff space and $$f(a), a$$ are distinct points of $$X$$, there exist disjoint open sets $$G$$ and $$H$$ such that $$f(a) \in G$$ and $$a\in H$$. As $$f$$ is continuous, $$f^{-1}(G)$$ is an open set containing $$a$$. So $$f^{-1}(G)\cap H$$ is an open set containing $$a$$.

We claim $$f^{-1}(G) \cap H \subseteq X\setminus A.$$ Let $$z\in f^{-1}(G) \cap H.$$ Then $$f(z) \in G, z\in H.$$ Since $$G\cap H = \emptyset, f(z) \ne z.$$ So $$z\notin A$$, i.e. $$z\in X\setminus A.$$ Thus for each $$a\in X\setminus A,$$ there exists an open set $$f^{-1}(G)\cap H$$ such that $$a\in f^{-1}(G)\cap H \subseteq X\setminus A.$$ Hence, $$X\setminus A$$ is in a neighborhood of each of its points and so it is open.

• Did you miss the Hausdorff requirement in you statement? Also, what does your first sentence mean, what is $(x,y)$? May 7, 2020 at 5:39
• @G.Chiusole I meant to say $X$, sorry about that confusion May 7, 2020 at 13:41

• That a point is open does not prevent it from being closed. However, with $X$ the two-point space with indiscrete topology and $A$ a one-point subspace, we do have a counterexamaple May 7, 2020 at 5:49
Another way to see this fact (retracts are closed in Hausdorff spaces), is to use nets: suppose $$x \in \overline{A}$$, then there is a net $$a_d, d \in D$$ from $$A$$ converging to $$x$$. By continuity of $$f$$, $$\lim_d f(a_d) = f(x)$$, but because $$f$$ is the identity on $$A$$, we also have $$\lim_d f(a_d) = \lim_d a_d = x$$ and as limits of nets are unique in Hausdorff spaces, we conclude that $$f(x)=x$$ and so $$x \in A$$ in particular, showing $$\overline{A} \subseteq A$$, or $$A$$ is closed.