# Is there a LaTeX symbol for 'order'?

Is there a symbol for order?

...the exponent, ei , is called the order of pi  in a, denoted ordpi (a) = ei .

• Welcome to TeX.sx! If you want to "emulate" LaTeX math, you can use certain HTML, as I did in my edit. You can use backticks  to mark your inline code in comments as well as in answers. I'm wondering if we should make this question a bit more specific and widely-applicable by changing the title to "Is there a math operator for 'order' or how can I define it?" -- whaddya think? – doncherry Sep 25 '11 at 8:51
• I think you are looking for the $\mathcal{O}$ symbol, which is generally used to write as "order of ...". – user13972 Apr 26 '12 at 13:03
• Hi govind, welcome to TeX.sx! I think Jeff wasn't looking for the \mathcal{O} symbol, as he explained in the comment to my answer. Also, Stephen already included \mathcal{O} in his answer. – Jake Apr 26 '12 at 16:02
• OMG, I was just searching for how to do this, when I see my own question that I never completed. I was full of misunderstandings when I posted this and my comment to Jake's answer is wrong. I wanted the order (like "big Oh" and "little oh"). Stephen's answer is what I needed (and need). Thanks all and sorry for my mistakes. – Jeff Jun 24 '14 at 17:38

From your comment it became clear that you were looking for the order operator.

In case somebody finds this question but is looking for the order (of magnitude):

\documentclass{article}
\DeclareRobustCommand{\orderof}{\ensuremath{\mathcal{O}}}
\begin{document}
$\orderof\left( 1234\right) =10^{3}$
\end{document}

• There is no mathcal for "small oh". How do you make that symbol? – Jeff Jun 24 '14 at 17:39
• @Jeff: I used "Capital Oh", for which \mathcal{O} exists. But when you want to use "small oh", there are already several possible solutions at \mathcal(O) and font size. – Stephen Jun 25 '14 at 9:08

I assume you're not looking for a certain symbol, but rather the operator ord, as found on the top of page 7 of the Mark Siggers' Cryptography Class notes. You can define your own operators using amsmath's \DeclareMathOperator:

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\ord}{ord}

\begin{document}
\ldots the exponent, $e_i$, is called the order of $p_i$ in $a$, denoted $\ord_{p_i}(a)=e_i$.

\end{document}


• Yes, (other than the fact that Siggers' notes seem to be only 6 pdf pages long ;) ) that is the symbol (well operator). Based on your answer, I'm assuming there is no order operator in Latex. But other than what is the difference between using \Declaremathoperator and plain old \newcommand{\ord}{\mathrm{ord}} (not counting that \Declaremathoperator is a little easier) – Jeff Sep 25 '11 at 6:19
• Also, how did you get Latex to work in this forum? I searched and couldn't figure out how? – Jeff Sep 25 '11 at 6:22
• Using \DeclareMathOperator makes sure that the spacing around the operator is correct (try typesetting $x \ord y$` with the two different approaches). LaTeX doesn't work directly on this site (it's a screenshot). It does on sister sites like math.stackexchange.com, but we mainly need to show LaTeX code, so rendering it would not be very helpful. – Jake Sep 25 '11 at 6:42
• Oh, by the way, the PDF I linked to has 6 pages, but there are two logical pages per PDF page. – Jake Sep 25 '11 at 7:18