DGbasis - Maple Help

DifferentialGeometry

 DGbasis
 calculate the dual basis to a given basis of vectors or 1-forms

 Calling Sequence DGbasis(S, option)

Parameters

 S - a list of vectors, forms or tensors option - the keyword argument method = "real"

Description

 • Let S = [S_1, S_2, ..., S_k] be a list of  vectors, matrices, differential forms, or tensors. Then DGbasis(S) returns a sublist B = [S_i_1, S_i_2, ..., S_i_r] of S such that the elements of B define a basis for the subspace spanned by the elements of S.  Thus the elements of B are linearly independent and span(S) = span(B).
 • With the  keyword argument method = "real", the set S is viewed as a vector space of vectors, forms or tensors over the real numbers and the basis is calculated using real number coefficients instead of general expression (function) coefficients.
 • This command is part of the DifferentialGeometry package, and so can be used in the form DGbasis(...) only after executing the command with(DifferentialGeometry).  It can always be used in the long form DifferentialGeometry:-DGbasis.

Examples

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

Initialize a 4-dimensional manifold M with coordinates [x, y, z, w].

 > $\mathrm{DGsetup}\left(\left[x,y,z,w\right],M\right):$

Example 1.

Find a basis B1 for the span of the vectors in S1.

 > $\mathrm{S1}≔\mathrm{evalDG}\left(\left[\mathrm{D_x},\mathrm{D_x}+\mathrm{D_y},\mathrm{D_y},0\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&mult\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_x},\mathrm{D_y}-\mathrm{D_z},\mathrm{D_z},\mathrm{D_x}+\mathrm{D_y}+\mathrm{D_w}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{0}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{3}\right]{,}{-}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (1)
 > $\mathrm{B1}≔\mathrm{DGbasis}\left(\mathrm{S1}\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{3}\right]{,}{-}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{2}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (2)

Use the GetComponents command to check that each vector in S is a unique linear combination of the vectors in B. (GetComponents returns the coefficients of the vectors in S as linear combination of the vectors in B.  If one of the vectors in S is not a linear combination of the vectors in B, an empty list [] is returned).

 > $\mathrm{GetComponents}\left(\mathrm{S1},\mathrm{B1}\right)$
 $\left[\left[{1}{,}{0}{,}{0}{,}{0}\right]{,}\left[{0}{,}{1}{,}{0}{,}{0}\right]{,}\left[{-1}{,}{1}{,}{0}{,}{0}\right]{,}\left[{0}{,}{0}{,}{0}{,}{0}\right]{,}\left[{0}{,}{0}{,}{1}{,}{0}\right]{,}\left[{-1}{,}{1}{,}{-1}{,}{0}\right]{,}\left[{0}{,}{0}{,}{0}{,}{1}\right]\right]$ (3)

The basis B1 is not the simplest basis for S1.  Another choice of basis for S1 can be found using the command CanonicalBasis.

 > $\mathrm{Tools}:-\mathrm{CanonicalBasis}\left(\mathrm{B1},\left[\mathrm{D_x},\mathrm{D_y},\mathrm{D_z},\mathrm{D_w}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)\right]$ (4)

Example 2.

Find a basis for the span of the tensors in S2.

 > $\mathrm{S2}≔\mathrm{evalDG}\left(\left[\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx},\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx},\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx},\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{2}{,}{2}\right]{,}{1}\right]\right]\right]\right)\right]$ (5)
 > $\mathrm{DGbasis}\left(\mathrm{S2}\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{2}{,}{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{2}{,}{2}\right]{,}{1}\right]\right]\right]\right)\right]$ (6)

Example 3.

DGbasis also accepts a list of Matrices or Vectors.

 > $\mathrm{S3}≔\left[\mathrm{Matrix}\left(\left[\left[0,1\right],\left[0,0\right]\right]\right),\mathrm{Matrix}\left(\left[\left[1,0\right],\left[0,1\right]\right]\right),\mathrm{Matrix}\left(\left[\left[1,1\right],\left[0,1\right]\right]\right),\mathrm{Matrix}\left(\left[\left[1,0\right],\left[0,-1\right]\right]\right)\right]$
 $\left[\left[\begin{array}{rr}0& 1\\ 0& 0\end{array}\right]{,}\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]{,}\left[\begin{array}{rr}1& 1\\ 0& 1\end{array}\right]{,}\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right]$ (7)

 > $\mathrm{DGbasis}\left(\mathrm{S3}\right)$
 $\left[\left[\begin{array}{rr}0& 1\\ 0& 0\end{array}\right]{,}\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]{,}\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right]$ (8)

Example 4.

 > $\mathrm{S4}≔\mathrm{evalDG}\left(\left[\mathrm{D_x},x\mathrm{D_x},\left(3x-4\right)\mathrm{D_x}\right]\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{x}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{3}{}{x}{-}{4}\right]\right]\right]\right)\right]$ (9)

Here is the basis for S4 using function coefficients.

 > $\mathrm{DGbasis}\left(\mathrm{S4}\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right)\right]$ (10)

Here is the basis for S4 using real number coefficients.

 > $\mathrm{DGbasis}\left(\mathrm{S4},\mathrm{method}="real"\right)$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{x}\right]\right]\right]\right)\right]$ (11)
 M >