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
\inftyInfinity ∞.
-\inftyNegative infinity.
\pm\inftyPlus or minus infinity.
(-\infty, \infty)The whole real line as an interval.
\aleph_0Aleph null, the cardinality of the natural numbers.
\lim_{x \to \infty}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.
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
LaTeX\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x = eInfinite series
LaTeX\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}Improper integral
LaTeX\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}Interval
LaTeXx \in (-\infty, 0] \cup [1, \infty)Divergence
LaTeX\lim_{x \to 0^+} \frac{1}{x} = +\inftyExtended real line
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
\infinityor\infincommand; LaTeX reports "Undefined control sequence".Instead of\infinityWrite\infty\infexists but prints "inf", the infimum operator, not the ∞ symbol.Instead of\infWrite\inftyAn 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
\inftyworks in any document without packages;\alephis built in as well.MathJax and KaTeX
MathJax and KaTeX render
\infty,\aleph_0and the limit notation exactly as shown.Microsoft Word
In a Word equation, type
\inftyand 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?
\infis the infimum operator and prints the word "inf". The symbol is\infty.
Related LaTeX reference
- Limit in LaTeX\lim_{x \to a}, one-sided limits, limits at infinity, limsup and liminf, and how to keep the condition under lim in running text.
- Summation in LaTeX\sum with limits, why inline sums put the limits beside the sigma, \limits and \displaystyle, and multi-line conditions with \substack.
- Integral in LaTeX\int with lower and upper limits, \iint and \iiint, contour integrals, evaluation bars and the thin space before dx.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
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