The one-point compactification of consists of together with a single point which we can call . The topological structure is that of the discrete topology on ; and the open neighbourhoods of are by definition the complements of the compact subsets of . The compact subsets of are the finite subsets, so the neighbourhoods of are the sets with finite complement.

The map (where is interpreted as 0) takes this space to the set , and you can check that it preserves the topology (because the points 1/n are all isolated, and the neighbourhoods of 0 are exactly the sets with finite complement).