TITLE: How to describe the one point compactification of a space
QUESTION [9 upvotes]: In my Topology course we defined the one point compactification of a Hausdorff space $\left(X,\tau\right) $ to be a compact Hausdorff space $\left(Y,\tau^{'}\right)
 $ such that $X\subseteq Y$, $\tau\subseteq\tau^{'}$ and $\left|Y\backslash X\right|=1
$.
More specifically one such construction is given by taking $Y=X\cup\left\{ \infty\right\}$ and defining: $$\tau^{'}=\tau\cup\left\{ U\subseteq Y\;|\;\infty\in U\:\wedge\; Y\backslash U\;\mbox{is compact}\right\}$$
That is all nice and well but it gives me no clue whatsoever as to how to find a "nice representation" to the one point compactification of a given space. In particular I need to describe an embedding in $\mathbb{R}^{n}$ of the one point compactifications of each of the following:

$\left[0,1\right]$
$\left(0,1\right)$
$\mathbb{N}$

Help would be greatly appreciated.
EDIT: I just noticed there was another section to the question about the compactification of $X=\left(0,1\right)\times\left\{ 0,1\right\}$. Since this is all in the subspace topology of $\mathbb{R}^{2}$ which is metric I find it more convenient to use the "heuristic" of trying to answer the questions "what are the sequences in $X$ that don't converge in $X$ and how to add one point to the space so all those sequences would converge to it". In the case of $\left(0,1\right)$ the answer was folding the line segement into a circle. In this case since I essentially have two parallel "line segments" in $\mathbb{R}^{2}$ it would seem the nicest way to achieve what I want would be to fold them both into an $8$ shape but I can't really see what sort of mapping would do that for me...
EDIT 2: I tried tackling the problem in another way, instead of trying to fold $\left(0,1\right)\times\left\{ 0\right\}$ upwards and $\left(0,1\right)\times\left\{ 1\right\}$ downwards to form two ellipses with one point in common I decided to copy $\left(0,1\right)\times\left\{ 0\right\}$ and $\left(0,1\right)\times\left\{ 1\right\}$ into two circles with one point $\left(0,0\right)$ in common, I did this using the following mapping: $$f\left(x,y\right)=\begin{cases}
\left(\sin\left(2\pi x\right),\cos\left(2\pi x\right)-1\right) & \left(x,y\right)\in\left(0,1\right)\times\left\{ 0\right\} \\
\left(\sin\left(2\pi x\right),1-\cos\left(2\pi x\right)\right) & \left(x,y\right)\in\left(0,1\right)\times\left\{ 1\right\} 
\end{cases}$$
If I'm not mistaken this should be a homeomorphism between $X$ and the union of two circles of radius 1, one centered at $\left(0,-1\right)$ and one at $\left(0,1\right)$  minus the point $\left(0,0\right)$. Then the one point compactification of said union would be obtained by adding the point $\left(0,0\right)$ (the union of the circles is closed as the union of two closed sets and is also bounded and thus compact by Heine-Borel theorem). This compactification would be in turn homeomorphic to the compactification of $X$.
Could someone confirm if this train of thought indeed arrives at its intended destination?

REPLY [5 votes]: The first thing you have to do to identiify the one-point compactification is to uidentify the compact subsets of the space in question.

$[ 0 , 1 ]$ is a compact (Hausdorff) space, and so we know that the compact sets are simply the closed subsets of $[0,1]$.  Therefore if $[ 0 , 1 ] \cup \{ * \}$ is the one-point compactification of $[0,1]$, then the open neighbourhoods of $*$ look like $\{ * \} \cup U$ where $U$ is any open subset of $[0,1]$.  In particular, as $\varnothing$ is a open subset of $[0,1]$ it follows that $\{ * \} \cup \varnothing = \{ * \}$ is an open nieghbourhood og $*$ in $[0,1] \cup \{ * \}$; i.e., $*$ is an isolated point in $[ 0,1 ] \cup \{ * \}$.
$(0,1)$ is actually homeomorphic to the real line $\mathbb{R}$, and so it doesn't hurt to instead consider the one-point compactification of $\mathbb{R}$.  By the Heine-Borel Theorem the compact subsets of $\mathbb{R}$ are the bounded closed sets.  In particular, every compact subset of $\mathbb{R}$ is a subset of a compact set $[a,b]$ for $a < b$.  It follows that the sets of the form $( b , + \infty ) \cup \{ * \} \cup ( - \infty , b )$ (where $a < b$) form a basis for the open neighbourhoods of $*$ in the one-point compactification.
$\mathbb{N}$ is a discrete space, and so the compact subsets are the finite subsets.  In particular, every compact set is a subset of a set of the form $[n] = \{ 0 , \ldots , n \}$ where $n \in \mathbb{N}$.  It follows that a basis of the open neighbourhoods of $*$ in the one-point compactification consists of all sets of the form $\{ n+1 , n+2 , \ldots \} \cup \{ * \}$ where $n \in \mathbb{N}$.