# How to put an expression in terms of a sum or a "productory"

I have the expression $$\varepsilon_{1} x_{1}^2 + \varepsilon_{2} x_{2}^2 + \varepsilon_{3} x_{3}^2 + \varepsilon_{4} x_{1} x_{2} + \varepsilon_{5} x_{1} x_{3} + \varepsilon_{6} x_{2} x_{3}, \tag{1} \label{1}$$ where subscripts play the role of labeling and the superscripts represent the power of the element. Concretely I want to put the expression \eqref{1} in a more compact form by using a sumatory ($$\sum _{n}^{N}$$) or a "productory" ($$\Pi_{n}^{N}$$, I do not know the english term ) . The first three therms of \eqref{1} can be put as $$\sum_{i=1}^{3} \varepsilon_{i}x_{i}^2, \tag{2}$$ but the last three therms it is not obvious to me how to express them, so, any idea of ​​how to express the last three terms of \eqref{1} or the whole expression through a sumatory o a "productory"?

• Are you unhappy with something like $\sum_{i\le j}\epsilon_{i,j}x_i x_j$, with the understanding that some of the $\epsilon_{i,j}$ may equal zero? Commented Aug 25, 2019 at 22:26

You can try using something like $$\sum_{1\leq i\leq j\leq 3} \varepsilon_{ij}x_ix_j = \varepsilon_{11}x_1x_1 + \varepsilon_{12}x_1x_2 + \varepsilon_{13}x_1x_3 + \varepsilon_{22}x_2x_2 + \varepsilon_{23}x_2x_3 + \varepsilon_{33}x_3x_3$$ with \varepsilon_{ij} = \left\{ \begin{align} \varepsilon_{i+j+1} \ \textrm{ if } i\neq j \\ \varepsilon_{i} \ \textrm{ if } i = j \end{align} \right.