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 &t dx+dy &t dy+du &t du+dv &t dv

g:=_DGtensor,M,cov_bas,cov_bas,,1,1,1,2,2,1,3,3,1,4,4,1,_DGtensor,M,cov_bas,cov_bas,,1,1,1,2,2,1,3,3,1,4,4,1

(2.2)

 

Define a list of vectors S1.

M > 

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

S1:=_DGvector,M,,1,1,_DGvector,M,,1,1+_DGvector,M,,2,1,_DGvector,M,,2,1,_DGvector,M,,2,1,_DGvector,M,,2,1+2_DGvector,M,,3,1,_DGvector,M,,3,1,_DGvector,M,,3,1,_DGvector,M,,3,1_DGvector,M,,4,1,_DGvector,M,,4,1,_DGvector,M,,4,1,_DGvector,M,,4,1

(2.3)
M > 

T1DGGramSchmidtS1,g

T1:=_DGvector,M,,1,22,2,22,_DGvector,M,,1,22,2,22,_DGvector,M,,1,26,2,26,3,223,_DGvector,M,,1,26,2,26,3,223,_DGvector,M,,1,1015,2,1015,3,1030,4,31010,_DGvector,M,,1,1015,2,1015,3,1030,4,31010,_DGvector,M,,1,105,2,105,3,1010,4,1010,_DGvector,M,,1,105,2,105,3,1010,4,1010

(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:=_DGvector,M,,1,1,2,1,_DGvector,M,,1,1,2,1,_DGvector,M,,1,12,2,12,3,2,_DGvector,M,,1,12,2,12,3,2,_DGvector,M,,1,29,2,29,3,19,4,−1,_DGvector,M,,1,29,2,29,3,19,4,−1,_DGvector,M,,1,15,2,15,3,110,4,110,_DGvector,M,,1,15,2,15,3,110,4,110

(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 &w dydu &w dv,dx &w dy,dx &w dvdy &w dv,dx &w dv,dx &w du+dy &w dv

S2:=_DGform,M,2,1,2,1,3,4,−1,_DGform,M,2,1,2,1,3,4,−1,_DGform,M,2,1,2,1,_DGform,M,2,1,2,1,_DGform,M,2,1,4,1,2,4,−1,_DGform,M,2,1,4,1,2,4,−1,_DGform,M,2,1,4,1,_DGform,M,2,1,4,1,_DGform,M,2,1,3,1,2,4,1,_DGform,M,2,1,3,1,2,4,1

(2.6)
M > 

T2DGGramSchmidtS2,g

T2:=_DGform,M,2,1,2,12,3,4,12,_DGform,M,2,1,2,12,3,4,12,_DGform,M,2,1,2,12,3,4,12,_DGform,M,2,1,2,12,3,4,12,_DGform,M,2,1,4,12,2,4,12,_DGform,M,2,1,4,12,2,4,12,_DGform,M,2,1,4,12,2,4,12,_DGform,M,2,1,4,12,2,4,12,_DGform,M,2,1,3,22,_DGform,M,2,1,3,22

(2.7)
M > 

TensorInnerProductg,T2,T2

 

Example 3.

Consider now an indefinite metric.

M > 

g3evalDGdx &t dx+dy &t dydu &t dudv &t dv

g3:=_DGtensor,M,cov_bas,cov_bas,,1,1,1,2,2,1,3,3,−1,4,4,−1,_DGtensor,M,cov_bas,cov_bas,,1,1,1,2,2,1,3,3,−1,4,4,−1

(2.8)
M > 

S3dx,dy,du,dv

S3:=_DGform,M,1,1,1,_DGform,M,1,1,1,_DGform,M,1,2,1,_DGform,M,1,2,1,_DGform,M,1,3,1,_DGform,M,1,3,1,_DGform,M,1,4,1,_DGform,M,1,4,1

(2.9)

 

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

M > 

DGGramSchmidtS3,g3

_DGform,M,1,1,1,_DGform,M,1,1,1,_DGform,M,1,2,1,_DGform,M,1,2,1,_DGform,M,1,3,−I,_DGform,M,1,3,−I,_DGform,M,1,4,−I,_DGform,M,1,4,−I

(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

_DGform,M,1,1,1,_DGform,M,1,1,1,_DGform,M,1,2,1,_DGform,M,1,2,1,_DGform,M,1,3,1,_DGform,M,1,3,1,_DGform,M,1,4,1,_DGform,M,1,4,1

(2.11)

 

Example 4.

Consider another indefinite metric.

M > 

g4evalDGdx &s dy+du &t du+dv &t dv

g4:=_DGtensor,M,cov_bas,cov_bas,,1,2,12,2,1,12,3,3,1,4,4,1,_DGtensor,M,cov_bas,cov_bas,,1,2,12,2,1,12,3,3,1,4,4,1

(2.12)
M > 

S4D_x,D_y,D_u,D_v

S4:=_DGvector,M,,1,1,_DGvector,M,,1,1,_DGvector,M,,2,1,_DGvector,M,,2,1,_DGvector,M,,3,1,_DGvector,M,,3,1,_DGvector,M,,4,1,_DGvector,M,,4,1

(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:=_DGvector,M,,1,1,3,1,_DGvector,M,,1,1,3,1,_DGvector,M,,2,1,_DGvector,M,,2,1,_DGvector,M,,3,1,_DGvector,M,,3,1,_DGvector,M,,4,1,_DGvector,M,,4,1

(2.14)
M > 

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

_DGvector,M,,1,1,3,1,_DGvector,M,,1,1,3,1,_DGvector,M,,1,−1,2,2,3,−1,_DGvector,M,,1,−1,2,2,3,−1,_DGvector,M,,2,−2,3,1,_DGvector,M,,2,−2,3,1,_DGvector,M,,4,1,_DGvector,M,,4,1

(2.15)

 

Alternatively, we can adjust the signature option.

M > 

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

_DGvector,M,,1,1,2,1,_DGvector,M,,1,1,2,1,_DGvector,M,,1,1,2,−1,_DGvector,M,,1,1,2,−1,_DGvector,M,,3,1,_DGvector,M,,3,1,_DGvector,M,,4,1,_DGvector,M,,4,1

(2.16)

See Also

DifferentialGeometry, Tensor, TensorInnerProduct