[Tex/LaTex] how to write a limit and how to use large absolute value

math-mode

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)) ?

Best Answer

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.