1
$\begingroup$

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

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

1 Answer 1

3
$\begingroup$
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)$

$\endgroup$
1
  • $\begingroup$ very helpful for me! $\endgroup$
    – ABCDEMMM
    Jul 3, 2018 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.