Functions and operators\operatorname

\operatornameCommand

Used to create named math operators such as \operatorname{sgn} or limit-style operators via \operatorname*{lim} when no predefined operator macro exists.

\operatorname a
Available in
ams
Kind
prefix
Allowed mode
math
Frequency
3.58% of corpus formulasrank 17 of 263
Commonality
medium
Renderer support
PackageMathJaxKaTeXXeTeX
amsMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\operatornames*starm:O{name}operator name

Argspec s m:O — one optional and one mandatory argument. Reading argspecs

Common tasks#

How to write a multi-letter operator#

\operatorname{rank} A

How to write an operator with limits#

The star form places limits like \lim; the plain form keeps side scripts.

\operatorname*{arg\,max}_x f(x)

How to write a named map#

\operatorname{Tr}(\rho\sigma)

Examples#

\operatorname*{lim}_{n}

In TeXForm#

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

Rewrite plain operatorname arguments to equivalent base named-function or named-operator commands.

\operatorname{#1} \#1

Equivalent forms#

  • \DeclareMathOperator{\myop}{name}approximate

    Defines a new command that behaves like \operatorname{name}

  • \mathop{\mathrm{#2}}approximate

    Operator spacing and font style are applied, similar to wrapping in \mathop and \mathrm, but \operatorname correctly handles limits positioning according to the star argument.

Test cases#

ams
InputCaseMathJaxKaTeXXeTeX
\operatorname{a}Positive · baselinePassPassPass
\operatorname*{a}Positive · vary:s[0]PassPassPass
\operatorname aPositive · bare[1]PassPassPass
All 74 in Functions and operators