Arrays
Details
- The length r of the list of dimensions is the rank or depth of the arrays in the domain.
- Valid dimension specifications di in Arrays[{d1,…,dr},dom,sym] are positive integers. It is also possible to work with symbolic dimension specifications.
- Valid component domain specifications dom are either Reals or Complexes. Arrays[{d1,…,dr}] uses Complexes by default.
- The symmetry sym can be given in several forms. First, it can be given as expressions like Symmetric[{s1,…,sk}] or Antisymmetric[{si,…,sk}], with the slots si 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 {sym1, sym2,…} 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.
Examples
open all close allBasic Examples (1)
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}]$Assumptions = V∈Arrays[{4}]$Assumptions = S∈Arrays[{}]Declare arrays of any symmetry. A rank-3 antisymmetric array:
$Assumptions = A∈Arrays[{4, 4, 4}, Antisymmetric[{1, 2, 3}]]$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}]]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}]};TensorTranspose[B, {3, 2, 1}]VTensorTranspose[A, {2, 3, 1}]TensorContract[%, {{3, 4}, {2, 7}}]%//TensorReduceCheck 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]Assuming[a∈Arrays[{d, d, d}, Reals, Antisymmetric[{1, 2, 3}]], Refine[a∈Arrays[{d, d, d}, Complexes, Antisymmetric[{1, 2}]]]]Properties & Relations (3)
The particular domain of matrices can also be given using 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 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]Possible Issues (2)
Addition of symbolic and explicit arrays is determined by the Listable attribute of 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]Tech Notes
Related Guides
History
Text
Wolfram Research (2012), Arrays, Wolfram Language function, https://reference.wolfram.com/language/ref/Arrays.html.
CMS
Wolfram Language. 2012. "Arrays." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Arrays.html.
APA
Wolfram Language. (2012). Arrays. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Arrays.html
BibTeX
@misc{reference.wolfram_2026_arrays, author="Wolfram Research", title="{Arrays}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Arrays.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_arrays, organization={Wolfram Research}, title={Arrays}, year={2012}, url={https://reference.wolfram.com/language/ref/Arrays.html}, note=[Accessed: 12-June-2026]}