My approach :
Suppose there exists such a continuous surjective map.
Then since $[0,1]$ is compact, $SL_2(\Bbb R)$ is also compact.
So essentially what I have to prove is that $SL_n(\Bbb R)$ is compact i.e. closed and bounded.
I know that determinant map is continuous. As $SL_2(\Bbb R)=\det^{-1}\{1\}$ and $\{1\}$ is a closed set, hence $SL_2(\Bbb R)$ is a closed set.
I don't know how to go about boundedness of $SL_2(\Bbb R)$. Nevertheless, if it turns out to be bounded set, then it would mean that such $f$ exists(correct me if I'm wrong here). and if it doesn't, then such a $f$ doesn't exist.
Also how to construct such an $f$ if it does exist?