I'm not good at english.. sorry
I have a question. Why need condition $X$ is hausdorff? Motivate problem(in book):
Suppose that $X$ is hausdorff and $Y$ is Hausdorff and compact
$f:X \to Y$ is continuous $\Leftrightarrow$ $G(f):=\{(x,f(x)) : x \in X\}$ is closed in $X \times Y$
I think
$(\Rightarrow )$ Suppose $f:X \to Y$ is continuous. Claim : $(X \times Y)-G(f)$ is open.
Let $(x,y) \in (X \times Y)-G(f)$. Since $y \ne f(x)$ and $Y$ is hausdorff, $\exists G,H :$ open in $Y$ s.t. $y \in G, f(x) \in H$ and $G \cap H = \emptyset$. Since $f$ is continuous, $f^{-1}(H)$ is open in $X$. Then $(x,y) \in f^{-1}(H) \times G \subset (X \times Y)-G(f)$. Therefore $(X \times Y)-G(f)$ is open.
$(\Leftarrow)$ Suppose $G(f)$ is closed. Let $x \in X$ and $U$ be an open neighborhood of $f(x)$.
Claim: $\exists G :$open neighborhood of $x$ s.t. $x \in G \subset f^{-1}(U)$.
Let $y \in Y$ with $y \ne f(x)$, $(x,y) \in (X \times Y)-G(f)$. Since $(X \times Y)-G(f)$ is open, there exists $G_{y}$:open in $X$ and $H_{y}$: open in $Y$ s.t. $(x,y) \in G_{y} \times H_{y} \subset (X \times Y)-G(f)$. $\mathscr{C} = \{U \} \cup \{H_{y} : y \in Y- \{f(x) \} \}$ is open cover of $Y$. Since $Y$ is compact, there exists $H_{y_{1}}, \cdots ,H_{y_{n}} \in \mathscr{C}$ s.t. $Y = (H_{y_{1}} \cup \cdots \cup H_{y_{n}}) \cup U$. Put $G=\cap_{i=1}^{n} G_{y_{i}}, H=\cup_{i=1}^{n} H_{y_{i}}$. Then $G$ is open in $X$, $H$ is open in $Y$ and $(x,y) \in G \times H \subset (X \times Y)-G(f)$.
If $G \cap f^{-1}(H) \ne \emptyset$, then there exists $a \in G \cap f^{-1}(H) \Rightarrow (a,f(a)) \in G \times H, (a,f(a)) \in G(f)$.(contradiction that $G \times H \subset (X \times Y)-G(f)$). Hence $G \cap f^{-1}(H) = \emptyset$.
Since $X=f^{-1}(Y)=f^{-1}(U \cup H)=f^{-1}(U) \cup f^{-1}(H)$, $x \in G \subset f^{-1}(U)$.
$x$ is arbitrary, $f: X \to Y$ is continuous.
$(\Rightarrow )$ use $Y$ is hausdorff, $(\Leftarrow)$ use $Y$ is compact. But not use $X$ is hausdorff both.
Why need condition $X$ is hausdorff?
Thank you for read my question.