I want to check those metrics in which the set $R$ of real numbers is compact! Note that if that metric is induced from a norm, then R with that metric is not compact.
The metric d(x,y)=|arctan(x)-arctan(y)| is a compact metric on the extended real number line where plus and minus infinity are viewed as actual endpoints of the space. In this metric, every unbounded sequence has a convergent subsequence. Thus, every sequence has a convergent subsequence. This is sequential compactness but that is equivalent to compactness in metric spaces. Removing plus and minus infinity makes this metric incomplete. I don't know off the top of my head an explicit compact metric for just the real line.
The same problem in [0,2\pi[ is solved by the map f(t)=\exp( i t) which is a bijection from the half-open interval onto the unit circle. In the case of the open interval I=]0,4\pi[ one can take f(t)=\exp (i t) for 0
Isn't this part of the question about which sets are compactly metrizable? The question has been completely settled by Rodrigo. For the present case, R can be mapped bijectively onto [0,1], say. Transfer the natural metric on [0,1] over.
This question may be formulated as a question of metrisable compactification of a real line, that is, of an injective map of R into a metrisable compact. The smallest such compactification is the one point compactification: the map of R on the unit circle, say
f(t) = exp(i arctan t), combining the ideas of Geoff and Giorgio. Then it follows the 2-point compactification of the kind proposed by Geoff: an injection of R on a segment.
In general, let f be a bounded continuous function on R (say, |f|
One can glue the "ends" of the real line and tie it to the 0. The resulting space (8-figure like) is a metric space with old sequences converging to old limits and new sequences (those running away to infinities in the real line) which converge to 0. One can think of this as a kind of a compact set of real numbers with sequence limits preserved.
Well, you write bijection f: 8 -> R between "8" and R and transport natural metric from R to "8", d_8(x,y) = |f(x)-f(y)|. It is cts from R to 8, i.e. f^{-1}:R->8 is cts (gluing) and f is a homeomorphism after removing 0 from both "8-figure" and R. It's better to draw a picture with ends of R glued to 0. For a simple formula one can build this folding pcw linearly (so that two triangles arise). Of course some "interval -> halfline" tangens-like bijections are necessary.
My first answer would have been to consider a figure 8 in the plane, which corresponds to starting from the 1-point Aleksandrov compactification and then identifying infinity with 0. I think it is the answer of Giorgio METAFUNE.
Another answer is to consider any bijection f from \R onto the unit circle S^{1} in the plane, which exist by Cantor since these two sets have the same cardinal, and then you transport the Euclidean distance \delta in the plane to \R, i.e. define d by d(x,y) = \delta(f(x),f(y)).
So one answer is the figure-8 discussed above. Another - a deformation of the figure 8 - would be to have the two "points" plus infinity and minus infinity identified with two different points in R (instead of both identified with 0). I'm not sure what to call this - one way of drawing it looks like an 'a' perched on top of a 'b'.
Are there any others? (I mean topologically different.)
The answer is affirmative. The function h(x) = x/(1+|x|) is one to one from R onto (-1,1). On the other hand, consider a one to one function g from (-1,1) onto [-1,1]. The composed function f:= (g composed to h) is one to one, from R onto [-1,1]. Then the desired metric one obtains by transporting the usual metric from [-1,1], using f:
d*(x,y):= |f(x)-f(y)|, x,y in R. Obviously, (R, d*) is a compact metric space.
A segment, several joint circles, several joint segments and circles... By Poincare, any topological space which, finitely many points extracted, becomes a union of open intervals.
These are not usually called manifolds ... but anyway usually a compactification is achieved by adding points "at infinity" but here the OP asked the interesting question of compact metrics on R - not on R plus other points, nor on R with some points identified (which could gave a bouquet of 3 circles or more). So what might be possible apart from the figure 8, and a "deformed" figure-8 where the two limiting points are distinct?
Let me attempt to interpret the question precisely: What compact metric spaces X are there with a continuous bijection R \to X? (But of course not a homeomorphiism as R isn't compact).
I would put it: what are totally bounded metric spaces homeomorphic to R?
And my conjecture is: any totally bounded metric space such that, after deleting a countable set of points of no accumulation, becomes a union of sets homeomorphic to an open interval.
I guess what we're trying to get at is a nontrivial interpretation of the original question. If you're asking for bijections only, then you could use any compact metric space of cardinality c to define a compact metric on R. If you confine yourself to continuous bijections, then you're looking for all continua that are continuous bijective images of R. The circle is one; any one--such as the figure '8'-- would have to be locally connected. Another angle on the question is: when can the topology on a continuum be refined to yield the topology on the reals?
I admit to being confused as to what a nontrivial interpretation of the original question might be and was merely responding to one Montaldi proposed, although I didn't really answer his question as I mistakenly claimed, but only gave an example. I chose the slightly more complicated example of the figure "8" over the circle as a continuous bijective image of R, because, in fact, there is no such map to the circle, as a covering space argument shows. Also, continuous bijective images of R need not be locally connected, since there is a "double Warsaw circle" version of the figure "8" onto which R maps bijectively. If one pursues Branston's angle on the question, one is led to another question: what kind of refinements of the topology on a continuum are to be considered? If you mean looking at coarser or finer topologies, then your only option is to make it finer. But this is just Montaldi's interpretation.
To J.L.: Oops, it seems I had the half-open interval in mind--not the reals--when I flippantly claimed the circle is a continuous bijective image of R. As for local connectedness, I'll take your word for it about the "double Warsaw circle." The problem of which continua are continuous bijective images of the reals is pretty tricky. As for my "nontrivial interpretation" usage, I was just referring to the original question: if all you want is some metric on R that gives you a compact topology, then all you need is a compact metric space of cardinality continuum.
Regarding the problem of identifying the continuous bijective images of the real line, there is the paper: Anatole Beck, Jonathan Lewin, Mirit Lewin, On compact one-one continuous images of the real line, Colloq. Math. 23 (1971), 251--256. I don't have access to this paper, but I did read a review on the AMS Math Reviews site. The main result is quite technical, and there does not seem to be a neat characterization. (One necessary condition for a continuum to be such an image is that it is a nested union of arcs--because R is, and a continuous bijection, when restricted to a compact subset, is a homeomorphism. This eliminates the circle, but not the figure '8' curve.)