&algmult - Maple Help

DifferentialGeometry[algebraic operations]

addition, subtraction, scalar multiplication, wedge product, tensor product

 Calling Sequence A &plus B - add two vectors, differential forms or tensors A &minus B- subtract one vector, differential form or tensor from another A &mult B - multiply a Maple expression by a vector, differential form or tensor A &wedge B- form the wedge (or skew) product of a pair of differential forms or multi-vectors A &tensor B- form the tensor product of a pair of tensors A &algmult B - multiply two vectors in an algebra

Parameters

 A, B - Maple expressions, differential forms or tensors

Description

 • In the DifferentialGeometry package the wedge product of 1-forms is defined in terms of the tensor product by $\mathrm{\alpha }\wedge \mathrm{\beta }=\mathrm{\alpha }\otimes \mathrm{\beta }-\mathrm{\beta }\otimes \mathrm{\alpha }$.
 • When using these commands together within a single Maple expression, it is important to use parentheses to insure that the operations are executed in the correct order.
 • In an interactive Maple session, it is usually more convenient to use the commands evalDG and DGzip to perform these basic algebraic operations.
 • Here are the precise lists of admissible arguments for these commands.
 • A &plus B, A &minus B -- A and B: Maple expressions, vectors, differential forms of the same degree, differential biforms of the same bidegree, tensors with the same index type and density weights. A and B must be defined on the same frame.
 • A &mult B -- A: a Maple expression; B: a Maple expression, vector, differential form, differential biform, tensor. A and B must be defined on the same frame.
 • A &wedge B -- A and B: Maple expressions or differential forms, differential biforms.  If A and B are forms, then the sum of their degrees cannot exceed the dimension of the frame on which they are defined. If A and B are bi-forms, then the sum of their horizontal degrees cannot exceed the dimension of the base manifold on which they are defined.  A and B must be defined on the same frame.
 • A &tensor B -- A and B: Maple expressions, vectors, differential 1-forms, tensors.  A and B must be defined on the same frame.
 • These commands are part of the DifferentialGeometry package, and so can be used in the forms given above only after executing the command with(DifferentialGeometry).

Examples

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

Use DGsetup to define a three-dimensional manifold M with coordinates [x, y, z].

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M,\mathrm{verbose}\right)$
 ${\mathrm{The following coordinates have been protected:}}$
 $\left[{x}{,}{y}{,}{z}\right]$
 ${\mathrm{The following vector fields have been defined and protected:}}$
 $\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)\right]$
 ${\mathrm{The following differential 1-forms have been defined and protected:}}$
 $\left[{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{3}\right]{,}{1}\right]\right]\right]\right)\right]$
 ${\mathrm{frame name: M}}$ (1)

Example 1.

Create linear combinations of vector fields and differential 1-forms using &plus and &mult.

 > $\mathrm{X1}≔\mathrm{D_x}&plus\mathrm{D_z}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{3}\right]{,}{1}\right]\right]\right]\right)$ (2)
 > $\mathrm{X2}≔\left(\left(3z\right)&mult\mathrm{D_x}\right)&plus\left(\left(-2y\right)&mult\mathrm{D_y}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{3}{}{z}\right]{,}\left[\left[{2}\right]{,}{-}{2}{}{y}\right]\right]\right]\right)$ (3)
 > $\mathrm{X3}≔\mathrm{X2}&minus\left(\left(3z\right)&mult\mathrm{X1}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{2}\right]{,}{-}{2}{}{y}\right]{,}\left[\left[{3}\right]{,}{-}{3}{}{z}\right]\right]\right]\right)$ (4)
 > $\mathrm{α1}≔\left(\left(\mathrm{sin}\left(z\right)\right)&mult\mathrm{dx}\right)&minus\left(\left(\mathrm{cos}\left(y\right)\right)&mult\mathrm{dz}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{1}\right]{,}{\mathrm{sin}}{}\left({z}\right)\right]{,}\left[\left[{3}\right]{,}{-}{\mathrm{cos}}{}\left({y}\right)\right]\right]\right]\right)$ (5)
 > $\mathrm{α2}≔\left(\left(\mathrm{cos}\left(x\right)\right)&mult\mathrm{dy}\right)&plus\left(\left(\mathrm{cos}\left(z\right)\right)&mult\mathrm{dz}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{1}\right]{,}\left[\left[\left[{2}\right]{,}{\mathrm{cos}}{}\left({x}\right)\right]{,}\left[\left[{3}\right]{,}{\mathrm{cos}}{}\left({z}\right)\right]\right]\right]\right)$ (6)

Example 2.

Create differential 2-forms using &plus and &mult and &wedge.

 > $\mathrm{α3}≔\left(2&mult\left(\mathrm{dx}&wedge\mathrm{dy}\right)\right)&plus\left(5&mult\left(\mathrm{dy}&wedge\mathrm{dz}\right)\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{2}\right]{,}\left[\left[{2}{,}{3}\right]{,}{5}\right]\right]\right]\right)$ (7)
 > $\mathrm{α4}≔\mathrm{α1}&wedge\mathrm{α2}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({x}\right)\right]{,}\left[\left[{1}{,}{3}\right]{,}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({z}\right)\right]{,}\left[\left[{2}{,}{3}\right]{,}{\mathrm{cos}}{}\left({y}\right){}{\mathrm{cos}}{}\left({x}\right)\right]\right]\right]\right)$ (8)
 > $\mathrm{α5}≔\left(\mathrm{α1}&wedge\mathrm{α2}\right)&minus\mathrm{α3}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{-}{2}{+}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({x}\right)\right]{,}\left[\left[{1}{,}{3}\right]{,}{\mathrm{sin}}{}\left({z}\right){}{\mathrm{cos}}{}\left({z}\right)\right]{,}\left[\left[{2}{,}{3}\right]{,}{-}{5}{+}{\mathrm{cos}}{}\left({y}\right){}{\mathrm{cos}}{}\left({x}\right)\right]\right]\right]\right)$ (9)
 > $\mathrm{α6}≔\mathrm{α1}&wedge\mathrm{α3}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"form"}{,}{M}{,}{3}\right]{,}\left[\left[\left[{1}{,}{2}{,}{3}\right]{,}{-}{2}{}{\mathrm{cos}}{}\left({y}\right){+}{5}{}{\mathrm{sin}}{}\left({z}\right)\right]\right]\right]\right)$ (10)

