tensor
symmetrize
symmetrize the components of a tensor over any of its indices
antisymmetrize
antisymmetrize the components of a tensor over any of its indices
Calling Sequence
Parameters
Description
Examples
symmetrize(T, [i1, i2, ... ])
antisymmetrize(T, [i1, i2, ... ])
T
-
object whose components are being symmetrized/antisymmetrized
i1, i2, ...
indices of T of identical index character to symmetrize/antisymmetrize over
Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][SymmetrizeIndices], Physics[Symmetrize], and Physics[Antisymmetrize] instead.
Given any tensor_type, T, of rank 2 or more, and a list of indices (positive integers) of T of identical covariant/contravariant character, [i1,i2,...], the command symmetrize(T, [i1, i2, ... ]) computes the components of T symmetrized over the indices i1,.... Similarly, the command antisymmetrize(T, [i1, i2, ... ]) computes the components of T antisymmetrized over the indices i1,....
Note that it is imperative that the indices given in the list all be of identical index character. It is not possible to symmetrize/antisymmetrize over indices of mixed type.
Also note that T must be of rank 2 or greater and that the number of indices given in the list must not exceed the rank of T and must be at least two.
For example, if T is a rank 3 tensor with index character −1,1,−1, then symmetrize (T, [1,3]) would compute:
T(a| |c)b=Tacb+Tcab2
for each component a,b,c, and antisymmetrize(T, [1,3]) would compute:
T[a| |c]b=Tacb−Tcab2
for each component a,b,c. The call symmetrize(T,[1,2]) would generate an error since the first and second indices of T are of opposite index character.
If all of the indices of T are specified, then the result will be totally symmetric/antisymmetric. In this case, the components of the result are declared using the Maple symmetric/antisymmetric indexing function.
Simplification: Because these operations involve merely taking linear combinations of the components of T, the routine `tensor/lin_com/simp` is used once on each component of the result after all of the terms have been added.
This function is part of the tensor package, and so can be used in the form symmetrize(..) only after performing the command with(tensor) or with(tensor, symmetrize). The function can always be accessed in the long form tensor[symmetrize](..).
with⁡tensor:
Define a rank 3 tensor_type with "symbolic" components.
T_compts≔array⁡1..3,1..3,1..3:
forito3doforjto3doforkto3doT_comptsi,j,k≔cat⁡T,i,j,kenddoenddoenddo:T≔create⁡1,1,1,eval⁡T_compts
T≔table⁡compts=array⁡1..3,1..3,1..3,1,1,1=T111,1,1,2=T112,1,1,3=T113,1,2,1=T121,1,2,2=T122,1,2,3=T123,1,3,1=T131,1,3,2=T132,1,3,3=T133,2,1,1=T211,2,1,2=T212,2,1,3=T213,2,2,1=T221,2,2,2=T222,2,2,3=T223,2,3,1=T231,2,3,2=T232,2,3,3=T233,3,1,1=T311,3,1,2=T312,3,1,3=T313,3,2,1=T321,3,2,2=T322,3,2,3=T323,3,3,1=T331,3,3,2=T332,3,3,3=T333,index_char=1,1,1
Symmetrize T over its first two indices.
symmetrize⁡T,1,2
table⁡compts=array⁡1..3,1..3,1..3,1,1,1=T111,1,1,2=T112,1,1,3=T113,1,2,1=T1212+T2112,1,2,2=T1222+T2122,1,2,3=T1232+T2132,1,3,1=T1312+T3112,1,3,2=T1322+T3122,1,3,3=T1332+T3132,2,1,1=T1212+T2112,2,1,2=T1222+T2122,2,1,3=T1232+T2132,2,2,1=T221,2,2,2=T222,2,2,3=T223,2,3,1=T2312+T3212,2,3,2=T2322+T3222,2,3,3=T2332+T3232,3,1,1=T1312+T3112,3,1,2=T1322+T3122,3,1,3=T1332+T3132,3,2,1=T2312+T3212,3,2,2=T2322+T3222,3,2,3=T2332+T3232,3,3,1=T331,3,3,2=T332,3,3,3=T333,index_char=1,1,1
Anti-symmetrize T over all of its indices -- note that the result is totally antisymmetric.
antisymmetrize⁡T,1,2,3
table⁡compts=array⁡antisymmetric,1..3,1..3,1..3,1,1,1=0,1,1,2=0,1,1,3=0,1,2,1=0,1,2,2=0,1,2,3=T1236−T1326−T2136+T2316+T3126−T3216,1,3,1=0,1,3,2=−T1236+T1326+T2136−T2316−T3126+T3216,1,3,3=0,2,1,1=0,2,1,2=0,2,1,3=−T1236+T1326+T2136−T2316−T3126+T3216,2,2,1=0,2,2,2=0,2,2,3=0,2,3,1=T1236−T1326−T2136+T2316+T3126−T3216,2,3,2=0,2,3,3=0,3,1,1=0,3,1,2=T1236−T1326−T2136+T2316+T3126−T3216,3,1,3=0,3,2,1=−T1236+T1326+T2136−T2316−T3126+T3216,3,2,2=0,3,2,3=0,3,3,1=0,3,3,2=0,3,3,3=0,index_char=1,1,1
Now define a symmetric rank 2 tensor (again with symbolic components).
g_compts≔array⁡symmetric,1..3,1..3:
forito3doforjfromito3dog_comptsi,j≔cat⁡g,i,jenddoenddo:g≔create⁡−1,−1,eval⁡g_compts
g≔table⁡compts=g11g12g13g12g22g23g13g23g33,index_char=−1,−1
Because g it totally symmetric, if you antisymmetrize it, you should get zero.
antisymmetrize⁡g,1,2
table⁡compts=000000000,index_char=−1,−1
See Also
DifferentialGeometry[SymmetrizeIndices]
Physics[Antisymmetrize]
Physics[Symmetrize]
tensor(deprecated)
tensor(deprecated)/lin_com
Download Help Document