# Double sum over i and j with i \neq j

I would like to represent a double sum with i\neq j. So I want two capital sigmas with text i\neq j underneath them. How can I achieve this?

-
Oops, I read the question wrongly, sorry for the noise: it doesn't really appear to be a duplicate. –  egreg Nov 3 '12 at 18:08
Despite the requested double summation sign, I would usually write such a sum as $$\sum_{i\ne j}...$$ –  Andrew Swann Nov 3 '12 at 18:20

\mathop allows you to perform operator-related things (like sub-/superscripting underneath/over top in display style) on non-operator symbols:

\documentclass{article}
\begin{document}
$\mathop{\sum\sum}_{i\neq j}$
\end{document}


Using amsmath, it is also possible to declare a new operator, say \sumsum, if you're using this notation on a more frequent basis:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\DeclareMathOperator*{\sumsum}{\sum\sum}
\begin{document}
$\sumsum_{i\neq j} x_{ij}$
\end{document}

-
Thanks, I ended up doing something similar: \underset{i\neq j}{\sum\sum} –  Benjamin Nov 3 '12 at 22:55
@Benjamin But remember that the classes like \mathop and similar are there for good reasons (spacing, interpretation, ...), therefore it is preffered to use \mathop or \DeclareMathOperator. –  tohecz Nov 22 '12 at 10:09