Matrix Exterior Differential Calculus: Examples

S. Bonanos

Institute of Nuclear Physics, NCSR "Demokritos", 
Aghia Paraskevi 15310, Greece. 

Please send comments, suggestions, bug reports to:  sbonano@inp.demokritos.gr

Warning: The first four examples are not independent. They must be evaluated in the order they appear.

<< matrixEDC.m

Example I:	Elementary calculations with symbolic matrices

DeclareMatrixForms[{0, S, S}, {1, M, Mt}]

I.e., S will stand for a symmetric 0-form matrix  and M, Mt  for an 1-form matrix and its transpose.

S0 = S - tr[S]/matDimension

Note that the identity matrix multiplying the last term is not written explicitly. matDimension  is a global variable, used in the definition of tr, that can be assigned by the user.

tr[S0]

d[S0]

Wedge must be used to multiply matrices together , or with scalar forms,

S0⋀S0

d[S0] - d[x]⋀S0

tr[%]

M0 = M - tr[M]/matDimension

M0⋀M0

This is correct, since  M⋀tr[M]= -tr[M]⋀M  for an 1-form matrix M

M0t = Transpose[M0]

Correct, since  tr[Mt]=tr[M]

tr[%]

M0⋀M0t + M0t⋀M0

tr[%]

This is correct because (M being an 1-form matrix)

AntisymQ[M⋀Mt + Mt⋀M]

S0⋀M0 + M0⋀S0

Transpose[%]

d[%]

tr[%]

tr has applied trace identities in obtaining this expression

d[%]

Example II:	Applying the Cayley-Hamilton theorem

Now suppose:

\(matDimension = 3; tr[S] = 0; 
tr[S⋀S] = 2  s2; 
    tr[S⋀S⋀S] = 3  s3; \)

Then, the Cayley-Hamilton theorem gives (s3 is understood to multiply the identity matrix)

S⋀S⋀S = s2 S + s3;

S4 = S⋀S⋀S⋀S

tr[%]

S⋀S4

reWrite[%]

tr[%]

(tr takes into account that s2 s3 multiplies the 3-dim identity matrix)

d[%%]

tr[%]

d[%]

% /. {tr[S⋀d[S]] -> d[s2], tr[d[S]⋀S] -> d[s2]}

Example III: 	A composite calculation

One can assign d[S], say as a linear combination of S and the traceless part of S⋀S, with 1-form coefficients

DeclareForms[1, q[_]]

d[S] = q[1]⋀S + q[2]⋀(S⋀S - 2  s2/3)

(Note that, even though S is a 0-form matrix, one must use Wedge to multiply it with scalar differential forms). Then d uses this definition when applicable

d[S⋀S]

Now, from the definition of s2, s3

d[s2] = tr[S⋀d[S]]

d[s3] = tr[S⋀S⋀d[S]]

The integrability conditions for d[s2], d[s3] imply that q[1] and q[2] must make the following two equations vanish:

eq1 = d[%%]

eq2 = d[%%]

SolveAlways[{eq1 == 0, eq2 == 0}, {d[q[_]]}]

Thus, we can assign to  d[q[i]] the values:

d[q[1]] = 0; d[q[2]] = -(q[1]⋀q[2]);

Then the integrability condition for our choice of d[S] is satisfied:

d[q[1]⋀S + q[2]⋀(S⋀S - 2  s2/3)]

Example IV: 	Converting to component form - vectors

To obtain the component form of any of these equations, one must define a substitution rule for  S, s2, s3 consistent with the assumptions made. For example, let

Scomp = Array[Sc, {3, 3}]

Sc[i_, j_] := Sc[j, i] /; i > j; (*  To make Scomp symmetric *)

Sc[3, 3] = -Sc[1, 1] - Sc[2, 2]; (*  To satisfy tr[Scomp]=0 *)

matComp
       = {S -> Scomp, s2 -> tr[Scomp⋀Scomp]/2, 
        s3 -> tr[Scomp⋀Scomp⋀Scomp]/3}

toComponents is equivalent to ReplaceAll(/.) when acting on an expression that does not contain a hidden identity matrix:

reWrite[toComponents[S⋀S,matComp]-(S⋀S /. matComp)]

But  /. does not give the correct result here:

reWrite[toComponents[S⋀S - 2 s2/3,matComp]-(S⋀S - 2 s2/3/.matComp)]

xdScomp = reWrite[toComponents[d[S], matComp]];

d[S] is, of course, equal to q[1]⋀S+q[2]⋀(S⋀S-2 s2/3)

d[Sc[i_, j_]] := xdScomp[[i, j]]

Now we can evaluate the component form of the the integrability condition for d[S]

d[xdScomp]

reWrite[%]

matComp =.

Example V: 	Gauge Transformation of Connection and Curvature

In this example, the gauge transformation formulae for the connection 1-forms and the curvature 2-forms are given in matrix form. The notation follows the conventions of:
	 R. Penrose and W. Rindler,  Spinors and Space-Time, (Cambridge U. Press, 1984) vol 1, section 4.13.
	 The formulation in terms of 2- and 3-dim matrices is developed in:
	  S. Bonanos,  The vacuum Einstein equations as closed ideals of matrix-valued differential forms, Journal of Mathematical Physics 32, 188 (1991)

