Writing $\displaystyle\sum_{i,j=1}^n \sigma_i\sigma_j^T$ as matrix multiplication

102 Views Asked by At

Let $\sigma$ be an $n\times n$-matrix and denote by $\sigma_i$ its $i$-th column. How can we write the expression

$$\sum_{i,j=1}^n \sigma_i\sigma_j^T$$

as a matrix multiplication using $\sigma$?

3

There are 3 best solutions below

3
On BEST ANSWER

If $A$ is the matrix for which $A_{ki}= (\sigma_i)_k$, then $$M_{kl} = \sum_{ij} (\sigma_i)_k (\sigma_j)_\ell = \sum_{ij} A_{ki}1_i A_{\ell j} 1_j \ \ \mbox{or} \ \ \ M= (A e)(e^T A^T)=(\sigma^T e) (e^T \sigma)=v v^T$$ where $v=Av=\sigma^T e$. The last emphasize that the result is a symmetric n by n matrix of rank 1.

0
On

Use $e^t \sigma \sigma^t e$ where $e$ is a column vector with all entries $1$. This will give you the sum of the entries of the matrix $\sigma\sigma^t$.

0
On

Suppose we are given a matrix $\mathrm A \in \mathbb R^{m \times n}$. Let $\mathrm a_k$ be the $k$-th column of $\mathrm A$. Hence,

$$\sum_{i=1}^n \sum_{j=1}^n \mathrm a_i \mathrm a_j^T = \left( \sum_{i=1}^n \mathrm a_i \right) \left( \sum_{j=1}^n \mathrm a_j \right)^T = (\mathrm A 1_n) (\mathrm A 1_n)^T = \color{blue}{ \mathrm A 1_n 1_n^T \mathrm A^T }$$