Multiply tensors containing matrices, following matrix multiplication rule
Multiply tensors containing matrices, following matrix multiplication rule Question: Say I have a tensor, where A, B, C, and D are all 2×2 matrices: M = [[A, B], [C, D]] How do I get to the power of n, for example with n=2, with Python or MATLAB M^2 = [[A@A + B@C, A@B + B@D], …