Off[General::"spell", General::"spell1"];

DeclareMatrixForms[{0, G, Gt}, {0, Ginv, Ginvt}, {1, ω, 
        ωt}]

G is a gauge transformation matrix, Ginv its inverse and ω is the connection 1-form matrix.

DeclareForms[{1, ω0, ω1, ω2}]

The 1-forms ω0, ω1, ω2 are the components of the connection matrix ω. In the two-dim representation, the matrices G, ω have the form:

\(G[2] = {{a, b}, {c, d}}/Sqrt[a\ d - b\ c]; 

    ω[2]
         = {{\ ω1, \(-ω0\)}, {ω2, \(-\ ω1\)}}; 
    \)

Print[MatrixForm[G[2]], " ", Together[Det[G[2]]], " ", 
      MatrixForm[ω[2]]]

In the three-dim representation, the matrices G, ω have the form:

\(G[3]
         = {{\((a\^2 - b\^2 - c\^2 + d\^2)\)/2, 
            \(-I\) \((a\^2 + b\^2 - c\^2 - d\^2)\)/2, \(-a\)\ b + c\ d}, {
            I \((a\^2 - b\^2 + c\^2 - d\^2)\)/2, 
            \((a\^2 + b\^2 + c\^2 + d\^2)\)/2, \(-I\) \((a\ b + c\ d)\)}, {
            \(-a\)\ c + b\ d, I \((a\ c + b\ d)\), a\ d + b\ c}}/
        \((a\ d - b\ c)\); 

    ω[3]
         = {{0, \(-2\)\ I\ ω1, ω0 + ω2}, {
          2\ I\ ω1, 0, I\ \((ω0 - ω2)\)}, {
          \(-ω0\) - ω2, \(-I\)\ \((ω0 - ω2)\), 
          0}}; \)

Print[MatrixForm[G[3]], " ", Together[Det[G[3]]], " ", 
      MatrixForm[ω[3]]]

The replacement rules matComp[n] (n=2 or 3) transform the symbolic matrices G, Ginv, ω to their respective component form

matComp[n_] := 
      matComp[n] = {G -> G[n], Gt -> Transpose[G[n]], 
          ω -> ω[n], ωt -> Transpose[ω[n]], 
          Ginv -> Together[Inverse[G[n]]], 
          Ginvt -> Transpose[Together[Inverse[G[n]]]]};

Definition of the curvature 2-form matrix Ω in terms of the connection 1-form matrix ω

Ω = d[ω] - ω⋀ω

Component form of Ω.  For brevity of notation, define compForm

compForm[x_, n_] := toComponents[x, matComp[n]];

MatrixForm[compForm[Ω, 2]]

MatrixForm[Factor[compForm[Ω, 3]]]

Exterior differentiation of matrix form Ω

d[Ω]

Bianchi Identity

Timing[
      d[Ω] - ω⋀Ω + 
        Ω⋀ω]

Bianchi Identity in terms of components

Bianchi[n_] := 
      reWrite[d[compForm[Ω, n]] - 
          compForm[
            ω⋀Ω - 
              Ω⋀ω, n]];

Timing[Bianchi[2]]

Timing[Bianchi[3]]

Verify that, in the 3-dim representation,  Inverse[G]=Transpose[G]

reWrite[compForm[Ginv - Gt, 3]]

Gauge transformation of the connection ω

newω = G⋀ω⋀Ginv + d[G]⋀Ginv

Gauge transformation of the curvature Ω

newΩ = G⋀Ω⋀Ginv

Verify that  newΩ = d[newω] - newω⋀newω

reWrite[
      d[newω] - newω⋀newω - newΩ]

Apply identities relating the symbolic matrices G and Ginv

% /. {Ginv⋀G -> 1, G⋀Ginv -> 1, 
        d[Ginv] -> -Ginv⋀d[G]⋀Ginv}

One can include these matrix identities in simpRules

simpRules = 
      Join[simpRules, {Ginv⋀G -> 1, G⋀Ginv -> 1, 
          d[Ginv] -> -Ginv⋀d[G]⋀Ginv}]

so that they are applied with reWrite:

reWrite[
        d[newω] - newω⋀newω - newΩ]
         // Timing

Same calculation in terms of components:

ComponentForm[n_] := 
      (newωMat = reWrite[compForm[newω, n]]; 
        newΩMat = reWrite[compForm[newΩ, n]]; 
        reWrite[d[newωMat] - newωMat⋀newωMat - 
            newΩMat])

Timing[ComponentForm[2]]

Timing[ComponentForm[3]]

The simpler-looking definition: ComponentForm[n_]:=reWrite[compForm[d[newω]-newω⋀newω-newΩ,n]];  is very inefficient. For n=2 it takes ~ 4 seconds to evaluate and, for n=3, ~130 sec! (All timings refer to an Apple Macintosh G3/900 computer running Mathematica 3.0). It is always advisable to apply reWrite separately to every part of a complicated expression.

matComp =.