tensor(deprecated)/symmetrize - Maple Help

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 symmetrize(T, [i1, i2, ... ]) antisymmetrize(T, [i1, i2, ... ])

Parameters

 T - object whose components are being symmetrized/antisymmetrized i1, i2, ... - indices of T of identical index character to symmetrize/antisymmetrize over

Description

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, $[\mathrm{i1},\mathrm{i2},...]$, the command symmetrize(T, [i1, i2, ... ]) computes the components of T symmetrized over the indices $\mathrm{i1},...$.  Similarly, the command antisymmetrize(T, [i1, i2, ... ]) computes the components of T antisymmetrized over the indices $\mathrm{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 $\left[-1,1,-1\right]$, then symmetrize (T, [1,3]) would compute:

${T}_{\mathrm{\left(a| |c\right)}}^{b}=\frac{\left({T}_{\mathrm{ac}}^{b}+{T}_{\mathrm{ca}}^{b}\right)}{2}$

 for each component $\left[a,b,c\right]$, and antisymmetrize(T, [1,3]) would compute:

${T}_{\mathrm{\left[a| |c\right]}}^{b}=\frac{\left({T}_{\mathrm{ac}}^{b}-{T}_{\mathrm{ca}}^{b}\right)}{2}$

 for each component $\left[a,b,c\right]$.  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](..).

Examples

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][SymmetrizeIndices], Physics[Symmetrize], and Physics[Antisymmetrize] instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$

Define a rank 3 tensor_type with "symbolic" components.

 > $\mathrm{T_compts}≔\mathrm{array}\left(1..3,1..3,1..3\right):$
 > $\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}j\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}k\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{T_compts}\left[i,j,k\right]≔\mathrm{cat}\left('T',i,j,k\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}:$$T≔\mathrm{create}\left(\left[1,1,1\right],\mathrm{eval}\left(\mathrm{T_compts}\right)\right)$
 ${T}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}{array}{}\left({1}{..}{3}{,}{1}{..}{3}{,}{1}{..}{3}{,}\left[\left({1}{,}{1}{,}{1}\right){=}{\mathrm{T111}}{,}\left({1}{,}{1}{,}{2}\right){=}{\mathrm{T112}}{,}\left({1}{,}{1}{,}{3}\right){=}{\mathrm{T113}}{,}\left({1}{,}{2}{,}{1}\right){=}{\mathrm{T121}}{,}\left({1}{,}{2}{,}{2}\right){=}{\mathrm{T122}}{,}\left({1}{,}{2}{,}{3}\right){=}{\mathrm{T123}}{,}\left({1}{,}{3}{,}{1}\right){=}{\mathrm{T131}}{,}\left({1}{,}{3}{,}{2}\right){=}{\mathrm{T132}}{,}\left({1}{,}{3}{,}{3}\right){=}{\mathrm{T133}}{,}\left({2}{,}{1}{,}{1}\right){=}{\mathrm{T211}}{,}\left({2}{,}{1}{,}{2}\right){=}{\mathrm{T212}}{,}\left({2}{,}{1}{,}{3}\right){=}{\mathrm{T213}}{,}\left({2}{,}{2}{,}{1}\right){=}{\mathrm{T221}}{,}\left({2}{,}{2}{,}{2}\right){=}{\mathrm{T222}}{,}\left({2}{,}{2}{,}{3}\right){=}{\mathrm{T223}}{,}\left({2}{,}{3}{,}{1}\right){=}{\mathrm{T231}}{,}\left({2}{,}{3}{,}{2}\right){=}{\mathrm{T232}}{,}\left({2}{,}{3}{,}{3}\right){=}{\mathrm{T233}}{,}\left({3}{,}{1}{,}{1}\right){=}{\mathrm{T311}}{,}\left({3}{,}{1}{,}{2}\right){=}{\mathrm{T312}}{,}\left({3}{,}{1}{,}{3}\right){=}{\mathrm{T313}}{,}\left({3}{,}{2}{,}{1}\right){=}{\mathrm{T321}}{,}\left({3}{,}{2}{,}{2}\right){=}{\mathrm{T322}}{,}\left({3}{,}{2}{,}{3}\right){=}{\mathrm{T323}}{,}\left({3}{,}{3}{,}{1}\right){=}{\mathrm{T331}}{,}\left({3}{,}{3}{,}{2}\right){=}{\mathrm{T332}}{,}\left({3}{,}{3}{,}{3}\right){=}{\mathrm{T333}}\right]\right){,}{\mathrm{index_char}}{=}\left[{1}{,}{1}{,}{1}\right]\right]\right)$ (1)

