Can a metric be evaluated at infinity? I just stared a new math course, and we began by reviewing metric spaces. The professor gave us the set $X = (-\infty,\infty)   $ , so all real numbers, and asked us to come up with any metric for it. When we suggested $|x-y|$, the simplest we could think of, he said that we were wrong because this failed to work for infinity. His alternative was a metric defined by $arctan|x-y|$ as this would return a non-infinite value when $+\infty$ or $-\infty$ was used for $x$ or $y$. This really confused me since I've taken a course on Real Analysis and this notion was never once mentioned. Also, it doesn't make sense for me intuitively since you can't "plug in infinity" since infinity is a concept, not a number. Thoughts?
On $\mathbb{R} = (-\infty, \infty)$, the function defined by $d(x,y) = |x - y|$ is certainly a metric. It's called the Euclidean metric.

For the extended reals $\overline{\mathbb{R}} = [-\infty, \infty]$, the same definition does not yield a metric since a metric must evaluate to a finite number. In this case, you need to modify your definition to something like $d(x,y) = \arctan|x-y|$.
You must think that $\infty$ and $-\infty$ are indeed points and they are not just concepts. Your professor is asking about a metric on $X$ that preserve the usual topology on $\mathbb{R}$ and such that preserve our usual understanding about infinities, I mean that $-\infty&lt;x&lt;\infty$. The trick is to find some continuos subadditive (think about triangular inequality) increasing function $f$ on $[0,\infty]$ such that $\lim_{x\rightarrow\infty} f(x)$ exists and is finite. Then every infinite point has finite distance to each other point.