Exercise: Let $(X,\tau_1)$ and $(Y,\tau_2)$ be topological spaces and $f:(X,\tau_1)\to (Y,\tau_2)$ a continuous map. If $f$ is one-to-one, prove that $(Y,\tau_2)$ Hausdorff implies $(X,\tau_1)$ Hausdorff.
Attempted proof:
As $f$ is continuous and bijective $\exists \ x_1,x_2$ such that $x_1\neq x_2$ then $f(x_1)=y_1$ and $f(x_2)=y_2$ and $y_1\neq y_2$.
As $(Y,\tau_2)$ is Hausdorff $\exists \ U,V\in\tau_2$ such that $y_1\in U$ and $y_2\in V$ and $U\cap V=\emptyset$. As $f$ is continuous and bijective $f^{-1}(y_1)=x_1\in f^{-1}(U)\in\tau_1$ and $f^{-1}(y_2)=x_2\in f^{-1}(V)\in\tau_1$.
By the fact that $(Y,\tau_2)$ is Hausdorff and $\emptyset$ is open.
$\emptyset=f^{-1}(U\cap V)=f^{-1}(U)\cap f^{-1}(V)=$ such that $y_1\in f^{-1}(U)$ and $y_2\in f^{-1}(V)$. Then $(X,\tau_1)$ is Hausdorff.
Questions:
Is my proof right? If not. Why? What could be alternative proofs?
Thanks in advance!
This is wrong from the start. What you are supposed to prove is that for any two distinct elements $x_1,x_2\in X$, there are open sets $U_1$ and $U_2$ such that $x_1\in U_1$, $x_2\in U_2$, and $U_1\cap U_2=\emptyset$. Take open sets $V_1,V_2$ in $Y$ such that $f(x_1)\in V_1$, $f(x_2)\in V_2$ and $V_1\cap V_2=\emptyset$; such sets exist, since $Y$ is Hausdorff and $f$ is injective. Now, let $U_1=f^{-1}(V_1)$ and let $U_2=f^{-1}(V_2)$. Then $x_1\in U_1$, $x_2\in U_2$ and, since $f$ is continuous, $U_1$ and $U_2$ are open. And, since $V_1\cap V_2=\emptyset$, $U_1\cap U_2=\emptyset$ too.
Note that the fact that $f$ is surjective is irrelevant.