Infinity in LaTeX

The infinity symbol ∞ is \infty in math mode: $x \to \infty$. Put a minus sign in front for negative infinity (-\infty) and use it as a limit, bound or interval end like any other symbol.

Infinity commands

  • \infty
    ∞

    Infinity ∞.

  • -\infty
    − ∞

    Negative infinity.

  • \pm\infty
    ± ∞

    Plus or minus infinity.

  • (-\infty, \infty)
    ( − ∞ , ∞ )

    The whole real line as an interval.

  • \aleph_0
    ℵ 0

    Aleph null, the cardinality of the natural numbers.

  • \lim_{x \to \infty}
    lim x → ∞

    Limit as x tends to infinity.

Try it live

Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.

Templates

Infinity examples

Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.

  • Limit at infinity

    lim x → ∞ ( 1 + 1 x ) x = e
    LaTeX
    \lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x = e
  • Infinite series

    ∑ n = 1 ∞ 1 n 2 = π 2 6
    LaTeX
    \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
  • Improper integral

    ∫ − ∞ ∞ e − x 2 d x = π
    LaTeX
    \int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}
  • Interval

    x ∈ ( − ∞ , 0 ] ∪ [ 1 , ∞ )
    LaTeX
    x \in (-\infty, 0] \cup [1, \infty)
  • Divergence

    lim x → 0 + 1 x = + ∞
    LaTeX
    \lim_{x \to 0^+} \frac{1}{x} = +\infty
  • Extended real line

    R ― = R ∪ { − ∞ , + ∞ }
    LaTeX
    \overline{\mathbb{R}} = \mathbb{R} \cup \{-\infty, +\infty\}

Infinity as a limit or bound

Limits and bounds go in subscripts and superscripts: \lim_{n \to \infty}, \sum_{k=0}^{\infty}, \int_0^{\infty}. In displayed equations the bounds sit above and below the operator; inline they move to the side. Add \limits (\sum\limits_{k=0}^{\infty}) to force them above and below in a line of text.

Intervals are written with ordinary brackets: an open end at infinity uses a parenthesis, [0, \infty), because infinity is not a real number that the interval could include.

Infinity in text mode

\infty is a math symbol, so in a sentence write $\infty$. With XeLaTeX or LuaLaTeX and a font that has it, you can also type ∞ directly.

Common mistakes

  • There is no \infinity or \infin command; LaTeX reports "Undefined control sequence".

    Instead of
    \infinity
    Write
    \infty
  • \inf exists but prints "inf", the infimum operator, not the ∞ symbol.

    Instead of
    \inf
    Write
    \infty
  • An interval of real numbers is open at infinity, so the bracket on that side is a parenthesis.

    Instead of
    [0, \infty]
    Write
    [0, \infty)

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    \infty works in any document without packages; \aleph is built in as well.

  • MathJax and KaTeX

    MathJax and KaTeX render \infty, \aleph_0 and the limit notation exactly as shown.

  • Microsoft Word

    In a Word equation, type \infty and press Space for ∞. For limits and sums with infinity, build the formula here and use Copy for Word to paste an editable equation.

Infinity in LaTeX: questions

What is the LaTeX command for infinity?
\infty, used in math mode: $\infty$.
How do I write negative infinity?
Put a minus sign in front: -\infty. For an explicit plus sign write +\infty.
How do I write a limit as x approaches infinity?
Use \lim_{x \to \infty} f(x). In a displayed equation "x → ∞" sits under "lim".
Why does \inf not give me the infinity symbol?
\inf is the infimum operator and prints the word "inf". The symbol is \infty.

Have the formula as a picture?

Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.

Convert an image to LaTeX