<p>The sum <span class="math-container">$\sum_{i \le j}=a_{ij}x_ix_j$</span> goes over all indices <span class="math-container">$(i,j)$</span> with <span class="math-container">$i\leq j$</span>. We can do that by either summing over all <span class="math-container">$i$</span> and then for each <span class="math-container">$i$</span> all <span class="math-container">$j\geq i$</span>, which would give us
<span class="math-container">$$\sum_{i=1}^n\sum_{j=i}^n=a_{ij}x_ix_j,$$</span>
or we could sum over all <span class="math-container">$j$</span> and then look at <span class="math-container">$i\leq j$</span>, which would give us
<span class="math-container">$$\sum_{j=1}^n\sum_{i=1}^j=a_{ij}x_ix_j.$$</span></p>
<p>However, for <a href="https://en.wikipedia.org/wiki/Quadratic_form" rel="nofollow noreferrer">general quadratic forms</a>, one does not restrict to <span class="math-container">$i\leq j$</span>, which would correspond to the additional restriction that <span class="math-container">$a_{ij}=0$</span> for <span class="math-container">$i&gt;j$</span>, which need not hold in general.</p>

CC BY-SA 4.0
2023-05-27T11:07:58.250Z
Hi michael, is the line at the beginning with two $i$'s a typo? "We can do that by either summing over all $i$ and then for each $i$ all $j\geq i$," should it be: ...then for each $j$ all $j\geq i$
CormJack
CC BY-SA 4.0
2023-05-27T11:09:32.667Z
No now i read it again i don't think it is a typo. I think i was just miss understanding. But please confirm it is indeed correct.
CormJack
CC BY-SA 4.0
2023-05-27T15:58:04.343Z
I don’t see any typo.
Michael Greinecker
CC BY-SA 4.0
2023-05-27T16:00:29.447Z
Yeah it was sounding weird to me, but I understand why it’s right now! Thanks for checking!
CormJack
CC BY-SA 4.0
2023-05-21T10:06:24.603Z
2023-05-21T10:06:24.603Z
Michael Greinecker
<p>I'm trying to translate what feels like a double summation notation , compacted into a single summation. It's the summation definition of quadratic forms.</p>
<p><span class="math-container">$Q(x_1, x_2.....x_n)=\sum_{i \le j}a_{ij}x_ix_j$</span></p>
<p>I assume quadratic forms can be written as the less compact double summation?</p>
<p><span class="math-container">$Q(x_1, x_2.....x_n)=\sum_{i =1}^n \sum_{j =1}^n a_{ij}x_ix_j$</span></p>
<p>To count this we would:</p>
<ol>
<li>Fix the outer summation first, so in this case we would be fixing rows and going across columns. Alternately we could switch the summation so we fixed columns and counted rows. This holds for any <span class="math-container">$n•m$</span> matrix i believe?</li>
<li><strong>Question:</strong> I suppose the <span class="math-container">$i \le j$</span> notation has to correspond to this. But it's not immediately clicking?</li>
</ol>

CC BY-SA 4.0
2023-05-21T11:29:32.130Z
This might be helpful: https://math.stackexchange.com/questions/1686123/notation-what-does-sum-ij-mean
mynameparv
<mathematical-economics><optimization><linear-algebra>
Quadratic Form Single Summation notation
CormJack
# Quadratic Form Single Summation notation

(Asked by: username_0 on 2023-05-21)

I'm trying to translate what feels like a double summation notation , compacted into a single summation. It's the summation definition of quadratic forms.

$Q(x\_1, x\_2.....x\_n)=\sum\_{i \le j}a\_{ij}x\_ix\_j$

I assume quadratic forms can be written as the less compact double summation?

$Q(x\_1, x\_2.....x\_n)=\sum\_{i =1}^n \sum\_{j =1}^n a\_{ij}x\_ix\_j$

To count this we would:

1. Fix the outer summation first, so in this case we would be fixing rows and going across columns. Alternately we could switch the summation so we fixed columns and counted rows. This holds for any $n•m$ matrix i believe?
2. **Question:** I suppose the $i \le j$ notation has to correspond to this. But it's not immediately clicking?

**Tags:** mathematical-economics, optimization, linear-algebra
> **Comments:**
> **username_1**: This might be helpful: https://math.stackexchange.com/questions/1686123/notation-what-does-sum-ij-mean  

---

## 1 answers

### Answer by username_2 on 2023-05-21. Score: 2 | Accepted answer

The sum $\sum\_{i \le j}=a\_{ij}x\_ix\_j$ goes over all indices $(i,j)$ with $i\leq j$. We can do that by either summing over all $i$ and then for each $i$ all $j\geq i$, which would give us
$$\sum\_{i=1}^n\sum\_{j=i}^n=a\_{ij}x\_ix\_j,$$
or we could sum over all $j$ and then look at $i\leq j$, which would give us
$$\sum\_{j=1}^n\sum\_{i=1}^j=a\_{ij}x\_ix\_j.$$

However, for [general quadratic forms](https://en.wikipedia.org/wiki/Quadratic_form), one does not restrict to $i\leq j$, which would correspond to the additional restriction that $a\_{ij}=0$ for $i>j$, which need not hold in general.

> **Comments:**
> **username_0**: Hi michael, is the line at the beginning with two $i$'s a typo? "We can do that by either summing over all $i$ and then for each $i$ all $j\geq i$," should it be: ...then for each $j$ all $j\geq i$  
> **username_0**: No now i read it again i don't think it is a typo. I think i was just miss understanding. But please confirm it is indeed correct.  
> **username_2**: I don’t see any typo.  
> **username_0**: Yeah it was sounding weird to me, but I understand why it’s right now! Thanks for checking!  

---

