Sets $[a,b]$ not homeomorphic to $(a,b)$ on the real line with standard topology I've seen a proof to this statement using connectivity.
It goes something like this: if two sets have homeomorphism between them, connectivity of one implies the connectivity of the other. That's fine.
Now the proof says that since $[a,b]$  has $2$ points we can remove and it will still be connected (true) while $(a,b)$ has none (also true).
What I can't figure out is how that proves they aren't homeomorphic?

If a set $X$ is homeomorphic to $Y$ via a homeomorphism $f$ and we remove a point $x$ from $X$, then $X\setminus \{x\}$ is also homeomorphic to $Y\setminus \{f(x)\}$.
Therefore, if $[a,b]$ is homeomorphic to $(a,b)$, there must exist some point $y\in (a,b)$ such that $(a,b)\setminus \{y\}$ is homeomorphic to $[a,b]\setminus \{a\} = (a,b]$.
But obviously, such a point does not exist (because of the arguments above), so there is no homeomorphism.

This kind of reasoning is very common not only in topology, but in mathematics in general. In order to prove $X$ is not homeomorphic to $Y$, you need to find some property $X$ which translates through homeomorphisms (compactness, connectedness, $T_1$, $T_2,\dots$) and then prove that $X$ has the property and $Y$ does not.
