# Let $f, g : X \rightarrow Y$ be continuous; assume $Y$ is Hausdorff. Show that $\{x \mid f(x) = g(x)\}$ is closed in $X$

It would be very appreciated if someone could review my proof written below. Thanks!

Problem:

Let $$f, g : X \to Y$$ be continuous; assume $$Y$$ is Hausdorff. Show that $$\{x \mid f(x) = g(x)\}$$ is closed in $$X$$.

Proof:

Let $$f, g: X \rightarrow Y$$ be continuous where $$Y$$ is Hausdorff.

Let $$C = \{x \mid f(x) = g(x)\}$$

Suppose $$C$$ is not closed. Then let $$x_1 \notin C$$ where $$x_1$$ is a limit point of $$C$$. Then $$f(x_1) \neq g(x_1)$$ in $$Y$$. Then since $$Y$$ is Hausdorff we can find disjoint open sets $$U$$ and $$V$$ containing $$f(x_1)$$ and $$g(x_1)$$ respectively. Then $$f^{-1}[U]$$ and $$g^{-1}[V]$$ are open sets in $$X$$ since $$f$$ and $$g$$ are continuous and both sets contain the point $$x_1$$.

Then consider the set $$A = f^{-1}[U] \cap g^{-1}[V]$$. This set is open and must also contain the point $$x_1$$. Since $$x_1$$ is a limit point of $$C$$ the set $$A$$ must contain some point $$z \in C$$. Then $$f(z) = g(z)$$ and since $$z \in A$$ we have $$f(z) \in U$$ and $$g(z) \in V$$. But since $$f(z) = g(z)$$ we have $$U \cap V \neq \emptyset$$ as both sets contain $$f(z)$$. Hence we have obtained a contradiction since $$U$$ and $$V$$ were chosen to be disjoint and thus $$x_1$$ must be a point in $$C$$ (or equivalently $$x_1$$ is not a limit point and is not a member of C )

So $$C$$ must contain all its limit points and thus $$C$$ is closed.

• $f(x)=g(x)\Longleftrightarrow f(x)-g(x)=0$. Apr 7, 2019 at 2:47
• no that wouldnt be correct here as Y is a general topological space and the operation of subtraction is not even defined. @DonThousand Apr 7, 2019 at 2:51
• This proof looks good to me.
– Moya
Apr 7, 2019 at 3:02
• Start by taking $x_1$ to be an adherence point (or limit point as you call it) of $C$, as you do. The contradiction follows from the assumption $x_1 \notin C$. So after the contradiction you know $x_1 \in C$, not that $x_1$ is not a limit point. Then use the last sentence right away and you're done. Apr 7, 2019 at 6:03
• Thanks again @HennoBrandsma, you are correct. I added a parenthetical which i believe could also be a valid conclusion? Let me know if you agree. thanks Apr 7, 2019 at 6:42

Let $$F(x)=(f(x),g(x))$$. Clearly, $$F$$ is continuous. Then $$\{x:f(x)=g(x)\}=F^{-1}(A)$$ where $$A$$ is the diagonal of $$Y$$. Since $$F$$ is continuous, $$\{x:f(x)=g(x)\}$$ is closed in $$X$$, being the preimage of a closed set.