I would like the following sum for the matrices $A,B$, both $n \times n$:
\begin{align} \sum(A_{ij} \cdot B_{jk} \cdot A_{kz} \cdot B_{zf}) & \text{ for all } j,k,z,f \text{ such that } i≠k,j≠z,k≠f \end{align}
Is there a way to get at this sum using matrix multiplication? Any ideas?