Example 3.

Create various tensors using &plus, &mult and &tensor.

 > $\mathrm{T1}≔\mathrm{X1}&tensor\mathrm{X1}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"con_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{1}{,}{3}\right]{,}{1}\right]{,}\left[\left[{3}{,}{1}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right)$ (11)
 > $\mathrm{T2}≔\mathrm{X1}&tensor\mathrm{α1}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{\mathrm{sin}}{}\left({z}\right)\right]{,}\left[\left[{1}{,}{3}\right]{,}{-}{\mathrm{cos}}{}\left({y}\right)\right]{,}\left[\left[{3}{,}{1}\right]{,}{\mathrm{sin}}{}\left({z}\right)\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}{\mathrm{cos}}{}\left({y}\right)\right]\right]\right]\right)$ (12)
 > $\mathrm{T3}≔1&tensor\left(\mathrm{dx}&wedge\mathrm{dy}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{-}{1}\right]\right]\right]\right)$ (13)
 > $\mathrm{T4}≔\left(\left(\left(\mathrm{dx}&tensor\mathrm{dx}\right)&tensor\mathrm{D_y}\right)&tensor\mathrm{D_z}\right)&tensor\mathrm{dz}$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}{,}{"con_bas"}{,}{"con_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}{,}{3}{,}{3}\right]{,}{1}\right]\right]\right]\right)$ (14)
 > $\mathrm{T5}≔\left(\frac{1}{{y}^{2}}\right)&mult\left(\mathrm{dx}&t\mathrm{dx}+\mathrm{dy}&t\mathrm{dy}\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]{,}\frac{{1}}{{{y}}^{{2}}}\right]{,}\left[\left[{2}{,}{2}\right]{,}\frac{{1}}{{{y}}^{{2}}}\right]\right]\right]\right)$ (15)

Example 4.

Create a multi-vector using &plus, &mult and &tensor.

 > $\mathrm{V1}≔\left(2&mult\left(\mathrm{D_x}&wedge\mathrm{D_y}\right)\right)&plus\left(3&mult\left(\mathrm{D_y}&wedge\mathrm{D_z}\right)\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"multivector"}{,}{M}{,}{2}\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{2}\right]{,}\left[\left[{2}{,}{3}\right]{,}{3}\right]\right]\right]\right)$ (16)

Example 5.

Use the command AlgebraLibraryData to retrieve the structure equations for the quaternions.

 > $\mathrm{LA}≔\mathrm{AlgebraLibraryData}\left("Quaternions",Q\right)$
 ${\mathrm{LA}}{≔}\left[{{\mathrm{e1}}}^{{2}}{=}{\mathrm{e1}}{,}{\mathrm{e1}}{·}{\mathrm{e2}}{=}{\mathrm{e2}}{,}{\mathrm{e1}}{·}{\mathrm{e3}}{=}{\mathrm{e3}}{,}{\mathrm{e1}}{·}{\mathrm{e4}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}{·}{\mathrm{e1}}{=}{\mathrm{e2}}{,}{{\mathrm{e2}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e2}}{·}{\mathrm{e3}}{=}{\mathrm{e4}}{,}{\mathrm{e2}}{·}{\mathrm{e4}}{=}{-}{\mathrm{e3}}{,}{\mathrm{e3}}{·}{\mathrm{e1}}{=}{\mathrm{e3}}{,}{\mathrm{e3}}{·}{\mathrm{e2}}{=}{-}{\mathrm{e4}}{,}{{\mathrm{e3}}}^{{2}}{=}{-}{\mathrm{e1}}{,}{\mathrm{e3}}{·}{\mathrm{e4}}{=}{\mathrm{e2}}{,}{\mathrm{e4}}{·}{\mathrm{e1}}{=}{\mathrm{e4}}{,}{\mathrm{e4}}{·}{\mathrm{e2}}{=}{\mathrm{e3}}{,}{\mathrm{e4}}{·}{\mathrm{e3}}{=}{-}{\mathrm{e2}}{,}{{\mathrm{e4}}}^{{2}}{=}{-}{\mathrm{e1}}\right]$ (17)

Initialize.

 > $\mathrm{DGsetup}\left(\mathrm{LA},\left[e,i,j,k\right],\left[\mathrm{θ}\right]\right)$
 ${\mathrm{algebra name: Q}}$ (18)

Calculate some simple sums and products of quaternions.

 > $\mathrm{Q1}≔i&algmultj$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{Q}{,}\left[{}\right]\right]{,}\left[\left[\left[{4}\right]{,}{1}\right]\right]\right]\right)$ (19)
 > $\mathrm{Q2}≔\left(\left(\left(e&plusi\right)&plusj\right)&plusk\right)&algmult\left(e&minus\left(\left(i&plusj\right)&plusk\right)\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{Q}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{4}\right]\right]\right]\right)$ (20)