# Extended real number line

In mathematics, the extended real number system is obtained from the real number system $\mathbb {R}$ by adding two elements denoted $+\infty$ and $-\infty$ that are respectively greater and lower than every real number. This allows for treating the potential infinities of infinitely increasing sequences and infinitely decreasing series as actual infinities. For example, the infinite sequence $(1,2,\ldots )$ of the natural numbers increases infinitively and has no upper bound in the real number system (a potential infinity); in the extended real number line, the sequence has $+\infty$ as its least upper bound and as its limit (an actual infinity). In calculus and mathematical analysis, the use of $+\infty$ and $-\infty$ as actual limits extends significantly the possible computations. It is the Dedekind–MacNeille completion of the real numbers.
The extended real number system is denoted ${\overline {\mathbb {R} }}$, $[-\infty ,+\infty ]$, or $\mathbb {R} \cup \left\{-\infty ,+\infty \right\}$. When the meaning is clear from context, the symbol $+\infty$ is often written simply as $\infty$.
There is also a distinct projectively extended real line where $+\infty$ and $-\infty$ are not distinguished, i.e., there is a single actual infinity for both infinitely increasing sequences and infinitely decreasing sequences that is denoted as just $\infty$ or as $\pm \infty$.

## Motivation
### Limits

The extended number line is often useful to describe the behavior of a function $f$ when either the argument $x$ or the function value $f$ gets "infinitely large" in some sense. For example, consider the function $f$ defined by
    $f(x)={\frac {1}{x^{2}}}$.
The graph of this function has a horizontal asymptote at $y=0$. Geometrically, when moving increasingly farther to the right along the $x$-axis, the value of 1/x$^2${\textstyle {1}/{x^{2}}} approaches 0. This limiting behavior is similar to the limit of a function lim$_{x→x0}$f(x){\textstyle \lim _{x\to x_{0}}f(x)} in which the real number $x$ approaches $x_{0},$ except that there is no real number that $x$ approaches when $x$ increases infinitely. Adjoining the elements $+\infty$ and $-\infty$ to $\mathbb {R}$ enables a definition of "limits at infinity" which is very similar to the usual defininion of limits, except that $|x-x_{0}|<\varepsilon$ is replaced by $x>N$ (for $+\infty$) or $x<-N$ (for $-\infty$). This allows proving and writing
    ${\begin{aligned}\lim _{x\to +\infty }{\frac {1}{x^{2}}}&=0,\\\lim _{x\to -\infty }{\frac {1}{x^{2}}}&=0,\\\lim _{x\to 0}{\frac {1}{x^{2}}}&=+\infty .\end{aligned}}$

### Measure and integration

In measure theory, it is often useful to allow sets that have infinite measure and integrals whose value may be infinite.
Such measures arise naturally out of calculus. For example, in assigning a measure to $\mathbb {R}$ that agrees with the usual length of intervals, this measure must be larger than any finite real number. Also, when considering improper integrals, such as
    $\int _{1}^{\infty }{\frac {dx}{x}}$
the value "infinity" arises. Finally, it is often useful to consider the limit of a sequence of functions, such as
    $f_{n}(x)={\begin{cases}2n(1-nx),&{\mbox{if }}0\leq x\leq {\frac {1}{n}}\\0,&{\mbox{if }}{\frac {1}{n}}<x\leq 1\end{cases}}$.
Without allowing functions to take on infinite values, such essential results as the monotone convergence theorem and the dominated convergence theorem would not make sense.

## Order and topological properties

The extended real number system ${\overline {\mathbb {R} }}$, defined as $[-\infty ,+\infty ]$ or $\mathbb {R} \cup \left\{-\infty ,+\infty \right\}$, can be turned into a totally ordered set by defining $-\infty \leq a\leq +\infty$ for all $a\in {\overline {\mathbb {R} }}$. With this order topology, ${\overline {\mathbb {R} }}$ has the desirable property of compactness: Every subset of ${\overline {\mathbb {R} }}$ has a supremum and an infimum (the infimum of the empty set is $+\infty$, and its supremum is $-\infty$). Moreover, with this topology, ${\overline {\mathbb {R} }}$ is homeomorphic to the unit interval $[0,1]$. Thus the topology is metrizable, corresponding (for a given homeomorphism) to the ordinary metric on this interval. There is no metric, however, that is an extension of the ordinary metric on $\mathbb {R}$.
In this topology, a set $U$ is a neighborhood of $+\infty$ if and only if it contains a set $\{x:x>a\}$ for some real number $a$. The notion of the neighborhood of $-\infty$ can be defined similarly. Using this characterization of extended-real neighborhoods, limits with $x$ tending to $+\infty$ or $-\infty$, and limits "equal" to $+\infty$ and $-\infty$, reduce to the general topological definition of limits—instead of having a special definition in the real number system.

## Arithmetic operations

