I'm having some trouble when trying to correctly display a summation using LaTeX.

I'm using the package mathtools, and the formula:

Cov(O) = \frac{ \sum_{\forall c_i \in C} exists(O, c_i)}{n}

My problem is the \forall c_i \in C text appears as a sub index of the \sum element instead of appearing below it.

  • 4
    Welcome to TeX.sx! This question seems very similar to Problem with sum subscript. Can you check if the accepted solution works for you? In this case, please let us know by leaving a comment; otherwise, try being more precise in your question.
    – egreg
    Dec 20, 2012 at 12:28

2 Answers 2


This is standard because the arguments of \frac are in textmode math. Try \frac{\displaystyle ... or \frac{\sum\limits_{....

BTW: One usually never write \forall in the limits of the sum, one would usually just write \sum_{c_i \in C}, the for all is implied


I would prefer rewriting the text as follows:

\Cov(O) = \frac{1}{n} \sum_{\forall c_i \in C} \texists(O, c_i)

It seems that Cov(0) andexists(0,c_i)` are functions, so it should be typeset as one. For that, add this to the document preamble:

\usepackage{amsmath} % not needed if it's already in the preamble

Notice that we cannot use the name \exists since it already exists ;)


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.