Is it true that every compact subset of $\mathbb{R}$ (with a Euclidean metric) is homeomorphic to a closed and bounded interval? Could anyone please give me a hint about how to start to prove that or a counter-example if it's false? It sounds true, since both sets are compact, but it is hard to construct a bijection between two abstract sets.
Thank you in advance.

Every interval $[a,b]$ for $a< b$ is homeomorphic to $[0,1]$ via $x\mapsto (x-a)/(b-a)$. And therefore any two closed, bounded and non-singleton intervals are homeomorphic.
Now not every compact subset of $\mathbb{R}$ is homeomorphic to a closed and bounded interval. The simpliest example is a subset of two points, e.g. $\{0, 1\}$.
But this is true for connected subsets, i.e. every connected and compact subset of $\mathbb{R}$ is exactly $[a,b]$ for some (possibly equal) $a,b\in\mathbb{R}$. To see that first you need to prove that connected subsets of $\mathbb{R}$ are intervals (meaning convex subsets of $\mathbb{R}$). This can be easily proved by considering non-intervals and a point "inside" that disconnects the subset. Then you note that for an interval to be compact it needs to be of the form $[a,b]$. Which again is not difficult, since it has to be bounded and there are $4$ possibilites for a bounded interval: $(a,b), [a,b), (a,b], [a,b]$.
