Convert Einstein Summation to Matrix Multiplication

777 Views Asked by At

I am wondering if the following summation has a matrix multiplication/contracted form:

$$B_{ij}=\sum_{k,l}A_{ik}A_{jk}A_{kl}A_{li}A_{lj}$$

In the way that $B_{ij}=\sum_{k,l}A_{ik}A_{kl}A_{lj}$ is really $B=A^3$. If it helps, $A$ is symmetric.

1

There are 1 best solutions below

2
On BEST ANSWER

No because you have three $k$ indices and three $l$ indices. In Einstein summation you normally have only two of any index you are summing over.

General matrix multiplication $C=DE$ can be represented as $C_{ij}=\sum_kD_{ik}E_{kj}$. In Einstein summation this is $C_{ij}=D_{ik}E_{kj}$ You need the second index of the first matrix to match the first index of the second, but for a symmetric matrix you can reverse them because that is just taking the transpose of the matrix. If you get four summation indices (two of each) in a correct configuration and one each of $i,j$ you will have $B=A^5$