Prove that $X= \{ (x,y): y = mx + c \}$ is homeomorphic to $\mathbb R$. 
Let $m$ and $c$ be non-zero real numbers and $X$ the subspace of $\mathbb R^2$ given by $X =\{ (x,y): y = mx + c \}$. Prove that $X$ is homeomorphic to $\mathbb R$.

I am struggling to figure out how to define a homeomorphic function between these two sets, can anyone please help?
 A: Hint: It might be easier to prove a more general fact. Let $f\colon X\to Y$ be any continuous function (between arbitary topological spaces). Show that $x\mapsto (x,f(x))$ defines a homeomorphic embedding of $X$ into $X\times Y$.
A: Define the bijection $f : \mathbb R \to X$ by $fx = (x, mx + c)$. Let $(p_n)$ be a convergent sequence in $\mathbb R$ with $p_n \to p$. Then, the sequence $(fp_n) = (p_n, mp_n + c)$ also converges to $(p, mp + c)$. The inverse bijection $f^{-1} : X \to \mathbb R$ is defined by $f(x, mx + c) = x$. So, consider a convergent sequence $(q_n, mq_n + c)$ in $X$ with $(q_n, mq_n + c) \to (q, mq + c) \in X$. It follows that since $(q_n, mq_n + c) \to (q, mq + c)$, the sequence $f^{-1}(q_n,mq_n + c) = (q_n)$ also converges and $q_n \to q$. Hence, $f^{-1}$ preserves sequential convergence, and $f$ so defined is a homeomorphism.
A: Here's a relatively straightforward way to see it.
First note that $\iota :\Bbb R \to \Bbb R\times \{0\}\subset \Bbb R^2$ with the subspace topology is a homeomorphism.
Then, let $m=\tan\theta$ and $A:\Bbb R^2\to \Bbb R^2$ by $(x,y)\mapsto \pmatrix{\cos\theta & -\sin \theta \\ \sin\theta & \cos\theta}\pmatrix{x\\ y}$. A is also a homeomorphism.
Finally let $T_c:\Bbb R^2\to \Bbb R^2$ by $(x,y)\mapsto (x,y+c)$, another homeomorphism.
Altogether $X= T_c(A(\iota(\Bbb R)))$, since $A(\iota(\Bbb R))=\{a(\cos\theta,\sin\theta)\mid a\in \Bbb R\}$ and after applying $T_c$ we get the set $\{(a\cos\theta, a\sin\theta+c)\mid a\in \Bbb R\}$ which satisfies $$y= a\sin\theta + c = a\cos\theta \tan\theta +c= mx+c$$
By appropriate restrictions of the above maps we have a homeomorphism $f:\Bbb R\to X$ with $$f=T_c\bigg|_{X_1} \circ A\bigg|_{X_2}\circ \iota$$ where $X_2=\iota(\Bbb R)$ and $X_1= A(X_2)$.
