# How to markup expression using sigma notation for sum in MathJax [duplicate]

I have had trouble trying to express a sigma sum formula.

Please do not think I have been lazy, I have been lazy, it is just I have up attempting to work it out after over 2 hours (when my actual question still remains to be written).

I was intending to specify a sigma with a variable ( n) at the top right of it And a (i=1) on the bottom right of the sigma. I have made many attempts, but I cannot have an "=" expression instead of a simple variable (like i on its own).

Many thanks

I think you want something like this $$\sum_{i=1}^n a_i$$

This is given by \sum_{i=1}^n a_i.

Formatting tips here.

If you omit the curly braces, then characters will be omitted. For example Notice the difference when I write \frac123 $$\frac123$$ versus \frac{1}{23} $$\frac{1}{23}$$.

• Much appreciated, thank you for offering that.
– Mr a
Jan 18, 2016 at 18:45
 \sum\limits_{i=1}^{\infty}


$\sum\limits_{i=1}^{\infty}$

if you want a bigger sigma so

 \displaystyle\sum\limits_{i=1}^{\infty}


$\displaystyle\sum\limits_{i=1}^{\infty}$

• There are also \sum_{i=1}^{\infty} and \displaystyle\sum_{i=1}^{\infty} giving $\sum_{i=1}^{\infty}$ and $\displaystyle\sum_{i=1}^{\infty}$ Jan 19, 2016 at 10:51
• Please never ever use \displaystyle or \limits in inline math. It looks horrible. Jan 19, 2016 at 11:01
• @NajibIdrissi I think that it looks good, but it is your right to think what ever you want
– 3SAT
Jan 19, 2016 at 11:06
• Okay... Jan 19, 2016 at 11:11

It sounds like your are looking for the code for $\sum_{i=1}^n$, which is $\sum_{i=1}^n$.

The point here is that the command _ which makes the lower index just takes the first character of some larger text unless you put curly brackets around the whole text. The same is true for ^.

• Thanks that was exactly what I was trying to achieve. I made the mistake of having them both I seperate pairs of brackets.
– Mr a
Jan 18, 2016 at 18:44