({{, (RefLink[Arrays, paclet:ref/Arrays])[{(Subscript[d, 1]),…,(Subscript[d, r])}] 
represents the domain of arrays of rank r and dimensions (Subscript[d, i]).}, {, (RefLink[Arrays, paclet:ref/Arrays])[{(Subscript[d, 1]),…,(Subscript[d, r])},dom]
represents the domain of arrays of dimensions (Subscript[d, i]), with components in the domain dom.}, {, (RefLink[Arrays, paclet:ref/Arrays])[{(Subscript[d, 1]),…,(Subscript[d, r])},dom,sym]
represents the subdomain of arrays with dimensions (Subscript[d, i]) and symmetry sym.}})

OpenersNotesSection(Spacer1)Details

The length r of the list of dimensions is the rank or depth of the arrays in the domain.

Valid dimension specifications (Subscript[d, i]) in (RefLink[Arrays, paclet:ref/Arrays])[{(Subscript[d, 1]),…,(Subscript[d, r])},dom,sym] are positive integers. It is also possible to work with symbolic dimension specifications.

Valid component domain specifications dom are either (RefLink[Reals, paclet:ref/Reals]) or (RefLink[Complexes, paclet:ref/Complexes]). (RefLink[Arrays, paclet:ref/Arrays])[{(Subscript[d, 1]),…,(Subscript[d, r])}]  uses (RefLink[Complexes, paclet:ref/Complexes]) by default.

The symmetry sym can be given in several forms. First, it can be given as expressions like (RefLink[Symmetric, paclet:ref/Symmetric])[{(Subscript[s, 1]),…,(Subscript[s, k])}] or (RefLink[Antisymmetric, paclet:ref/Antisymmetric])[{(Subscript[s, i]),…,(Subscript[s, k])}], with the slots (Subscript[s, i]) being different positive integers between 1 and the rank r. It can also be given as a list of generators of the form {perm,ϕ}, representing that the array stays invariant under simultaneous transposition by the permutation perm and multiplication by the root of unity ϕ. In addition, it can be given as the internal direct product {(Subscript[sym, 1]), (Subscript[sym, 2]),…} of those forms.

When the symmetry is not specified, then none is assumed. The absence of symmetry, or identity symmetry, is represented by an empty list {} of generators.

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

A fully symmetric real array of rank 3 in dimension 4:

$Assumptions=A∈Arrays[{4,4,4},Reals,Symmetric[{1,2,3}]]

Any transposition is equivalent to the original array:

TensorTranspose[A,{2,3,1}]//TensorReduce

OpenersExampleSection1(Spacer1)Scope  (2)

Declare arrays of any rank and dimensions. A rank-3 array of complex elements:

$Assumptions=A∈Arrays[{3,4,5}]

A matrix without any symmetry, with symbolic dimensions:

$Assumptions=M∈Arrays[{d1,d2}]

A vector in dimension 4:

$Assumptions=V∈Arrays[{4}]

A complex scalar:

$Assumptions=S∈Arrays[{}]

Declare arrays of any symmetry. A rank-3 antisymmetric array:

$Assumptions=A∈Arrays[{4,4,4},Antisymmetric[{1,2,3}]]

A real symmetric matrix:

$Assumptions=M∈Arrays[{4,4},Reals,Symmetric[{1,2}]]

An array with a general symmetry:

$Assumptions=A∈Arrays[{3,3,3,3},Reals,{{{2,1,3,4},-1},{{1,2,4,3},-1},{{3,4,1,2},1}}]

The symmetry must be consistent with the list of dimensions:

$Assumptions=A∈Arrays[{3,4,3},Complexes,Symmetric[{1,2,3}]]

OpenersExampleSection3(Spacer1)Applications  (3)

Specify the properties of symbolic arrays, so that algebraic operations can be performed with them:

$Assumptions={(A|B)∈Arrays[{4,4,4},Complexes,Antisymmetric[{1,2,3}]],V∈Arrays[{4}]};

Transpositions and products:

TensorTranspose[B,{3,2,1}]⊗V⊗TensorTranspose[A,{2,3,1}]

Contractions:

TensorContract[%,{{3,4},{2,7}}]

Canonicalization:

%//TensorReduce

Check whether an array belongs to a given domain:

a=RandomInteger[10,{3,3,3}]

a∈Arrays[{3,3,3},Reals]

a∈Arrays[{3,3,3},Complexes,Symmetric[All]]

Conditions involving symbolic parameters may be converted into simpler conditions:

{{(Subscript[m, 11]),(Subscript[m, 12])},{(Subscript[m, 21]),(Subscript[m, 22])}}∈Arrays[{d,d,d,d},Reals,Symmetric[{1,2,3,4}]]

{{{(Subscript[s, 1]),(Subscript[s, 2])},v},m}∈Arrays[{2,2,2},Reals]

Check a subdomain relation:

Assuming[a∈Arrays[{d,d,d},Reals,Antisymmetric[{1,2,3}]],Refine[a∈Arrays[{d,d,d},Complexes,Antisymmetric[{1,2}]]]]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

The particular domain of matrices can also be given using (RefLink[Matrices, paclet:ref/Matrices]). These two assumptions are equivalent:

$Assumptions=M∈Arrays[{4,4},Reals,Symmetric[{1,2}]]

$Assumptions=M∈Matrices[{4,4},Reals,Symmetric[{1,2}]]

The particular domain of vectors can also be given using (RefLink[Vectors, paclet:ref/Vectors]). These two assumptions are equivalent:

$Assumptions=V∈Arrays[{4}]

$Assumptions=V∈Vectors[{4}]

Two alternative ways of checking numerical arrays:

a=RandomComplex[1+I,{2,2,2}]

Element[a,Arrays[{2,2,2},Complexes]]

ArrayQ[a,3,NumericQ]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

Addition of symbolic and explicit arrays is determined by the (RefLink[Listable, paclet:ref/Listable]) attribute of (RefLink[Plus, paclet:ref/Plus]):

Assuming[a∈Arrays[{1,2,2}],a+{{{1,2},{3,4}}}]

Hence, listability will in general affect operations that simultaneously involve both symbolic and explicit arrays:

The zero array may be represented as 0 in symbolic computations:

Assuming[a∈Arrays[{1,2,2}],a-a]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Matrices, paclet:ref/Matrices])  ▪  (RefLink[Vectors, paclet:ref/Vectors])  ▪  (RefLink[ArrayQ, paclet:ref/ArrayQ])  ▪  (RefLink[TensorRank, paclet:ref/TensorRank])  ▪  (RefLink[TensorDimensions, paclet:ref/TensorDimensions])  ▪  (RefLink[TensorSymmetry, paclet:ref/TensorSymmetry])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Symbolic Tensors, paclet:tutorial/SymbolicTensors])}, {▪(RefLinkPlain[Tensor Symmetries, paclet:tutorial/TensorSymmetries])}, {▪(RefLinkPlain[Symmetrized Arrays, paclet:tutorial/SymmetrizedArrays])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Symbolic Tensors, paclet:guide/SymbolicTensors])}})}})