Is there a Command in Mathematica that fourth rank tensor can be represented as 6 by 6 matrix?
1 Answer
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)$
ArrayReshape
, e.g.,ArrayReshape[m, {6,6}]
(ifTimes@@TensorDimensions[m] ==36
)? $\endgroup$