ContractIndices - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Tensor[ContractIndices] - contract the indices of a tensor

Calling Sequences

     ContractIndices(T, Indices1)

     ContractIndices(T, S, Indices2)

Parameters

   T         - a tensor

   S         - (optional) a tensor

   Indices1  - a list of pairs of integers  referring to the arguments of T which are to be contracted

   Indices2  - a list of pairs of integers  referring to the arguments of T and S which are to be contracted

 

Description

Examples

Description

• 

With the first calling sequence, ContractIndices(T, Indices) will contract from  each pair of indices in the list Indices = . Each index pair must refer to indices of different valence, for example, if  is a contravariant index, then  must be a covariant index. If  is of type  (contravariant rank  and covariant rank ) and the list Indices1 contains  index pairs, then ContractIndices(T, Indices1) will return a tensor of type .

• 

With the second calling sequence, ContractIndices(T, S, Indices), where Indices = , will contract the  index of  with the  index , the  index of  with the  index  and so on. Each index pair must refer to indices of different valence. If  is of type , of type , and if the list Indices2 contains  index pairs, then ContractIndices(T, Indices2) will return a tensor of type .

• 

This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form ContractIndices(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order. It can always be used in the long form DifferentialGeometry:-Tensor:-ContractIndices.

Examples

 

Example 1.

First create a 4 dimensional manifold  and define a type  tensor  on .

M > 

(2.1)

 

Contract the 1st and 4th indices of .

M > 

(2.2)

 

Contract the 1st and 4th indices and the 2nd and 3rd indices of .

M > 

(2.3)

 

Example 2.

Define two rank 3 tensors  and .

M > 

(2.4)
M > 

(2.5)

 

Form the tensor product  and contract the 1st index of  against the 1st index of .

M > 

(2.6)

 

Form the tensor product  and contract the 1st index of  against the 1st index of  and the 2nd index of  against the 3rd index of .

M > 

(2.7)

 

Example 3.

Define a type  tensor  and evaluate it on the1-form  and the vectors .

M > 

(2.8)
M > 

(2.9)
M > 

M > 

(2.10)

See Also

DifferentialGeometry

Tensor

RaiseLowerIndices

 


Download Help Document