3

I would like to write the following:

$ \mu_{s,r} = \mbox{mean}_ {i \in N}(X_{i,s,r})$

but where the {i \in N} is underneath the word "mean". I tried \limit but it doesn't work unless it's a math operator. I understand this can ruin the look but I am making slides and want to see how it appears.

Thanks!

5

How about

\documentclass{standalone}
\usepackage{amsmath}
\begin{document}
$ \underset{i \in N}{\operatorname{mean}}$
\end{document} 

As egreg pointed out in the comments the following works too

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$ \operatorname*{mean}\limits_{n \in N}$
\[ \operatorname*{mean}_{n \in N}\] 
\end{document} 

In a display style math environment you don't need to write \limits.

  • Throws an error. I think what you meant though was: $\underset{\operatorname{i \in N}}{\mbox{mean}}$ which works. – user1357015 May 22 '13 at 16:28
  • @user1357015 It works now on my pc – Dominic Michaelis May 22 '13 at 16:32
  • 3
    What about $\operatorname*{mean}\limits_{i\in N}$? The \limits wouldn't be necessary in display math mode. – egreg May 22 '13 at 16:32
  • @egreg it works too (not surprising after you said it) i gonna add it to my answer – Dominic Michaelis May 22 '13 at 16:35
  • Revision fixed it! Many thanks :-). – user1357015 May 22 '13 at 16:36
8

If you're using beamer you already load amsmath. However, in general, this works:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\mean}{mean}

\begin{document}
\section{Long version}

In line: $\mu_{s,r} = \operatorname*{mean}\limits_{i\in N}(X_{i,s,r})$

Displayed:
\[
\mu_{s,r} = \operatorname*{mean}\limits_{i\in N}(X_{i,s,r})
\]

\section{Short version}

In line: $\mu_{s,r} = \mean\limits_{i\in N}(X_{i,s,r})$

Displayed:
\[
\mu_{s,r} = \mean\limits_{i\in N}(X_{i,s,r})
\]

\end{document}

Of course you'll use only one of the methods. For a "one shot" operator, \operatorname* is easier. For several usages of the operator, the \DeclareMathOperator* way is better.

The difference between \operatorname and \operatorname* (reflected in usage of \DeclareMathOperator and \DeclareMathOperator*) is that the latter defines an operator that in displays takes limits above and below, like \sum or \max, and in inline formulas respects the presence of \limits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.