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

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?

• I don't understand the question. You have two matrices -- one on the left and one on the right. The left would be $(CD^T)_{ij} = C_{ik}D_{jk}$. Oct 8, 2019 at 13:36
• Yes so I need to write CD^T in Einstein summation, but I thought that it would be c_ij d_ji Then I need to write A(I-BB^T)C^T in Einstein summation notation but I am unsure of how to write this. Oct 8, 2019 at 14:16
• No. $C_{ij}D_{ji}$ is $(CD)_{ii}$. Oct 8, 2019 at 14:18
• OK thanks, and do you know how to write the second part? Oct 8, 2019 at 14:25
• Sure. You can start writing it as $AC^T-ABB^TC^T$. Oct 8, 2019 at 14:43

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}$$