Show that $I$ and $\mathbb{R}$ are contractible.
A space $X$ is said to be contractible if the identity map $i_X:X\to X$ is nulhomotopic.
If $i_I$ is the identity function of $I:=[0,1]$ in $I$, could I consider the homotopy $H:I\times I\to I$ such that $H(x,t)=tx$, and so the identity function would be homotopic to the zero constant function and with this would it be ready? Does the same function serve to show that $\mathbb{R}$ is contractible? Thank you very much.