# \lim

Used for mathematical limits

https://texform.dev/latex/commands/lim

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Functions and operators](https://texform.dev/latex/topics/functions) |
| Packages | base |
| Allowed mode | math |
| Tags |  |
| Commonality | high |
| Kind | prefix |

## Syntax

### base

Argument specification: ``

Used for mathematical limits

## Common tasks

### How to write a limit

```latex
\lim_{x\to 0} \frac{\sin x}{x}
```

[Open in Playground](https://play.texform.dev/?input=%5Clim_%7Bx%5Cto+0%7D+%5Cfrac%7B%5Csin+x%7D%7Bx%7D)

### How to write a one-sided limit

```latex
\lim_{x\to 0^+} f(x)
```

[Open in Playground](https://play.texform.dev/?input=%5Clim_%7Bx%5Cto+0%5E%2B%7D+f%28x%29)

### How to write a limit at infinity

```latex
\lim_{n\to\infty} a_n
```

[Open in Playground](https://play.texform.dev/?input=%5Clim_%7Bn%5Cto%5Cinfty%7D+a_n)

## Examples

```latex
\lim
```

[Open in Playground](https://play.texform.dev/?input=%5Clim)

```latex
\lim_{n \to \infty}
```

[Open in Playground](https://play.texform.dev/?input=%5Clim_%7Bn+%5Cto+%5Cinfty%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | full |

## Usage frequency

1.73% of formulas in the measured corpus contain this entry, rank 34 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

## Equivalent forms

```latex
\operatorname*{lim}
```

exact. Using amsmath

## See also

- [\\det](https://texform.dev/latex/commands/det)
- [\\gcd](https://texform.dev/latex/commands/gcd)
- [\\inf](https://texform.dev/latex/commands/inf)
- [\\injlim](https://texform.dev/latex/commands/injlim)
- [\\liminf](https://texform.dev/latex/commands/liminf)
- [\\limsup](https://texform.dev/latex/commands/limsup)
- [\\max](https://texform.dev/latex/commands/max)
- [\\min](https://texform.dev/latex/commands/min)
- [\\Pr](https://texform.dev/latex/commands/Pr)
- [\\projlim](https://texform.dev/latex/commands/projlim)
- [\\sup](https://texform.dev/latex/commands/sup)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \lim | Positive: baseline | Pass | Pass | Pass |
