# \mathop

Used to declare a mathematical operator, enabling operator spacing and limits.

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

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Delimiters](https://texform.dev/latex/topics/delimiters) |
| Packages | base |
| Allowed mode | math |
| Tags |  |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: `m`

Used to declare a mathematical operator, enabling operator spacing and limits.

## Common tasks

### How to turn an expression into a large operator

```latex
\mathop{\mathrm{arg\,min}}_x f(x)
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathop%7B%5Cmathrm%7Barg%5C%2Cmin%7D%7D_x+f%28x%29)

### How to give a stacked symbol operator limits

```latex
\mathop{\sum\sum}_{i,j} a_{ij}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathop%7B%5Csum%5Csum%7D_%7Bi%2Cj%7D+a_%7Bij%7D)

### How to write a custom operator with side limits

```latex
\mathop{\mathrm{Hom}}\nolimits(A,B)
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathop%7B%5Cmathrm%7BHom%7D%7D%5Cnolimits%28A%2CB%29)

## Examples

```latex
\mathop x
```

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

```latex
\mathop{\rm lim}
```

[Open in Playground](https://play.texform.dev/?input=%5Cmathop%7B%5Crm+lim%7D)

## Renderer support

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

## Usage frequency

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

## In TeXForm

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

## See also

- [\\mathbin](https://texform.dev/latex/commands/mathbin)
- [\\mathclose](https://texform.dev/latex/commands/mathclose)
- [\\mathinner](https://texform.dev/latex/commands/mathinner)
- [\\mathopen](https://texform.dev/latex/commands/mathopen)
- [\\mathord](https://texform.dev/latex/commands/mathord)
- [\\mathpunct](https://texform.dev/latex/commands/mathpunct)
- [\\mathrel](https://texform.dev/latex/commands/mathrel)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \mathop{a} | Positive: baseline | Pass | Pass | Pass |
| \mathop a | Positive: bare[0] | Pass | Pass | Pass |
