DifferentialGeometry/Tensor/DGGramSchmidt - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : DifferentialGeometry/Tensor/DGGramSchmidt

Tensor[DGGramSchmidt] - calculate an orthonormal basis with respect to a metric

Calling Sequences

     DGGramSchmidt(S, g, method, signature)

Parameters

   S         - a list of differential forms, vectors or tensors

   g         - a metric tensor

   method    - (optional) keyword argument method = "normalized" or method = "un-normalized" 

   signature - (optional) keyword argument signature = pm, where pm is a list of +1 or -1

 

 

Description

Examples

See Also

Description

• 

The command DGGramSchmidt applies the usual Gram-Schmidt procedure to a list S=X1,X2,...,Xm, of m independent vectors, forms or tensors (the forms or tensors must all be of the same type). The procedure returns a list orthogonal vectors, forms or tensors Y1,Y2,...,Ym such that

spanY1,Y2,...,Yk = spanX1,X2,...,Xk for k=1,2,...,m.

• 

The inner products of differential forms and tensors are calculated using TensorInnerProduct.

• 

The default assumption is that the metric g is positive-definite, that is, the signature is 1,1,...,1. In this case the length of each Yk is normalized to 1.  With method = "un-normalized" the Yk are left un-normalized.

• 

If, for example, the signature of g is 1,−1,−1,−1, use the keyword signature = [+1, -1, -1, -1]. The length of Y1 is normalized to 1 and the lengths of Y2,Y3,Y4 are normalized to −1.

• 

If, for example, the signature of g is 1,−1,−1,−1 and the vectors X1,X2 are both null, then the usual Gram-Schmidt procedure will fail. In this case set signature = [[1,-1], 1, 1] and DGGramSchmidt will take Y1 to be a vector of non-zero length in the span of X1,X2.

• 

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

Examples

> 

with⁡DifferentialGeometry:with⁡Tensor:

 

Example 1.

First define a 4 dimensional manifold M with coordinates x,y,u,v.

 

> 

DGsetup⁡x,y,u,v,M

frame name: M

(2.1)

 

Define a metric g on M.

M > 

g≔evalDG⁡dx&tdx+dy&tdy+du&tdu+dv&tdv

g:=dx⁢dx+dy⁢dy+du⁢du+dv⁢dv

(2.2)

 

Define a list of vectors S1.

M > 

S1≔D_x+D_y,D_y+2⁢D_u,D_u−D_v,D_v

S1:=D_x+D_y,D_y+2⁢D_u,D_u−D_v,D_v

(2.3)
M > 

T1≔DGGramSchmidt⁡S1,g

T1:=22⁢D_x+22⁢D_y,−26⁢D_x+26⁢D_y+2⁢23⁢D_u,1015⁢D_x−1015⁢D_y+1030⁢D_u−3⁢1010⁢D_v,105⁢D_x−105⁢D_y+1010⁢D_u+1010⁢D_v

(2.4)

 

We use the command TensorInnerProduct. to check this result.

M > 

TensorInnerProduct⁡g,T1,T1

 

We repeat the same computation with method = "un-normalized". The result is free of square roots but now the vectors are not unit vectors.

M > 

T1u≔DGGramSchmidt⁡S1,g,method=unnormalized

T1u:=D_x+D_y,−12⁢D_x+12⁢D_y+2⁢D_u,29⁢D_x−29⁢D_y+19⁢D_u−D_v,15⁢D_x−15⁢D_y+110⁢D_u+110⁢D_v

(2.5)
M > 

TensorInnerProduct⁡g,T1u,T1u

 

Example 2.

We continue with the metric from Example 1 but now apply the Gram-Schmidt procedure to a list of 2-forms.

 

M > 

S2≔evalDG⁡dx&wdy−du&wdv,dx&wdy,dx&wdv−dy&wdv,dx&wdv,dx&wdu+dy&wdv

S2:=dx⁢⋀⁢dy−du⁢⋀⁢dv,dx⁢⋀⁢dy,dx⁢⋀⁢dv−dy⁢⋀⁢dv,dx⁢⋀⁢dv,dx⁢⋀⁢du+dy⁢⋀⁢dv

(2.6)
M > 

T2≔DGGramSchmidt⁡S2,g

T2:=12⁢dx⁢⋀⁢dy−12⁢du⁢⋀⁢dv,12⁢dx⁢⋀⁢dy+12⁢du⁢⋀⁢dv,12⁢dx⁢⋀⁢dv−12⁢dy⁢⋀⁢dv,12⁢dx⁢⋀⁢dv+12⁢dy⁢⋀⁢dv,22⁢dx⁢⋀⁢du

(2.7)
M > 

TensorInnerProduct⁡g,T2,T2

 

Example 3.

Consider now an indefinite metric.

M > 

g3≔evalDG⁡dx&tdx+dy&tdy−du&tdu−dv&tdv

g3:=dx⁢dx+dy⁢dy−du⁢du−dv⁢dv

(2.8)
M > 

S3≔dx,dy,du,dv

S3:=dx,dy,du,dv

(2.9)

 

A direct application of the GramSchmidt process yields complex-valued forms.

M > 

DGGramSchmidt⁡S3,g3

dx,dy,−I⁢du,−I⁢dv

(2.10)

 

We can adjust the normalization of the last two 1-forms to have length -1 to obtain a real basis:

M > 

DGGramSchmidt⁡S3,g3,signature=1,1,−1,−1

dx,dy,du,dv

(2.11)

 

Example 4.

Consider another indefinite metric.

M > 

g4≔evalDG⁡dx&sdy+du&tdu+dv&tdv

g4:=12⁢dx⁢dy+12⁢dy⁢dx+du⁢du+dv⁢dv

(2.12)
M > 

S4≔D_x,D_y,D_u,D_v

S4:=D_x,D_y,D_u,D_v

(2.13)

 

A direct application of the GramSchmidt process fails since the first two vectors are null vectors. We can work around this problem by changing the initial basis.

M > 

S4a≔evalDG⁡D_x+D_u,D_y,D_u,D_v

S4a:=D_x+D_u,D_y,D_u,D_v

(2.14)
M > 

DGGramSchmidt⁡S4a,g4,signature=1,−1,1,1

D_x+D_u,−D_x+2⁢D_y−D_u,−2⁢D_y+D_u,D_v

(2.15)

 

Alternatively, we can adjust the signature option.

M > 

DGGramSchmidt⁡S4,g4,signature=1,−1,1,1

D_x+D_y,D_x−D_y,D_u,D_v

(2.16)

See Also

DifferentialGeometry, Tensor, TensorInnerProduct