Symmetrize T over its first two indices.

 > $\mathrm{symmetrize}\left(T,\left[1,2\right]\right)$
 ${table}{}\left(\left[{\mathrm{compts}}{=}{array}{}\left({1}{..}{3}{,}{1}{..}{3}{,}{1}{..}{3}{,}\left[\left({1}{,}{1}{,}{1}\right){=}{\mathrm{T111}}{,}\left({1}{,}{1}{,}{2}\right){=}{\mathrm{T112}}{,}\left({1}{,}{1}{,}{3}\right){=}{\mathrm{T113}}{,}\left({1}{,}{2}{,}{1}\right){=}\frac{{\mathrm{T121}}}{{2}}{+}\frac{{\mathrm{T211}}}{{2}}{,}\left({1}{,}{2}{,}{2}\right){=}\frac{{\mathrm{T122}}}{{2}}{+}\frac{{\mathrm{T212}}}{{2}}{,}\left({1}{,}{2}{,}{3}\right){=}\frac{{\mathrm{T123}}}{{2}}{+}\frac{{\mathrm{T213}}}{{2}}{,}\left({1}{,}{3}{,}{1}\right){=}\frac{{\mathrm{T131}}}{{2}}{+}\frac{{\mathrm{T311}}}{{2}}{,}\left({1}{,}{3}{,}{2}\right){=}\frac{{\mathrm{T132}}}{{2}}{+}\frac{{\mathrm{T312}}}{{2}}{,}\left({1}{,}{3}{,}{3}\right){=}\frac{{\mathrm{T133}}}{{2}}{+}\frac{{\mathrm{T313}}}{{2}}{,}\left({2}{,}{1}{,}{1}\right){=}\frac{{\mathrm{T121}}}{{2}}{+}\frac{{\mathrm{T211}}}{{2}}{,}\left({2}{,}{1}{,}{2}\right){=}\frac{{\mathrm{T122}}}{{2}}{+}\frac{{\mathrm{T212}}}{{2}}{,}\left({2}{,}{1}{,}{3}\right){=}\frac{{\mathrm{T123}}}{{2}}{+}\frac{{\mathrm{T213}}}{{2}}{,}\left({2}{,}{2}{,}{1}\right){=}{\mathrm{T221}}{,}\left({2}{,}{2}{,}{2}\right){=}{\mathrm{T222}}{,}\left({2}{,}{2}{,}{3}\right){=}{\mathrm{T223}}{,}\left({2}{,}{3}{,}{1}\right){=}\frac{{\mathrm{T231}}}{{2}}{+}\frac{{\mathrm{T321}}}{{2}}{,}\left({2}{,}{3}{,}{2}\right){=}\frac{{\mathrm{T232}}}{{2}}{+}\frac{{\mathrm{T322}}}{{2}}{,}\left({2}{,}{3}{,}{3}\right){=}\frac{{\mathrm{T233}}}{{2}}{+}\frac{{\mathrm{T323}}}{{2}}{,}\left({3}{,}{1}{,}{1}\right){=}\frac{{\mathrm{T131}}}{{2}}{+}\frac{{\mathrm{T311}}}{{2}}{,}\left({3}{,}{1}{,}{2}\right){=}\frac{{\mathrm{T132}}}{{2}}{+}\frac{{\mathrm{T312}}}{{2}}{,}\left({3}{,}{1}{,}{3}\right){=}\frac{{\mathrm{T133}}}{{2}}{+}\frac{{\mathrm{T313}}}{{2}}{,}\left({3}{,}{2}{,}{1}\right){=}\frac{{\mathrm{T231}}}{{2}}{+}\frac{{\mathrm{T321}}}{{2}}{,}\left({3}{,}{2}{,}{2}\right){=}\frac{{\mathrm{T232}}}{{2}}{+}\frac{{\mathrm{T322}}}{{2}}{,}\left({3}{,}{2}{,}{3}\right){=}\frac{{\mathrm{T233}}}{{2}}{+}\frac{{\mathrm{T323}}}{{2}}{,}\left({3}{,}{3}{,}{1}\right){=}{\mathrm{T331}}{,}\left({3}{,}{3}{,}{2}\right){=}{\mathrm{T332}}{,}\left({3}{,}{3}{,}{3}\right){=}{\mathrm{T333}}\right]\right){,}{\mathrm{index_char}}{=}\left[{1}{,}{1}{,}{1}\right]\right]\right)$ (2)

