$A(I-BB^T)C^T$ in Einstein notation

matrices

I'm a bit confused by using Einstein summation over more than two matrices being multiplied together. I want to write $CD^T=A(I-BB^T)C^T$ in Einstein summation notation, where $D^T$ is the transpose of the matrix $D$. How do I write the indices that we're summing over?

Best Answer

In Einstein's summation notation, $$\begin{align} (CD^T)_{ij} &= C_{ia}(D^T)_{aj} = C_{ia}D_{ja}\\ (A(I-BB^T)C^T)_{ij} &= A_{ia}(I - BB^T)_{ab}(C^T)_{bj}\\ &= A_{ia}(\delta_{ab} - (BB^T)_{ab})C_{jb}\\ &= A_{ia}(\delta_{ab} - B_{ac}(B^T)_{cb})C_{jb}\\ &= A_{ia}(\delta_{ab} - B_{ac} B_{bc})C_{jb} \end{align} $$ where $\delta_{ab}$ is the Kronecker delta.

The equality $CD^T=A(I−BB^T)C^T$ becomes

$$C_{ia}D_{ja} = A_{ia}(\delta_{ab} - B_{ac} B_{bc})C_{jb} = A_{ia}C_{ja} - A_{ia}B_{ac}B_{bc}C_{jb} $$