Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

STensor

Guides

  • Get Started

Tech Notes

  • Basic Tensor Computation
  • ComputationWithMetric

Symbols

  • ChristoffelSymbol
  • CreateTensor
  • EinsteinTensor
  • Inverse
  • IsMetric
  • LineElement
  • RicciScalar
  • RicciTensor
  • RiemannTensor
  • SCoordinateTransform
  • STensor
  • STensorQ
  • Symmetrize
  • TensorRank
  • TensorSymmetry
  • Tr
  • VolumeElement
  • WeylTensor
BowenPing`STensor`
Symmetrize
​
Symmetrize[T,syms]
Symmetrize tensor T by symmetry syms.
​
Details and Options

Examples  
(5)
Basic Examples  
(3)
A metric is a symmetric (0,2)-rank tensor:
In[1]:=
g=
CreateTensor
"g",{0,2},{x,y},Array[
"g"
##
&,{2,2}],
IsMetric
True;​​
Symmetrize
[g]
Out[1]=
STensor
Symbol: g
Rank: {0,2}
Symmetry: {Symmetric[{{1,2}}]}
Coordinate System: {x,y}
Components: 
g
1,1
,
1
2

g
1,2
+
g
2,1
,
1
2

g
1,2
+
g
2,1
,
g
2,2

Metric: True

The components array has been symmetrized. Reset metric g:
In[2]:=
g=
Symmetrize
[g];​​g
Out[2]=
STensor
Symbol: g
Rank: {0,2}
Symmetry: {Symmetric[{{1,2}}]}
Coordinate System: {x,y}
Components: 
g
1,1
,
1
2

g
1,2
+
g
2,1
,
1
2

g
1,2
+
g
2,1
,
g
2,2

Metric: True

​
And other symmetry can be done as
System`Symmetrize
does:
In[1]:=
T=
CreateTensor
["T",{1,2},{x,y,z},Array[
"T"
##
&,{3,3,3}]];​​
Symmetrize
[T,Symmetric[{1,2}]]["Components"]//MatrixForm
Out[1]//MatrixForm=
T
1,1,1
T
1,1,2
T
1,1,3
1
2
(
T
1,2,1
+
T
2,1,1
)
1
2
(
T
1,2,2
+
T
2,1,2
)
1
2
(
T
1,2,3
+
T
2,1,3
)
1
2
(
T
1,3,1
+
T
3,1,1
)
1
2
(
T
1,3,2
+
T
3,1,2
)
1
2
(
T
1,3,3
+
T
3,1,3
)
1
2
(
T
1,2,1
+
T
2,1,1
)
1
2
(
T
1,2,2
+
T
2,1,2
)
1
2
(
T
1,2,3
+
T
2,1,3
)
T
2,2,1
T
2,2,2
T
2,2,3
1
2
(
T
2,3,1
+
T
3,2,1
)
1
2
(
T
2,3,2
+
T
3,2,2
)
1
2
(
T
2,3,3
+
T
3,2,3
)
1
2
(
T
1,3,1
+
T
3,1,1
)
1
2
(
T
1,3,2
+
T
3,1,2
)
1
2
(
T
1,3,3
+
T
3,1,3
)
1
2
(
T
2,3,1
+
T
3,2,1
)
1
2
(
T
2,3,2
+
T
3,2,2
)
1
2
(
T
2,3,3
+
T
3,2,3
)
T
3,3,1
T
3,3,2
T
3,3,3
In[2]:=
Symmetrize
[T,Antisymmetric[{1,2}]]["Components"]//MatrixForm
Out[2]//MatrixForm=
0
0
0
1
2
(
T
1,2,1
-
T
2,1,1
)
1
2
(
T
1,2,2
-
T
2,1,2
)
1
2
(
T
1,2,3
-
T
2,1,3
)
1
2
(
T
1,3,1
-
T
3,1,1
)
1
2
(
T
1,3,2
-
T
3,1,2
)
1
2
(
T
1,3,3
-
T
3,1,3
)
1
2
(-
T
1,2,1
+
T
2,1,1
)
1
2
(-
T
1,2,2
+
T
2,1,2
)
1
2
(-
T
1,2,3
+
T
2,1,3
)
0
0
0
1
2
(
T
2,3,1
-
T
3,2,1
)
1
2
(
T
2,3,2
-
T
3,2,2
)
1
2
(
T
2,3,3
-
T
3,2,3
)
1
2
(-
T
1,3,1
+
T
3,1,1
)
1
2
(-
T
1,3,2
+
T
3,1,2
)
1
2
(-
T
1,3,3
+
T
3,1,3
)
1
2
(-
T
2,3,1
+
T
3,2,1
)
1
2
(-
T
2,3,2
+
T
3,2,2
)
1
2
(-
T
2,3,3
+
T
3,2,3
)
0
0
0
​
And in a expression, indices can be used to replace slot number, too.
In[1]:=
T=
CreateTensor
["T",{1,2},{x,y,z},Array[
"T"
##
&,{3,3,3}]];​​
Symmetrize
[T["a","bc"],Symmetric[{"a","b"}]]["Components"]//MatrixForm
Out[1]//MatrixForm=
T
1,1,1
T
1,1,2
T
1,1,3
1
2
(
T
1,2,1
+
T
2,1,1
)
1
2
(
T
1,2,2
+
T
2,1,2
)
1
2
(
T
1,2,3
+
T
2,1,3
)
1
2
(
T
1,3,1
+
T
3,1,1
)
1
2
(
T
1,3,2
+
T
3,1,2
)
1
2
(
T
1,3,3
+
T
3,1,3
)
1
2
(
T
1,2,1
+
T
2,1,1
)
1
2
(
T
1,2,2
+
T
2,1,2
)
1
2
(
T
1,2,3
+
T
2,1,3
)
T
2,2,1
T
2,2,2
T
2,2,3
1
2
(
T
2,3,1
+
T
3,2,1
)
1
2
(
T
2,3,2
+
T
3,2,2
)
1
2
(
T
2,3,3
+
T
3,2,3
)
1
2
(
T
1,3,1
+
T
3,1,1
)
1
2
(
T
1,3,2
+
T
3,1,2
)
1
2
(
T
1,3,3
+
T
3,1,3
)
1
2
(
T
2,3,1
+
T
3,2,1
)
1
2
(
T
2,3,2
+
T
3,2,2
)
1
2
(
T
2,3,3
+
T
3,2,3
)
T
3,3,1
T
3,3,2
T
3,3,3
Scope  
(1)

Properties & Relations  
(1)

SeeAlso
Symmetrize
 
▪
CreateTensor
RelatedGuides
▪
Get Started
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com