fourth rank tensor in 6x6 matrix

Is there a Command in Mathematica that fourth rank tensor can be represented as 6 by 6 matrix?

• ArrayReshape, e.g., ArrayReshape[m, {6,6}] (if Times@@TensorDimensions[m] ==36)?
– kglr
Commented Jul 3, 2018 at 8:09
• @kglr, thanks a lot! Commented Jul 3, 2018 at 8:13

aa = Array[a, {2, 2, 3, 3}];
TensorRank[aa]


4

aa // MatrixForm // TeXForm


$\tiny\left( \begin{array}{cc} \left( \begin{array}{ccc} a(1,1,1,1) & a(1,1,1,2) & a(1,1,1,3) \\ a(1,1,2,1) & a(1,1,2,2) & a(1,1,2,3) \\ a(1,1,3,1) & a(1,1,3,2) & a(1,1,3,3) \\ \end{array} \right) & \left( \begin{array}{ccc} a(1,2,1,1) & a(1,2,1,2) & a(1,2,1,3) \\ a(1,2,2,1) & a(1,2,2,2) & a(1,2,2,3) \\ a(1,2,3,1) & a(1,2,3,2) & a(1,2,3,3) \\ \end{array} \right) \\ \left( \begin{array}{ccc} a(2,1,1,1) & a(2,1,1,2) & a(2,1,1,3) \\ a(2,1,2,1) & a(2,1,2,2) & a(2,1,2,3) \\ a(2,1,3,1) & a(2,1,3,2) & a(2,1,3,3) \\ \end{array} \right) & \left( \begin{array}{ccc} a(2,2,1,1) & a(2,2,1,2) & a(2,2,1,3) \\ a(2,2,2,1) & a(2,2,2,2) & a(2,2,2,3) \\ a(2,2,3,1) & a(2,2,3,2) & a(2,2,3,3) \\ \end{array} \right) \\ \end{array} \right)$

ArrayReshape[aa, {6, 6}] // MatrixForm // TeXForm


$\tiny\left( \begin{array}{cccccc} a(1,1,1,1) & a(1,1,1,2) & a(1,1,1,3) & a(1,1,2,1) & a(1,1,2,2) & a(1,1,2,3) \\ a(1,1,3,1) & a(1,1,3,2) & a(1,1,3,3) & a(1,2,1,1) & a(1,2,1,2) & a(1,2,1,3) \\ a(1,2,2,1) & a(1,2,2,2) & a(1,2,2,3) & a(1,2,3,1) & a(1,2,3,2) & a(1,2,3,3) \\ a(2,1,1,1) & a(2,1,1,2) & a(2,1,1,3) & a(2,1,2,1) & a(2,1,2,2) & a(2,1,2,3) \\ a(2,1,3,1) & a(2,1,3,2) & a(2,1,3,3) & a(2,2,1,1) & a(2,2,1,2) & a(2,2,1,3) \\ a(2,2,2,1) & a(2,2,2,2) & a(2,2,2,3) & a(2,2,3,1) & a(2,2,3,2) & a(2,2,3,3) \\ \end{array} \right)$

• very helpful for me! Commented Jul 3, 2018 at 8:19