TensorReduce[texpr]
attempts to return a canonical form for the symbolic tensor expression texpr.
TensorReduce
TensorReduce[texpr]
attempts to return a canonical form for the symbolic tensor expression texpr.
Details and Options
- TensorReduce converts polynomials of symbolic tensor expressions containing arbitrary combinations of TensorProduct, TensorContract, and TensorTranspose into a canonical form with respect to symmetries.
- If an expression is found to be equivalent to a zero tensor due to symmetry, the result will be 0.
- If TensorDimensions[ten] does not return a list of dimensions, then the expression ten is returned unchanged.
Examples
open all close allBasic Examples (1)
Specify the properties of symbolic arrays:
$Assumptions = {A∈Matrices[{3, 3}, Antisymmetric[{1, 2}]], S∈Arrays[{3, 3, 3}, Symmetric[{1, 2, 3}]]};The trace of an antisymmetric matrix vanishes:
TensorContract[A, {{1, 2}}]//TensorReduceThe contraction of a symmetric and an antisymmetric pair vanishes:
TensorContract[AS, {{1, 3}, {2, 4}}]//TensorReduceReorder tensor products lexicographically:
SA//TensorReduceScope (2)
Canonicalization of symbolic tensor expressions:
$Assumptions = {M∈Matrices[{3, 3}, Symmetric[{1, 2}]], (v | w)∈Vectors[{3}]};TensorContract[vMw + wMv, {{1, 2}, {3, 4}}]//TensorReduceMix explicit arrays and symbolic arrays:
$Assumptions = A∈Matrices[{3, 3}, Symmetric[{1, 2}]];TensorTranspose[A]{1, 2, 3}//TensorReduceOptions (1)
Properties & Relations (4)
Any transposition of a fully symmetric array is removed:
$Assumptions = A∈Arrays[{d, d, d, d}, Symmetric[All]];TensorTranspose[A, RandomPermutation[4]]%//TensorReduceFor general symmetries, transpositions are converted into a canonical form:
$Assumptions = A∈Arrays[{d, d, d, d}, {{{2, 1, 3, 4}, 1}, {{3, 4, 1, 2}, 1}}];TensorTranspose[A, #]& /@ Permutations[Range[4]]In this case, there are three different canonical forms:
TensorReduce /@ %//UnionA repeated tensor implies additional symmetry:
$Assumptions = {A∈Arrays[{3, 3, 3}, Antisymmetric[{1, 2, 3}]], (v | w)∈Vectors[{3}]};TensorSymmetry[vwv]Therefore, this contraction vanishes:
TensorContract[Avwv, {{1, 4}, {2, 5}, {3, 6}}]//TensorReduceFor a given antisymmetric matrix, its contraction with itself n times gives 0 for odd n, but not for even n:
$Assumptions = M∈Matrices[{d, d}, Antisymmetric[{1, 2}]];contractM[n_] := TensorContract[TensorProduct@@ConstantArray[M, n], Partition[RotateLeft[Range[2n]], 2]]contractM[1]contractM[2]contractM[3]Table[n -> TensorReduce[contractM[n]] === 0, {n, 20}]See Also
TensorExpand TensorProduct TensorContract TensorTranspose Symmetric Antisymmetric ArraySimplify ArrayExpand
Function Repository: IdentityTensorReduce
Tech Notes
Related Guides
History
Text
Wolfram Research (2012), TensorReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/TensorReduce.html.
CMS
Wolfram Language. 2012. "TensorReduce." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TensorReduce.html.
APA
Wolfram Language. (2012). TensorReduce. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TensorReduce.html
BibTeX
@misc{reference.wolfram_2026_tensorreduce, author="Wolfram Research", title="{TensorReduce}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/TensorReduce.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tensorreduce, organization={Wolfram Research}, title={TensorReduce}, year={2012}, url={https://reference.wolfram.com/language/ref/TensorReduce.html}, note=[Accessed: 12-June-2026]}