Anti-symmetrize T over all of its indices -- note that the result is totally antisymmetric.

 > $\mathrm{antisymmetrize}\left(T,\left[1,2,3\right]\right)$
 ${table}{}\left(\left[{\mathrm{compts}}{=}{array}{}\left({\mathrm{antisymmetric}}{,}{1}{..}{3}{,}{1}{..}{3}{,}{1}{..}{3}{,}\left[\left({1}{,}{1}{,}{1}\right){=}{0}{,}\left({1}{,}{1}{,}{2}\right){=}{0}{,}\left({1}{,}{1}{,}{3}\right){=}{0}{,}\left({1}{,}{2}{,}{1}\right){=}{0}{,}\left({1}{,}{2}{,}{2}\right){=}{0}{,}\left({1}{,}{2}{,}{3}\right){=}\frac{{\mathrm{T123}}}{{6}}{-}\frac{{\mathrm{T132}}}{{6}}{-}\frac{{\mathrm{T213}}}{{6}}{+}\frac{{\mathrm{T231}}}{{6}}{+}\frac{{\mathrm{T312}}}{{6}}{-}\frac{{\mathrm{T321}}}{{6}}{,}\left({1}{,}{3}{,}{1}\right){=}{0}{,}\left({1}{,}{3}{,}{2}\right){=}{-}\frac{{\mathrm{T123}}}{{6}}{+}\frac{{\mathrm{T132}}}{{6}}{+}\frac{{\mathrm{T213}}}{{6}}{-}\frac{{\mathrm{T231}}}{{6}}{-}\frac{{\mathrm{T312}}}{{6}}{+}\frac{{\mathrm{T321}}}{{6}}{,}\left({1}{,}{3}{,}{3}\right){=}{0}{,}\left({2}{,}{1}{,}{1}\right){=}{0}{,}\left({2}{,}{1}{,}{2}\right){=}{0}{,}\left({2}{,}{1}{,}{3}\right){=}{-}\frac{{\mathrm{T123}}}{{6}}{+}\frac{{\mathrm{T132}}}{{6}}{+}\frac{{\mathrm{T213}}}{{6}}{-}\frac{{\mathrm{T231}}}{{6}}{-}\frac{{\mathrm{T312}}}{{6}}{+}\frac{{\mathrm{T321}}}{{6}}{,}\left({2}{,}{2}{,}{1}\right){=}{0}{,}\left({2}{,}{2}{,}{2}\right){=}{0}{,}\left({2}{,}{2}{,}{3}\right){=}{0}{,}\left({2}{,}{3}{,}{1}\right){=}\frac{{\mathrm{T123}}}{{6}}{-}\frac{{\mathrm{T132}}}{{6}}{-}\frac{{\mathrm{T213}}}{{6}}{+}\frac{{\mathrm{T231}}}{{6}}{+}\frac{{\mathrm{T312}}}{{6}}{-}\frac{{\mathrm{T321}}}{{6}}{,}\left({2}{,}{3}{,}{2}\right){=}{0}{,}\left({2}{,}{3}{,}{3}\right){=}{0}{,}\left({3}{,}{1}{,}{1}\right){=}{0}{,}\left({3}{,}{1}{,}{2}\right){=}\frac{{\mathrm{T123}}}{{6}}{-}\frac{{\mathrm{T132}}}{{6}}{-}\frac{{\mathrm{T213}}}{{6}}{+}\frac{{\mathrm{T231}}}{{6}}{+}\frac{{\mathrm{T312}}}{{6}}{-}\frac{{\mathrm{T321}}}{{6}}{,}\left({3}{,}{1}{,}{3}\right){=}{0}{,}\left({3}{,}{2}{,}{1}\right){=}{-}\frac{{\mathrm{T123}}}{{6}}{+}\frac{{\mathrm{T132}}}{{6}}{+}\frac{{\mathrm{T213}}}{{6}}{-}\frac{{\mathrm{T231}}}{{6}}{-}\frac{{\mathrm{T312}}}{{6}}{+}\frac{{\mathrm{T321}}}{{6}}{,}\left({3}{,}{2}{,}{2}\right){=}{0}{,}\left({3}{,}{2}{,}{3}\right){=}{0}{,}\left({3}{,}{3}{,}{1}\right){=}{0}{,}\left({3}{,}{3}{,}{2}\right){=}{0}{,}\left({3}{,}{3}{,}{3}\right){=}{0}\right]\right){,}{\mathrm{index_char}}{=}\left[{1}{,}{1}{,}{1}\right]\right]\right)$ (3)

Now define a symmetric rank 2 tensor (again with symbolic components).

 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},1..3,1..3\right):$
 > $\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}j\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{from}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{g_compts}\left[i,j\right]≔\mathrm{cat}\left('g',i,j\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}:$$g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{\mathrm{g11}}& {\mathrm{g12}}& {\mathrm{g13}}\\ {\mathrm{g12}}& {\mathrm{g22}}& {\mathrm{g23}}\\ {\mathrm{g13}}& {\mathrm{g23}}& {\mathrm{g33}}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (4)

Because g it totally symmetric, if you antisymmetrize it, you should get zero.

 > $\mathrm{antisymmetrize}\left(g,\left[1,2\right]\right)$
 ${table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (5)