The arithmetic operations of $\mathbb {R}$ can be partially extended to ${\overline {\mathbb {R} }}$ as follows:
    ${\begin{aligned}a\pm \infty =\pm \infty +a&=\pm \infty ,&a&\neq \mp \infty \\a\cdot (\pm \infty )=\pm \infty \cdot a&=\pm \infty ,&a&\in (0,+\infty ]\\a\cdot (\pm \infty )=\pm \infty \cdot a&=\mp \infty ,&a&\in [-\infty ,0)\\{\frac {a}{\pm \infty }}&=0,&a&\in \mathbb {R} \\{\frac {\pm \infty }{a}}&=\pm \infty ,&a&\in (0,+\infty )\\{\frac {\pm \infty }{a}}&=\mp \infty ,&a&\in (-\infty ,0)\end{aligned}}$
For exponentiation, see Exponentiation § Limits of powers. Here, $a+\infty$ means both $a+(+\infty )$ and $a-(-\infty )$, while $a-\infty$ means both $a-(+\infty )$ and $a+(-\infty )$.
The expressions $\infty -\infty$, $0\times (\pm \infty )$, and $\pm \infty /\pm \infty$ (called indeterminate forms) are usually left undefined. These rules are modeled on the laws for infinite limits. However, in the context of probability or measure theory, $0\times \pm \infty$ is often defined as 0.
When dealing with both positive and negative extended real numbers, the expression $1/0$ is usually left undefined, because, although it is true that for every real nonzero sequence $f$ that converges to 0, the reciprocal sequence $1/f$ is eventually contained in every neighborhood of $\{\infty ,-\infty \}$, it is not true that the sequence $1/f$ must itself converge to either $-\infty$ or $\infty .$ Said another way, if a continuous function $f$ achieves a zero at a certain value $x_{0},$ then it need not be the case that $1/f$ tends to either $-\infty$ or $\infty$ in the limit as $x$ tends to $x_{0}$. This is the case for the limits of the identity function $f(x)=x$ when $x$ tends to 0, and of $f(x)=x^{2}\sin \left(1/x\right)$ (for the latter function, neither $-\infty$ nor $\infty$ is a limit of $1/f(x)$, even if only positive values of $x$ are considered).
However, in contexts where only non-negative values are considered, it is often convenient to define $1/0=+\infty$. For example, when working with power series, the radius of convergence of a power series with coefficients $a_{n}$ is often defined as the reciprocal of the limit-supremum of the sequence $\left(|a_{n}|^{1/n}\right)$. Thus, if one allows $1/0$ to take the value $+\infty$, then one can use this formula regardless of whether the limit-supremum is 0 or not.

## Algebraic properties

With the arithmetic operations defined above, ${\overline {\mathbb {R} }}$ is not even a semigroup, let alone a group, a ring or a field as in the case of $\mathbb {R}$. However, it has several convenient properties:
* $a+(b+c)$ and $(a+b)+c$ are either equal or both undefined.
* $a+b$ and $b+a$ are either equal or both undefined.
* $a\cdot (b\cdot c)$ and $(a\cdot b)\cdot c$ are either equal or both undefined.
* $a\cdot b$ and $b\cdot a$ are either equal or both undefined
* $a\cdot (b+c)$ and $(a\cdot b)+(a\cdot c)$ are equal if both are defined.
* If $a\leq b$ and if both $a+c$ and $b+c$ are defined, then $a+c\leq b+c$.
* If $a\leq b$ and $c>0$ and if both $a\cdot c$ and $b\cdot c$ are defined, then $a\cdot c\leq b\cdot c$.
In general, all laws of arithmetic are valid in ${\overline {\mathbb {R} }}$ as long as all occurring expressions are defined.

## Miscellaneous

Several functions can be continuously extended to ${\overline {\mathbb {R} }}$ by taking limits. For instance, one may define the extremal points of the following functions as:
    $\exp(-\infty )=0$,
    $\ln(0)=-\infty$,
    $\tanh(\pm \infty )=\pm 1$,
    $\arctan(\pm \infty )=\pm {\frac {\pi }{2}}$.
Some singularities may additionally be removed. For example, the function $1/x^{2}$ can be continuously extended to ${\overline {\mathbb {R} }}$ (under some definitions of continuity), by setting the value to $+\infty$ for $x=0$, and 0 for $x=+\infty$ and $x=-\infty$. On the other hand, the function $1/x$ cannot be continuously extended, because the function approaches $-\infty$ as $x$ approaches 0 from below, and $+\infty$ as $x$ approaches 0 from above, i.e., the function not converging to the same value as its independent variable approaching to the same domain element from both the positive and negative value sides.
A similar but different real-line system, the projectively extended real line, does not distinguish between $+\infty$ and $-\infty$ (i.e. infinity is unsigned). As a result, a function may have limit $\infty$ on the projectively extended real line, while in the extended real number system only the absolute value of the function has a limit, e.g. in the case of the function $1/x$ at $x=0$. On the other hand, on the projectively extended real line, $\lim _{x\to -\infty }{f(x)}$ and $\lim _{x\to +\infty }{f(x)}$ correspond to only a limit from the right and one from the left, respectively, with the full limit only existing when the two are equal. Thus, the functions $e^{x}$ and $\arctan(x)$ cannot be made continuous at $x=\infty$ on the projectively extended real line.