TITLE: Is the graph of a continuous function homeomorphic to its domain?
QUESTION [6 upvotes]: Let $f:\mathbb{R}^n\rightarrow\mathbb{R}$ be a continuous real function and we consider its graph identified by the subset: 
$$\mathcal{G}(f)=\{(x,f(x))\in\mathbb{R}^{n+1}:x\in\mathbb{R}^n\}$$
of $\mathbb{R}^{n+1}$ equipped with the usual euclidean topology that induced on $\mathcal{G}(f)$ a subspace topology. Well with these condictions we demonstrate that $\mathcal{G}(f)$ is homeomorphic to $\mathbb{R}^n$. So we consider the function 
$$ h:\mathcal{G}(f)\owns(x,f(x))\rightarrow x\in \mathbb{R}^n$$
since the domain of $f$ is $\mathbb{R}^n$, clearly $h$ is surjective on $\mathbb{R}^n$ and then is also injective because if $h(x,f(x))=h(y,f(y))$ then $x=y$; now to prove the assertion we have to demonstrate of that $h$ and $h^{-1}$ are continuous funcion or that $h$ is open and continuous, but unfortunately I'm not be able to do this so can someone help me?

REPLY [8 votes]: 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.