All guides

Limit in LaTeX

Updated:

A limit is written with \lim, and the condition goes in the subscript with the arrow \to. In display math the condition is placed under the word lim.

Limit of a function

\lim_{x \to 0} \frac{\sin x}{x} = 1
lim⁡x→0sin⁡xx=1\lim_{x \to 0} \frac{\sin x}{x} = 1

\lim is an operator: upright, with the condition placed underneath in display math. \to draws the arrow read as "tends to".

Copying this from handwritten notes? Snap a photo of the page and CamteX turns the formulas into LaTeX. Try it free

Limit of a sequence

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

\infty is the infinity sign. The \left( \right) pair grows with the fraction inside, which plain brackets would not do.

One-sided limit

\lim_{x \to 0^{+}} \ln x = -\infty
lim⁡x→0+ln⁡x=−∞\lim_{x \to 0^{+}} \ln x = -\infty

The sign in the superscript, 0^{+} or 0^{-}, says from which side x approaches. Some textbooks write x \searrow 0 for a limit from above.

Limit inside a sentence

$\lim_{x \to 0} f(x)$
lim⁡x→0f(x)\textstyle \lim_{x \to 0} f(x)

In running text the condition moves to the side of lim to keep the line height even. \lim\limits_{x \to 0} forces it underneath when you really need it.

Several conditions

\lim_{\substack{x \to 0 \\ y \to 0}} f(x, y)
lim⁡x→0y→0f(x,y)\lim_{\substack{x \to 0 \\ y \to 0}} f(x, y)

\substack stacks several conditions under lim, as in the limit of a function of two variables.

Upper and lower limits

\limsup_{n \to \infty} a_n, \quad \liminf_{n \to \infty} a_n
lim sup⁡n→∞an,lim inf⁡n→∞an\limsup_{n \to \infty} a_n, \quad \liminf_{n \to \infty} a_n

The limit superior and inferior have their own operators, \limsup and \liminf, set upright with the condition underneath just like \lim.

Common mistakes

See also

Don't want to memorize commands?

Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.

Try it free