Matrix notion for a double summation

6.3k Views Asked by At

My question is some-what tied to this one: Is there any matrix notation the summation of a vector?

Is there a way to express this double summation into an equivalent product of matrices/vectors?

$\mu=\sum_{i=1}^{N}\sum_{j=1}^{N}b_i b_jX_{i,j}\cos\left ( \sigma_i+\sigma_j \right )$

$\mu$ is a scalar. My feeling is this should be straightforward, but the solution eludes me beyond the inner summation.

1

There are 1 best solutions below

1
On BEST ANSWER

We can start with a quadratic form for vector $\mathbf v = (v_1, v_2, \ldots, v_N)$ and array $A$, which already has some resemblance to what you want:

$$ \mathbf v^T A\, \mathbf v =\sum_{i=1}^N \sum_{j=1}^N A_{i,j} v_i v_j.$$

All that is missing is the factor of $\cos\left(\sigma_i + \sigma_j\right)$. An obvious way to deal with that is to set $A_{i,j} = X_{i,j} \cos\left(\sigma_i+\sigma_j\right)$ for $i = 1, \ldots, N$ and $j = 1, \ldots, N$, in which case $$ \sum_{i=1}^N \sum_{j=1}^N b_i b_j X_{i,j} \cos\left(\sigma_i+\sigma_j\right) = \mathbf b^T A\, \mathbf b, $$ though I suspect that's probably not very satisfying.

Alternatively, use the identity

$$ \cos\left(\sigma_i + \sigma_j\right) = \cos\sigma_i \cos\sigma_j - \sin\sigma_i \sin\sigma_j $$

to write

\begin{align} \sum_{i=1}^N \sum_{j=1}^N b_i b_j X_{i,j} \cos\left(\sigma_i+\sigma_j\right) &= \sum_{i=1}^N \sum_{j=1}^N b_i b_j X_{i,j} \cos\sigma_i \cos\sigma_j - \sum_{i=1}^N \sum_{j=1}^N b_i b_j X_{i,j} \sin\sigma_i \sin\sigma_j \\ &= \sum_{i=1}^N \sum_{j=1}^N X_{i,j} (b_i \cos\sigma_i) (b_j \cos\sigma_j) \\ & \qquad - \sum_{i=1}^N \sum_{j=1}^N X_{i,j} (b_i \sin\sigma_i)(b_j \sin\sigma_j) \\ &= \mathbf u^T X\, \mathbf u - \mathbf v^T X\, \mathbf v \end{align}

where $u_i = b_i \cos\sigma_i$ and $v_i = b_i \sin\sigma_i$, $i = 1, \ldots, N$.