Multivector Linear Transformation

Members, basis)[source]

Convert matrix representation of linear transformation to dictionary, ga)[source]

Convert dictionary representation of linear transformation to matrix

class*args, ga, f=False, mode='g')[source]

Bases: galgebra.printer.GaPrintable

A Linear Transformation

Except for the spinor representation the linear transformation is stored as a dictionary with basis vector keys and vector values self.lt_dict so that a is a vector \(a = a^{i}e_{i}\) then

\[\mathtt{self(}a\mathtt{)} = a^{i} * \mathtt{\_dict[}e_{i}\mathtt{]}.\]

For the spinor representation the linear transformation is stored as the even multivector self.R so that if a is a vector:

self(a) = self.R * a * self.R.rev().

the keys are the basis symbols, \(e_i\), and the dictionary entries are the object vector images (linear combination of sympy non-commutative basis symbols) of the keys so that if L is the linear transformation then:

L(e_i) =[e_i])


  • ga – Name of metric (geometric algebra)

  • f (bool) – True if Lt if function of coordinates

  • mode (str) – g:general, s:symmetric, a:antisymmetric transformation


Returns the determinant (a scalar) of the linear transformation, \(L\), defined by \({{\det}\lp {L} \rp }I = {{L}\lp {I} \rp }\).


Returns the trace (a scalar) of the linear transformation, \(L\), defined by \({{\operatorname{tr}}\lp {L} \rp }=\nabla_{a}\cdot{{L}\lp {a} \rp }\) where \(a\) is a vector in the tangent space.


Returns the adjoint (a linear transformation) of the linear transformation, \(L\), defined by \(a\cdot{{L}\lp {b} \rp } = b\cdot{{\bar{L}}\lp {a} \rp }\) where \(a\) and \(b\) are any two vectors in the tangent space and \(\bar{L}\) is the adjoint of \(L\).


Returns the matrix representation of the linear transformation, \(L\), defined by \({{L}\lp {{{\eb}}_{i}} \rp } = L_{ij}{{\eb}}_{j}\) where \(L_{ij}\) is the matrix representation.

class, Ga, nargs=None, fct=False)[source]

Bases: galgebra.printer.GaPrintable

A multilinear transformation (mlt) is a multilinear multivector function of a list of vectors (*args) \(F(v_1,...,v_r)\) where for any argument slot \(j\) we have (\(a\) is a scalar and \(u_j\) a vector)

\[\begin{split}F(v_1,...,a*v_j,...,v_r) &= a*F(v_1,...,v_j,...,v_r) \\ F(v_1,...,v_j+u_j,...,v_r) &= F(v_1,...,v_j,...,v_r) + F(v_1,...,u_j,...,v_r).\end{split}\]

If F and G are two Mlts with the same number of argument slots then the sum is

\[(F+G)F(v_1,...,v_r) = F(v_1,...,v_r) + G(v_1,...,v_r).\]

If \(F\) and \(G\) are two Mlts with \(r\) and \(s\) argument slots then their product is

\[(F*G)(v_1,...,v_r,...,v_{r+s}) = F(v_1,...,v_r)*G(v_{r+1},...,v_{r+s}),\]

where \(*\) is any of the multivector multiplicative operations. The derivative of a Mlt with is defined as the directional derivative with respect to the coordinate vector (we assume \(F\) is implicitely a function of the coordinates)

\[F(v_1,...,v_r;v_{r+1}) = (v_{r+1} \bullet \nabla)F(v_1,...,v_j,...,v_r).\]

The contraction of a Mlt between slots \(j\) and \(k\) is defined as the geometric derivative of \(F\) with respect to slot \(k\) and the inner geometric derivative with respect to slot \(j\) (this gives the standard tensor definition of contraction for the case that \(F\) is a scalar function)

\[\begin{split}\operatorname{Contract}(i,j,F) &= \nabla_i \bullet (\nabla_j F(v_1,...,v_i,...,v_j,...,v_r)) \\ &= \nabla_j \bullet (\nabla_i F(v_1,...,v_i,...,v_j,...,v_r)).\end{split}\]

This returns a Mltwith slot \(i\) and \(j\) removed.

Fmt(lcnt=1, title=None)galgebra.printer.GaPrintable[source]

Set format for printing of Tensors


lcnt – Number of components per line


Usage for tensor T example is:

T.fmt('2', 'T')

output is:

print 'T = '+str(A)

with two components per line. Works for both standard printing and for latex.

pdiff(slot: int)[source]

Returns gradient of tensor, T, with respect to slot vector.

For example if the tensor is \({{T}\lp {a_{1},a_{2}} \rp }\) then T.pdiff(2) is \(\nabla_{a_{2}}T\). Since T is a scalar function, T.pdiff(2) is a vector function.

contract(slot1: int, slot2: int)[source]

Returns contraction of tensor between slot1 and slot2 where slot1 is the index of the first vector argument and slot2 is the index of the second vector argument of the tensor.

For example if we have a rank two tensor, T(a1, a2), then T.contract(1, 2) is the contraction of T. For this case since there are only two slots, there can only be one contraction.


Returns covariant derivative of tensor field.

If T is a tensor of rank \(k\) then T.cderiv() is a tensor of rank \(k+1\). The operation performed is defined in section Multilinear Functions.