TITLE: Need a hint: prove that $[0, 1]$ and $(0, 1)$ are not homeomorphic
QUESTION [5 upvotes]: I need a hint: prove that $[0, 1]$ and $(0, 1)$ are not homeomorphic without referring to compactness. This is an exercise in a topology textbook, and it comes far earlier than compactness is discussed.
So far my only idea is to show that a homeomorphism would be monotonic, so it would define a poset isomorphism. But the can be no such isomorphism, because there are a minimal and a maximal elements in $[0, 1]$, but neither in $(0, 1)$. However, this doesn't seem like an elemenary proof the book must be asking for.

REPLY [2 votes]: $\text{id}_{(0,1)}$ has no maximum (easy)
Every continuous function $f$ on $[0,1]$ has a maximum, otherwise pick $x_n$ such that $f(x_n)>\text{sup}f([0,1])-\frac{1}{n}$ for all $n$. Then Bolzano-Weierstraß does it.