Lower bound for scalar product I have a set of vectors $a_i$ and $b_j$ such that $\sum_{i=1}^N a_i = 0$ and $\sum_{i=1}^N \sum_{j \in S_i} b_j = 0$, where $S_i$ are sets. I want to know if I can derive a lower bound (or even show that the following is zero) on the quantity
$$ \sum_{i=1}^N \langle a_i, \sum_{j \in S_i} b_j \rangle = \sum_{i=1}^N \sum_{j \in S_i}\langle a_i, b_j \rangle $$
Both summations are finite, so I can somehow interchange them but I'm having difficulties doing that since the second sum index depends on the index of the first one, does that mean it's not possible to swap them?
 A: The manipulations will be easier if you replace the use of "$j \in S_i$" with a 0-1 matrix $S_{ij}$ of the appropriate dimension; we will say $S_{ij} = 1$ if $j \in S_i$, and $S_{ij} = 0$ otherwise.
Then, the precondition on the $b_j$ becomes
$$
  \sum_i \sum_j S_{ij}b_j = 0
$$
where I've left the bounds of summation implicit, but you can put them in as needed. The order of the summations could clearly be swapped. Then, the quantity we are interested in is
$$
     Q = \sum_i\langle a_i, \sum_j S_{ij}b_j\rangle.
$$
By linearity of the inner product, this is the same as $\sum_i \sum_j S_{ij} \langle a_i, b_j\rangle$.
Certainly this could be zero if all the $S_{ij}$ are zero, which is a bit of a boring case.
On the other hand, consider the case when both the $a_i$ and $b_j$ are the same set, and $a_N = -\sum_{i=1}^{N-1} a_i$. Then the precondition on the $a_i$ holds. For the $b_j$, choose $S$ to be any permutation matrix having $S_{NN} = 1$. The precondition on the $b_j$ holds because it is the same as adding up the $a_i$, just in a different order. But $Q$ could easily be nonzero. It includes $\langle a_N, a_N \rangle = 0$, but the other $\langle a_i, a_j \rangle$ terms could be anything. In particular, if $a_1, \dots, a_{N-1}$ are orthonormal and $S$ is a derangement (aside from $S_{NN}$) then the resulting sum is $N-1$. If the $a_i$ are still orthogonal, but larger, then the sum will be bigger. We could also flip $Q$ to be negative by setting $b_i = -a_i$ instead, so zero is not even a lower bound.
