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
\lim_{x \to a}x \to 0^{+}\lim_{x \to \infty}\lim_{n \to \infty} a_n\lim\limits_{x \to 0}\to, \rightarrow\mapsto is not.The commands
\to as the approach arrow. \lim_{x \to 0} f(x)
\lim_{x \to 0^+} f(x)
\lim_{x \to 0^-} f(x)
\lim_{x \to \infty} \frac{1}{x}
\lim_{x \to -\infty} e^x
\lim_{n \to \infty} a_n = L
x \mapsto x^2
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}
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
\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}
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\tois the shorter, conventional command. Both render, but\tois what most texts use. - Putting the approach statement in a superscript instead of a subscript.
- Expecting
\limto sit inline with small text under it. In display maths the subscript drops below the operator, which is correct. - Typing
infinityas a word. It is\infty, and it is a symbol.
Questions about this notation
What is the difference between \to and \rightarrow?
\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?
\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?
\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?
\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.