Showing that $\mathbb{R}$ is connected knowing that the unit interval is connected. I want to show that $\mathbb{R}$ is connected given  that the unit interval is connected. I only know the definition of connectedness (a space $X$ is connected if the only separations of it are the trivial ones ) and I know that the \sim -equivalence class of $x$ in $X$ is connected where $x \sim y$ iff there is a connected subspace $C \subseteq X$ s.t. $x,y \in C$. Also, I know that the definition of trivial separation is that if $X = U \bigcup V$ then $X=U$ or $X=V.$ and a separation of a space $X$ in general means $X= U \bigcup V$ where $U \bigcap V = \emptyset,$ and $U,V$ are both open in $X.$
My Question is: 
Knowing all the above definitions, still I do not know how to prove that $\mathbb{R}$ is connected through them, could anyone help me in proving this by the above tools?
I know that there is this question here  Showing that $\mathbb{R}$ is connected  but this does not prove the statement by the tools I want.   
 A: Suppose that $\mathbb R$ is not connected. Then, as you know, you can write $\mathbb R$ as $U\cup V$, where $U\cap V=\emptyset$ and $U$ and $V$ are non-empty open subsets of $\mathbb R$. Take $a\in U$ and $b\in V$. Since $U\cap V=\emptyset$, $a\neq b$. I will assume that $a<b$. Then $[a,b]$ is disconnected, because $[a,b]\cap U$ and $[a,b]\cap V$ are non-empty open subsets of $[a,b]$ whose intersection is empty and whose union is $[a,b]$. But this is impossibile, since $[a,b]$ and $[0,1]$ are homeomorphic (consider the map from $[0,1]$ into $[a,b]$ defined by $x\mapsto a+x(b-a)$) and $[0,1]$ is connected.
A: There are multiple ways to do that, e.g.


*

*If "unit interval" $I$ means either $(0,1)$ or $[0,1)$ or $(0,1]$ then there is a continuous surjection $f:I\to\mathbb{R}$. For $(0,1)$ it is a variant of $\tan(x)$, for two others a variant of $x\sin(\tan(x))$. But this approach does not work for $[0,1]$.

*Another way is to realize that if $\{C_i\}$ is a collection of connected subsets such that $\bigcap C_i\neq\emptyset$ then $\bigcup C_i$ is connected (see here). With that you can take the collection $\{[-t,t]\}_{t\geq 1}$.
