LatexNotes

Limit (lim) in LaTeX

\lim typesets the upright lim operator; a subscript written with \to states what the variable approaches, as in \lim_{x \to a}. For a limit at infinity write \lim_{x \to \infty}.

LaTeX command

\lim_{x \to a}

Not the symbol you meant? Draw it to find the command →

\lim is a named operator that sets lim upright with correct spacing. The point the variable tends to goes in a subscript, using \to (or \rightarrow) for the arrow: \lim_{x \to a} f(x). For a limit at infinity write \lim_{x \to \infty}, and for a one-sided limit add a sign to the target, or .

Placement of the subscript depends on mode. In displayed math the x to a sits centred beneath lim, which is the standard book form. Inline it appears as a subscript to the right to save vertical space. You can force the underneath position inline by wrapping the expression in \displaystyle.

Related operators follow the same pattern: \limsup and \liminf for the upper and lower limits, \sup and \inf, and \max and \min. All are predefined so they set upright with proper spacing. For a name of your own use \operatorname, or \operatorname* to put the limits underneath.

Other forms

\limsuplimit superior
\liminflimit inferior

Examples

$\lim_{x \to 0} \frac{\sin x}{x} = 1$

a standard limit

$\lim_{x \to \infty} \frac{1}{x} = 0$

a limit at infinity

$\lim_{x \to 0^{+}} \ln x = -\infty$

a one-sided limit

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

the definition of e

$\limsup_{n \to \infty} a_n$

the limit superior

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into clean, compilable LaTeX - graphs and all. Free to try, no sign-up.

Convert your maths to LaTeX →

FAQ

How do I write a limit in LaTeX?

Use \lim with the target in a subscript, for example . \to draws the arrow.

How do I write a limit as x approaches infinity?

Put \infty in the subscript: .

Why is the x to a beside lim instead of underneath?

That is the inline form, which saves vertical space. In displayed math it centres beneath lim; you can force that inline by wrapping the expression in \displaystyle.

See also