Let $f , g : X \rightarrow Y$ be continuous where $Y$ is Hausdorff. Prove that $A = \{x : f(x) = g(x)\}$ is closed in $X$. I have done the followings.
$f(X)$ and $g(X)$ are two subspaces of $Y$.
As Y is Hausdorff, $f(X), g(X)$ and $f(X) \times g(X)$ are also.
$L = \{(f(X),g(X)) : f(X) = g(X)\}$ is closed in $f(X) \times g(X)$.
Inverse image of a closed set is closed under continuous mapping.
Thus $\{x : f(X) = G(X)\} \subset X$ is closed.
Is my approach correct? Last steps (closedness of $L$ and closedness of $L \Rightarrow$ closedness of $A$) is not clear to me. Please explain. if this process is not correct or any easier method is available, please give it.
Thank you.