Given a topological space $X$, I want to find a criteria such that for all continuous maps $f,g:X\rightarrow X$, the set $A=\{x|f(x)=g(x)\}$ is closed - Property (1).
Consider the map $H:X\rightarrow X\times X$ such that $H(x)=(f(x),g(x))$. $H$ is continuous and $A=H^{-1}(\{(x,x)\})$, so a good criteria would be the set $\{(x,x)|x\in X\}$ is closed, or the set $K=\{(x,y)|x\neq y\}$ is open.
If $X$ is Hausdorff, for all $(x,y)\in K$ there exists $U_x, U_y$ such that $x\in U_x, y\in U_y$ and $U_x\times U_y\subset K$. Taking the union over $K$ we get $K$ is open.
So if the space is Hausdorff, $(1)$ is satisfied. How can we weaken the sufficient condition?