Is the graph of a continuous function homeomorphic to its domain?
Solution 1:
If $f: X \to Y$ is continuous, $\Gamma(f)=\{(x,f(x)): x \in X \} \subseteq X \times Y$ is homeomorphic to $X$.
The homeomorphism is the obvious $h: X \to X \times Y$ defined by $h(x)=(x,f(x))$ which is continuous as a map into $X \times Y$ as $\pi_X \circ h = 1_X$ and $\pi_Y \circ h = f$ are both continuous, by the universal mapping property of the product. And by definition $h[X]=\Gamma(f)$.
And the continuous inverse of $h$ is $\pi_X\restriction_{\Gamma(f)}$, which is continuous as the restriction of a continuous map.
Solution 2:
Note that $h$ is a restriction of the projection $\mathbb R^n\times\mathbb R\to\mathbb R^n$, which you can check is continuous. The inverse of $h$ is the map $h^{-1}\colon \mathbb R^n \to \mathbb R^n\times\mathbb R$ given by $x\mapsto(x,f(x))$. Hence $h^{-1} = (\operatorname{id}_{\mathbb R^n}, f)$ and since both $\operatorname{id}_{\mathbb R^n}$ and $f$ are continuous, so is $h^{-1}$.