# Hausdorff Space and functions

Let $$f,g:X\rightarrow Y$$ be continuous where $$Y$$ is Hausdorff. Prove that if $$f(x)=g(x)$$ for each $$x$$ in a subset $$A$$ of $$X$$, then $$f(x)=g(x)$$ for each $$x$$ in $$\overline{A}$$.

Hint: Let $$y\in \bar{A}$$ be so that $$f(y)\ne g(y)$$. The space $$Y$$ being Hausdorff, implies there exist open sets $$U_1$$ and $$U_2$$ such that $$f(y)\in U_1,\;g(y)\in U_2\text{ and }U_1\cap U_2=\varnothing.$$
Now $$f^{-1}(U_1)$$ and $$f^{-1}(U_2)$$ are open sets in $$X$$ containing $$y\in \bar{A}$$, therefore $$f^{-1}(U_1)\cap A\ne \varnothing\text{ and }f^{-1}(U_2)\cap A\ne \varnothing$$ Now ...
The core idea is that if $$X$$ is Hausdorff then the diagonal $$\Delta \subset X \times X$$ is closed (this is a basic fact you should be able to prove).
Observe you can define the function $$(f,g)\colon X\rightarrow X \times X$$ by $$(f,g)(x)=(f(x),g(x))$$ which is clearly continuous, thus $$\{x \in X : f(x)=g(x) \}=(f,g)^{-1}(\Delta)$$ is closed and this gives you the proof of the statement.
• But in my question, $X$ is not necessarily Hausdorff. Feb 17, 2020 at 17:09
• Sorry, I made some confusion. My argument still works perfectly if you replace the target of $f,g$ with $Y$: this space is Hausdorff so $\Delta \subset Y \times Y$ is still closed, hence its preimage via $(f,g)$ is closed.