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

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

withDifferentialGeometry:withTensor:

 

Example 1.

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

 

DGsetupx,y,u,v,M

frame name: M

(2.1)

 

Define a metric g on M.

M > 

gevalDGdx&tdx+dy&tdy+du&tdu+dv&tdv

g:=dxdx+dydy+dudu+dvdv

(2.2)

 

Define a list of vectors S1.

M > 

S1D_x+D_y,D_y+2D_u,D_uD_v,D_v

S1:=D_x+D_y,D_y+2D_u,D_uD_v,D_v

(2.3)
M > 

T1DGGramSchmidtS1,g

T1:=22D_x+22D_y,26D_x+26D_y+223D_u,1015D_x1015D_y+1030D_u31010D_v,105D_x105D_y+1010D_u+1010D_v

(2.4)

 

We use the command TensorInnerProduct. to check this result.

M > 

TensorInnerProductg,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 > 

T1uDGGramSchmidtS1,g,method=unnormalized

T1u:=D_x+D_y,12D_x+12D_y+2D_u,29D_x29D_y+19D_uD_v,15D_x15D_y+110D_u+110D_v

(2.5)
M > 

TensorInnerProductg,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 > 

S2evalDGdx&wdydu&wdv,dx&wdy,dx&wdvdy&wdv,dx&wdv,dx&wdu+dy&wdv

S2:=dxdydudv,dxdy,dxdvdydv,dxdv,dxdu+dydv

(2.6)
M > 

T2DGGramSchmidtS2,g

T2:=12dxdy12dudv,12dxdy+12dudv,12dxdv12dydv,12dxdv+12dydv,22dxdu

(2.7)
M > 

TensorInnerProductg,T2,T2

 

Example 3.

Consider now an indefinite metric.

M > 

g3evalDGdx&tdx+dy&tdydu&tdudv&tdv

g3:=dxdx+dydydududvdv

(2.8)
M > 

S3dx,dy,du,dv

S3:=dx,dy,du,dv

(2.9)

 

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

M > 

DGGramSchmidtS3,g3

dx,dy,Idu,Idv

(2.10)

 

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

M > 

DGGramSchmidtS3,g3,signature=1,1,1,1

dx,dy,du,dv

(2.11)

 

Example 4.

Consider another indefinite metric.

M > 

g4evalDGdx&sdy+du&tdu+dv&tdv

g4:=12dxdy+12dydx+dudu+dvdv

(2.12)
M > 

S4D_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 > 

S4aevalDGD_x+D_u,D_y,D_u,D_v

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

(2.14)
M > 

DGGramSchmidtS4a,g4,signature=1,1,1,1

D_x+D_u,D_x+2D_yD_u,2D_y+D_u,D_v

(2.15)

 

Alternatively, we can adjust the signature option.

M > 

DGGramSchmidtS4,g4,signature=1,1,1,1

D_x+D_y,D_xD_y,D_u,D_v

(2.16)

See Also

DifferentialGeometry, Tensor, TensorInnerProduct