A continuous bijection from a Hausdorff space to a non-compact space which is not a homeomorphism Recall the following theorem:

Let $X$ be a compact space and $Y$ a Hausdorff space. Suppose that $f:X \rightarrow Y$ is a continuous bijection. Then f is homeomorphism. 

Prove that the compactness assumption on $Y$ is necessary.
 A: How can we find such an example? Since $f$ is a bijection, we may assume wlog that $X$ and $Y$ are the same set, just with different topologies (and then $f$ is just the identity map). The fact that $f$ is continuous then means that every $Y$-open set is also an $X$-open set. To prevent $f$ from being a homeomorphism, the converse should not hold, i.e. not all $X$-open sets are also $Y$-open. In other words: $X$ must have "more" open sets than $Y$. So why not take as many open sets as possible for $X$? 
Thus let $Y$ be any Hausdorff space and $X$ the same set, but with the discrete topology. This works as an example (unless $Y$ is already discrete, of course - so how about $\mathbb Q$ with its usual topology for $Y$ and discrete topology for $X$?).
By the way, using the discrete topology is a bit of a sledge-hammer here. In principle. you really need just a single additional open set: Let $Y$ be $\mathbb Q$ with standard topology again, let $X$ be the same, but declare $\{0\}$ open. Or, what amounts to the same: Let $X=\mathbb Q\setminus([-1,0)\cup(0,1])$ and let $f(x)=x-\operatorname{sgn}(x)$. - Or, to make things "almost" compact, let $Y=[0,1]$ with standard topology and $X=\{-1\}\cup (0,1]$ with the obviois map (which is the same as letting $X=[0,1]$ but declaring $\{0\}$ open)
