20

How can I denote a limit in LaTeX, such as $f(n) \rightarrow_{n \rightarrow \infty} 0$ ?

And when I have a fraction and so on and I want to use an absolute value $| \frac{x}{y}|$, how can I make the $|$ signs much bigger (similarly to \left( and \right)) ?

5 Answers 5

22

For the first question, you can typeset limits using the \lim command:

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

\[ \lim_{x\to\infty}\frac{1}{x} \]

For the second question, the \left, \middle and \right commands can be used to achieve vertical extension of some delimiters:

\[ \left\lvert\frac{1}{2} \right\rvert \]

To obtain fine control on the size of extensible delimiters there are also the following command groups (which in some circumstances, must replace the \left \middle \right construct):

\bigl - \bigm - \bigr
\Bigl - \Bigm - \Bigr
\biggl - \biggm - \biggr
\Biggl - \Biggm - \Biggr

These groups provide delimiters of increasing sizes; the first column gives four sizes of opening symbols; the second column gives four sizes of relation symbols, and the third column gives four sizes of closing symbols..

There are some cases in which the above commands should replace the \left, \right ones: when the latter produce delimiters which are too big, and when there are several delimiters together. Compare the result of

\[ \left\lvert\lvert x\rvert -\lvert y\rvert \right\rvert \]

and

\[ \bigl\lvert\lvert x\rvert -\lvert y\rvert \bigr\rvert \]

In the first case, the inner and outer delimiters have the same size and the result can be ambiguous; in the second case, the outer delimiters are bigger, improving readability.

18

Use the \DeclarePairedDelimiter command from the mathtools package. It has a lot of other usefull stuff also (one of those must have toolboxes)

\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
\begin{document}
\[
  \abs{\frac{x}{y}}        \quad  % same as \lvert\frac{x}{y}\rvert
  \abs[\Big]{\frac{x}{y}}  \quad  % same as \Bigl|\frac{x}{y}\Bigr|
  \abs*{\frac{x}{y}}              % same as \left|\frac{x}{y}\right|
\]
\end{document}

enter image description here

3
  1. $\lim_{n \rightarrow \infty} f(n)=0$
  2. $\bigl|A\bigr|$, $\biggl|AA\biggr|$, $\Biggl|AA\Biggr|$, $\left|AA\right|$...
3

Probably you need amsmath's \xrightarrow: after \usepackage{amsmath} you can say

f(n) \xrightarrow{n\to\infty} 0

The condition will go above the arrow, which will be extended to accommodate the condition. If you want the condition below the arrow, use the optional argument:

f(n) \xrightarrow[n\to\infty]{} 0

(don't forget the trailing pair of braces). Follow Gonzalo regarding the absolute value.

2
  • I always use $\xrightarrow{\scriptscriptstyle\!\!n\rightarrow\infty}$, but this is too tall and increases the skip between lines (ugly). How can I lower the position (closer to the arrow) and further decrease the font size of $\scriptscriptstyle\!\!n\rightarrow\infty$?
    – Leo
    Commented Aug 1, 2011 at 20:51
  • @Leon: maybe a new question is appropriate.
    – egreg
    Commented Aug 1, 2011 at 21:51
0

As for your first question, I think you're looking for

\overset{n\to\infty}{\longrightarrow}

instead of the suggestions of the other answers. What they state is correct notation, but not what you described. I'm not saying this is the best solution though, the explicit limit is nicer in most cases.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .