How to express outer sum in a matrix form?

2.5k Views Asked by At

So I have the following equation for a matrix $\mathbf{B}$ given $\mathbf{A}$:

$$ b_{ij} = \sum_k \sum_l a_{ki} a_{jl} $$

The question is if there is any way that I can write that one compactly in matrix/vector notations?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $C = (1 \ \cdots \ 1) A^T$ (so it's a row vector). Then $B = C^TC$.

In other words,

$$B = A \mathfrak{I} A^T, $$

where $\mathfrak I$ is the $n \times n$ matrix with all entries equal to 1.