# How to understand the symmetry of MMA's tensor

tensor = {{{2, 9}, {9, 2}}, {{9, 2}, {2, 4}}};
TensorDimensions[tensor]
TensorSymmetry[tensor]


How can I understand the symmetry of the output Symmetric[{1,2,3}] above?

And I can't recover this tensor with Symmetric[{1,2,3}]:

SymmetrizedArray[{{1, 1, 1} -> 2, {1, 1, 2} -> 9, {2, 2, 2} -> 4}, {2,
2, 2}, Symmetric[{1, 2, 3}]] // Normal


Symmetric[{1,2,3}] means that all six permutations of {1,2,3} are symmetries of the tensor:

Equal[tensor, Transpose[tensor, #]] & /@ Permutations[{1, 2, 3}]
(* {True, True, True, True, True, True} *)


A 3-symmetric tensor in dimensions {2,2,2} has four independent components:

SymmetrizedIndependentComponents[{2, 2, 2}, Symmetric[{1, 2, 3}]]
(* {{1, 1, 1}, {1, 1, 2}, {1, 2, 2}, {2, 2, 2}} *)


Hence you need to do:

SymmetrizedArray[{{1, 1, 1} -> 2, {1, 1, 2} -> 9, {1, 2, 2} -> 2, {2, 2, 2} -> 4}, {2, 2, 2}, Symmetric[{1, 2, 3}]] == tensor
(* True *)


In SymmetrizedArray, the expression Symmetric[{1,2,3}] means all permutations of any set of the 1st, 2nd and 3rd subscripts have the save value. For example, the rule {1,1,2} -> 9 would then apply to all 3 permutations of {1,1,2}.

As output in TensorSymmetry[tensor] example, Symmetry[{1,2,3}] means if two elements are indexed by a permutation of the same set of subscripts, the elements are equal.

To recover tensor using SymmetrizedArray, include the rule {2,2,1} -> 2. That rule will also apply to the element indexed by {2,1,2} and the element indexed by {1,2,2}.

Note that Symmetry[{1,2,3}] can also be written Symmetry[All] in your example.