Proof (graph of continuous function is a homeomorphic to domain)

Let $X$ and $Y$ be topological spaces. Recall that with the product topology, a function $g: Z\to X\times Y$ is continuous iff the projections $π_X\circ g: Z \to X$ and $π_Y \circ g : Z\to Y$ are both continuous.

For any continuous function $f: X\to Y$, its graph $$ \begin{align*} Γ_f = \sb{(x, f(x))}{x\in X} \end{align*} $$ is homeomorphic to $X$ via $$ \begin{align*} ϕ: X &\to Γ_f \\ x &\mapsto (x,f(x)). \end{align*} $$ Indeed, $ϕ$ is continuous because both projections $x\mapsto x$ and $x\mapsto f(x)$ are continuous, and the inverse $(x,y) \mapsto x$ is a projection map and thus is continuous.