Suppose \(Y\) is Hausdorff, and \(f:X\to Y\) and \(g:X\to Y\) are continuous functions. Prove that the set \(A=\{x\in X:f(x)=g(x)\}\) is closed in \(X\).
Solution
Let \(F\colon X\to Y\times Y\), \(F(x)=(f(x),g(x))\), which is continuous because its coordinates are, and let \(\Delta_Y=\{(y,y):y\in Y\}\).
1. \(\Delta_Y\) is closed in \(Y\times Y\).
Let \((y_1,y_2)\notin\Delta_Y\). Choose disjoint open \(U\ni y_1\) and \(V\ni y_2\); then \(U\times V\) is an open neighborhood of \((y_1,y_2)\) disjoint from \(\Delta_Y\).
2. Q.E.D.
\(x\in F^{-1}(\Delta_Y)\) exactly when \(f(x)=g(x)\), so \(A=F^{-1}(\Delta_Y)\), which is closed by step 1 and continuity of \(F\).