Limits in LaTeX: \lim, \to and Infinity

Writing lim with its approach statement, the arrow commands, one-sided variants and how infinity behaves as a bound.

A limit is \lim with a subscript giving the variable and what it approaches. The operator is deliberately built so that subscript goes below it in displayed maths, which is the behaviour that surprises people first — and the reason \lim and a plain italic lim are not interchangeable. For what happens after the limit, see Derivatives; for the arrows themselves, Arrows.

Which one to use

Situation Write this Because
Two-sided limit
\lim_{x \to a}
The subscript carries variable and target together.
From above or below
x \to 0^{+}
A superscript sign on the target, not on lim.
At infinity
\lim_{x \to \infty}
Infinity is a symbol, not a number.
A sequence limit
\lim_{n \to \infty} a_n
Same command; the index is n.
Kept below lim inline
\lim\limits_{x \to 0}
Display placement inside a sentence.
The arrow as prose
\to, \rightarrow
Synonyms here — but \mapsto is not.

The commands

What Type this Renders as
Ordinary limit The standard form, with \to as the approach arrow.
\lim_{x \to 0} f(x)
\lim_{x \to 0} f(x)
Right-hand limit A superscript plus on the value, read as approaching from above.
\lim_{x \to 0^+} f(x)
\lim_{x \to 0^+} f(x)
Left-hand limit The mirror case.
\lim_{x \to 0^-} f(x)
\lim_{x \to 0^-} f(x)
At infinity Infinity is a symbol, not a number you can subscript with a word.
\lim_{x \to \infty} \frac{1}{x}
\lim_{x \to \infty} \frac{1}{x}
Negative infinity The minus sits directly against the symbol.
\lim_{x \to -\infty} e^x
\lim_{x \to -\infty} e^x
Sequence limit Integer-indexed sequences conventionally use n.
\lim_{n \to \infty} a_n = L
\lim_{n \to \infty} a_n = L
Mapping arrow Used inside a limit statement to show where the variable is sent.
x \mapsto x^2
x \mapsto x^2
Approves / equals-approves Monotone increase and approximation; both read naturally in a limit argument.
a_n \nearrow \infty \quad x \approx 3.14
a_n \nearrow \infty \quad x \approx 3.14

Worked examples

The exponential derivative at a point

f'(a) = \lim_{h \to 0} \frac{f(a+h)-f(a)}{h}
f'(a) = \lim_{h \to 0} \frac{f(a+h)-f(a)}{h}

A limit wrapped around a fraction — the two constructs you will use together most.

Euler number

e = \lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n
e = \lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n

\left and \right resize the brackets to whatever is inside them.

A divergent limit

\lim_{x \to 0} \frac{1}{x} = \text{does not exist}
\lim_{x \to 0} \frac{1}{x} = \text{does not exist}

Text inside maths needs \text{} so it is set upright instead of as a product of variables.

Common mistakes

  • Writing \lim_{x \rightarrow 0} everywhere when \to is the shorter, conventional command. Both render, but \to is what most texts use.
  • Putting the approach statement in a superscript instead of a subscript.
  • Expecting \lim to sit inline with small text under it. In display maths the subscript drops below the operator, which is correct.
  • Typing infinity as a word. It is \infty, and it is a symbol.

Questions about this notation

What is the difference between \to and \rightarrow?
Nothing in the glyph produced. \rightarrow is the long name, \to is the short alias, and most authors use \to inside limits because it keeps the source readable.
How do I write a limit that goes below the word lim?
You already have it: \lim_{x \to 0} places the subscript below in display maths. Inline, it sits to the right, which is by design.
Can I use \infty as an exponent?
Yes, e^{+\infty} and \lim_{x \to \infty} are both fine. Infinity is an ordinary symbol as far as LaTeX is concerned.
How do I write “x tends to infinity”, and why do my limits move?
The standard command is \to: \lim_{x \to \infty} f(x). \longrightarrow is the same relation with a longer arrow, mostly used in prose proofs. Where the limit goes is style, not content: in display maths it sits under \lim, inline it moves to the right so it cannot stretch the line. \lim\limits forces the under form and \lim\nolimits the side form.

Keep reading

Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.