Lie Algebras

by

Rolf Sulanke

November 20, 1999

Summary

In this notebook we define basic operations for Lie algebras and calculate the Killing forms of the following Lie algebras:
the general linear Lie algebras gl(n,K),
the special linear  Lie algebras sl(n,K),
the orthogonal Lie algebras o(n), 
the pseudo-orthogonal Lie algebras o(n, l),
the symplectic Lie algebras sp(2n, K),
the unitary Lie algebras u(n),
the special unitary Lie algebras su(n).
Here K denotes the fields of the real or the complex numbers. Other real forms or complex Lie algebras can be treated similarly; we leave the details to the interested user. Furthermore we construct an orthonormalization procedure appropriate for arbitrary symmetric  bilinear forms defined on spaces of matrices, in particular for Killing forms.  By the help of this  orthonormalization we calculate the index of the considered  Killing forms (in the real case),  and compare it with the index  listed in [3]. It is well known that the Killing forms play an important role in the classification of semisimple Lie algebras and the geometric applications of semisimple Lie groups, see e.g. the book S. HELGASON [1]. Applications for finding geodesics in the Möbius geometry of spaces of m-spheres are contained in [2]. In principle the tools developed in this notebook give the possibility to perform any  calculation in the series of Lie algebras listed above.

References

[1] S. HELGASON: Differential Geometry, Lie Groups, and Symmetric Spaces, ACADEMIC PRESS, 1978.
[2] R. SULANKE: Spheres in http://mathsource.com/Content/Enhancements/Geometry/0210-092.
[3] J. TITS: Tabellen zu den einfachen Lie Gruppen und ihren Darstellungen, L.N. in Math. Nr. 40, Springer-Verlag 1967
[4] PEKKA JANHUNEN: Declare.m,  in http://www.mathsource.com/Content22/Enhancements/Algebraic/0202-149.

Address

sulanke@mathematik.hu-berlin.de
Homepage:
http://www-irm.mathematik.hu-berlin.de/~sulanke/

For comments, hints,  and corrections the author will be very thankful.

Keywords

indefinite scalar products, Lie algebra, semisimple Lie algebra, compact Lie algebra, orthogonal Lie algebra, pseudo-orthogonal Lie algebra, linear Lie algebra, special linear Lie algebra, symplectic Lie algebra, unitary Lie algebra, special unitary Lie algebra, orthogonalization, Killing form, commutator, Jacoby identity, structure constants, center.

1 Introduction, Initialization

1.1 The Killing form

The Killing form is a symmetric bilinear form on the Lie algebra defined as the trace of the linear endomorphism

tr[a,b] :=  trace[ad[a]∘ad[b]],

where

a ↦ ad[a],	ad[a][x] := commute[a, x],

denotes the adjoint representation of the Lie algebra. In general, the Killing form is neither definite nor non degenerate.  By E. Cartan's criterion the Lie algebra is semisimple if and only if its Killing form is non degenerate; a semisimple Lie algebra is compact (that means, the corresponding connected Lie groups are compact) if and only if its Killing form is (negative) definite. The semisimple Lie algebras may be decomposed into a direct sum of simple Lie algebras, which are classified, see [1],  [3]. In the summary we indicated the main types of  infinite series of simple Lie algebras: sl(n,K), o(n) (n≠2,4), sp(2n,K); besides of these there exist yet a finite number of so called exceptional simple Lie algebras, which we shall not consider in this notebook. The Lie algebras o(n, l) (n≠2,4), us(n) are real simple Lie algebras; besides of them there exists yet other simple real Lie algebras not considered here. The Lie algebras gl(n,K), u(n) are not simple; they are direct products of their one-dimensional center and the simple Lie algebras sl(n.K) resp. su(n).   Below we describe the  Lie algebras over the complex or the real numbers mentioned in the summary, and calculate their Killing forms.

1.2 Initialization

Activite Kernel/Evaluation/Evaluate/Initialization from the menu!

The concepts considered in this notebook depend on  the dimension dim of the underlying vector space (= the order of the square matrices) and, in the pseudo-euclidean case,  the index  ind of the (non-degenerate, symmetric) scalar product on this space. These basic constants are defined by the initialization; other values with 0≤ind≤dim may be inserted,  these values may also be changed later.

dim  =  5;  ind  =  1;

1.3 Some tools

A general vector, random vectors, random matrices

vec[x_,  n_:  dim]  :=  Table[x[i],  {i,  n}]

vec[Sin]

N[%]

randomv[n_:  dim]  :=  Table[Random[], {i,  n}]

randomv[]

randomv[10]

randomv[0]

vec[randomv]

vec[randomv, 3]

randommatrix[k_,  n_:  dim] := Table[randomv[n],  {i, k}]

randommatrix[5, 3] // MatrixForm

randommatrix[4] // MatrixForm

Smoothing

The following function makes an almost zero  number to be zero; the sensibility can be regulated by the optional second argument, whose default value is (10^(-10)):

smoothing[a_, b_:  10^(-10)] := 
      Module[{c = a}, 
        If[b == 1, Return[c], If[Abs[N[c]] < b, c = 0];  c, c]]; 
    Attributes[smoothing] = Listable;

For the relation between Chop and smoothing see my notebook eusphere.nb in [2].

1.4 The packages liealg.m, liealgun.m

Almost all the modules contained in initialization cells of this notebook are collected, and provided with usages, in the package liealg.m, and the package liealgun.m. The latter contains the concepts concerning the unitary Lie algebras. It needs, besides of liealg.m, the package [4] of Pekka Janhunen, which may be downloaded from MathSource. This package is also needed for evaluating section 6 of the notebook. Sections 1 - 5 do not need any import of packages; the packages liealg.m liealgun.m are prepared for arbitrary applications, as enhancements of Mathematica. 
WARNING: It is not recommended, and not necessary, to import the packages liealg.m, liealgun.m  in this notebook! The symbols in these packages are protected, therefore you will get error messages if you evaluate the corresponding defining cells of the notebook after the import of the packages.

2 The general and the special linear Lie algebras

2.1 Basic definitions

In Mathematica the addition, and multiplication of matrices are implemented linear operations. We combine them in the definition of the commutator, which is the basic operation for Lie algebras. We test the properties of some combinations of these operations in Mathematica and apply them to define basic concepts for the general linear Lie algebra gl(n, K), which is defined as the vector space of all square matrices of order n over the field K, provided with the commutator operation.

Symbolic matrices and commutator

nullmatrix[k_Integer,  n_Integer]  :=  
        Table[0,  {k},  {n}];
nullmatrix[n_Integer:  dim]  :=  nullmatrix[n,  n]

nullmatrix[] // MatrixForm

nullmatrix[3, 5] // MatrixForm

We want to distinguish vector Arrays from matrix Arrays, and to have a simple construction of square matrices with given dimension. Therefore we define:

matrix[a_, n_, m_] :=  Array[a,  {n,  m}];
matrix[a_, n_:  dim]  :=  matrix[a,  n,  n]

matrix[a] // MatrixForm

The commutator is the basic operation in Lie algebra; for Lie algebras of matrices the commutator is defined as follows:

commute[m_?MatrixQ,  
        l_?MatrixQ]  :=  (m  .  l  -  
            l  .  m)/;(Dimensions[m]  ==  
              Dimensions[
                l] && Dimensions[m][[1]]  ==  Dimensions[
                  m][[2]])

Tests, properties

ATTENTION! Use MatrixForm for the presentation only! The result of MatrixForm is not a matrix!

mab  =  matrix[ab,  3, 5] // MatrixForm

m2ab  =  matrix[ab,  3, 5]

MatrixQ[mab]

VectorQ[mab]

MatrixQ[m2ab]

VectorQ[m2ab]

Length[mab]

Length[m2ab]

Dimensions[mab]

Dimensions[m2ab]

TrueQ[matrix[a][[1, 2]] ==  a[1, 2]]

matrix[b] . IdentityMatrix[5] // MatrixForm

Transpose[matrix[b]] // MatrixForm

TrueQ[
      commute[matrix[a],  matrix[b]]  +  
          commute[matrix[b],  matrix[a]] ==  nullmatrix[]]

TrueQ[commute[matrix[a],  matrix[a] ] ==  nullmatrix[]]

The following is not a contradiction: randommatrix will always be new generated if it is called!

commute[randommatrix[5], randommatrix[5]]

Of course, we have

ra  =  randommatrix[5];  commute[ra, ra]

TrueQ[randommatrix[5]  ==  randommatrix[5]]

TrueQ[randommatrix[5] ===  randommatrix[5]]

nullmatrix[]

VectorQ[nullmatrix[0]]

MatrixQ[nullmatrix[0]]

VectorQ[matrix[a]]

MatrixQ[matrix[a]]

VectorQ[matrix[a, 1, 5]]

MatrixQ[matrix[a, 1, 5]]

The following true equation is the Jacoby identity:

TrueQ[
      Simplify[commute[commute[matrix[a],  matrix[b]] , matrix[c]]  +  
            commute[commute[matrix[b],  matrix[c]] , matrix[a]]  +  
            commute[commute[matrix[c],  matrix[a]] , matrix[b]]] ==  
        nullmatrix[]]

ATTENTION! Without Simplify TrueQ gives False:

TrueQ[
      commute[commute[matrix[a],  matrix[b]] , matrix[c]]  +  
          commute[commute[matrix[b],  matrix[c]] , matrix[a]]  +  
          commute[commute[matrix[c],  matrix[a]] , matrix[b]] ==  
        nullmatrix[]]

Evaluate does not help:

TrueQ[
      Evaluate[commute[commute[matrix[a],  matrix[b]] , matrix[c]]  +  
            commute[commute[matrix[b],  matrix[c]] , matrix[a]]  +  
            commute[commute[matrix[c],  matrix[a]] , matrix[b]]] ==  
        nullmatrix[]]

The following would produce  a very long expression:

commute[commute[matrix[a],  matrix[b]] , matrix[c]]  +  
        commute[commute[matrix[b],  matrix[c]] , matrix[a]]  +  
        commute[commute[matrix[c],  matrix[a]] , matrix[b]];

Simplify[%]

commute[nullmatrix[2],  IdentityMatrix[2]] // MatrixForm

commute[nullmatrix[2],  IdentityMatrix[3]] // MatrixForm

commute[IdentityMatrix[3],  IdentityMatrix[3]] // 
      MatrixForm

commute[matrix[a]  +  matrix[b],  matrix[b]] // 
      MatrixForm

Simplify[%]

% // MatrixForm

%  -  commute[matrix[a],  matrix[b]]

Simplify[%]

Basis and cobasis of gl(n,K)

The vector space of the general linear Lie algebra gl(n,K) over the field K has dimension (n^2): it is the space of all square matrices of order n. The standard basis consists of all matrices with only one element 1 and all the others 0:

basismatrix[i_, j_, n_:  dim] := 
      Table[KroneckerDelta[i, k]*KroneckerDelta[j, l], {k, n}, {l, 
          n}]

The basis is

The standard basis:

\(glbasis[n_Integer:  dim]\  := \ 
      Module[{ord\  = \ n, \ i, j}, 
		Flatten[
          Table[basismatrix[i, j, ord], {i, n}, \ {j, n}], 1]]\)

The corresponding dual basis consists of the linear forms which  yield the element  m[[i,j]] of the matrix m:

cobasis[i_, j_, n_:  dim][m_]  :=  
      Sum[KroneckerDelta[i, k]*KroneckerDelta[j, l]*m[[k, l]], {k, 1, 
          n}, {l, 1, n}]

Tests, examples

basismatrix[2, 3] // MatrixForm

glbasis[3] // TableForm

The output of the following command looks better:

\(glbasisMF[n_Integer:  dim]\  := \ 
      Module[{ord\  = \ n, \ i, j}, 
		Flatten[
          Table[basismatrix[i, j, ord] // MatrixForm, {i, n}, \ {j, n}], 
          1]]\)

glbasisMF[3]

Remember that the elements of this sequence only look like Matrices, but they are not recognized as such by Mathematica:

MatrixQ[%[[1]]]

glbasis[5][[2]] // MatrixForm

cobasis[2, 3][basismatrix[2, 3]]

cobasis[2, 3][basismatrix[1, 3]]

cobasis[2, 3][basismatrix[1, 4]]

cobasis[2, 3][basismatrix[1, i]]

cobasis[2, 3][basismatrix[2, i]]

If i,j are not specified, the evaluation gives the correct symbolic result:

cobasis[2, 3][basismatrix[i, j]]

cobasis[i, j][basismatrix[2, 3]]

basismatrix[i, j][[2, 
      3]]

cobasis[i, j][nullmatrix[]]

cobasis[i, j][IdentityMatrix[5]]

cobasis[i, i][IdentityMatrix[5]]

% /.  i  ->  3

Unfortunately,  in the following clearly well defined case the evaluation does not take place:

cobasis[i, j][basismatrix[i, j]]

Simplify[%]

% /. {i  -> 1,  j  -> 2}

?? KroneckerDelta

The reason that cobasis[i,j][basismatrix[i,j]=1 does not result is that KroneckerDelta does not know anything about the dimension of the underlying space....

The structure constants

are the coefficients of the commutator of the basis elements:

strconst[i_, j_, r_, s_, u_, v_, n_:  dim] :=  cobasis[i, j][
        commute[basismatrix[r, s, n], basismatrix[u, v, n]]]

Table[strconst[i, j, dim, 1, 1, 1],  {i, dim}, {j,  dim}] // 
      MatrixForm

The Killing form of the general linear Lie algebra

Any element of the Lie algebra defines a linear endomorphism of the Lie algebra:

ad[a_][x_]  :=  commute[a, x]

The correspondence a ↦ ad[a] is called the adjoint representation of the Lie algebra.

The Killing form, or trace form, is the trace of the composition: killing[a, b] := trace[ad[a]∘ ad[b]], where trace[C] denotes the trace of the linear endomorphism C. In case of the general linear Lie algebra this leads to

\(glkilling[a_, \ b_, \ n_:  dim]\  := 
\ \ \ \ \ Sum[
        Sum[\(cobasis[i, \ j, n]\)[\ 
            commute[a, \ 
              commute[b, basismatrix[i, \ j, n]]]], 
\ \ \ \ \ \ \ \ {i, \ 
            1, \ n}], \ {j, \ 1, \ n}]\)

glkilling[basismatrix[2, 3], basismatrix[2, 3]]

glkilling[basismatrix[2, 3], basismatrix[5, 4]]

Table[
      glkilling[basismatrix[1, a, 2], basismatrix[1, b, 2], 2] , {a, 2}, {b, 
        2}]

Table[
      glkilling[basismatrix[1, a, 2], basismatrix[2, b, 2], 2] , {a, 2}, {b, 
        2}]

Table[
      glkilling[basismatrix[2, a, 2], basismatrix[2, b, 2], 2] , {a, 2}, {b, 
        2}]

Table[
      glkilling[basismatrix[a, a, 2], basismatrix[b, b, 2], 2] , {a, 2}, {b, 
        2}]

The general shape of glkilling as a bilinear or quadratic form can be shown by

glkilling[matrix[a], matrix[b]]

Simplify[%]

Simplify[glkilling[matrix[a],  matrix[a]]]

The elements of the center

By definition, the center of the Lie algebra is the kernel of the adjoint representation; with other words, it consists of all elements a with commute[a,x] = nullmatrix for all elements x of the Lie algebra. By

Solve[
      Flatten[Table[
          commute[basismatrix[i, j], matrix[x]] == 0, {i, 5}, {j, 5}]], 
      Flatten[matrix[x]]]

one has an example that it consists of all scalar multiples of the identity matrix:

zelm[z_,  n_:  dim]  :=  IdentityMatrix[n]*z

zelm[p] // MatrixForm

As well known, the defect subspace of the Killing form of gl(n,K) coincides with the center of gl(n,K). Indeed, we solve

Solve[
      Flatten[Table[
          glkilling[basismatrix[i, j], matrix[x]] == 0, {i, 5}, {j, 5}]], 
      Flatten[matrix[x]]]

and obtain the center again. Obviously

commute[matrix[a], zelm[p]]

glkilling[matrix[a],  zelm[p]]

2.2 Orthonormalization

Applying orthonormalization with respect to the Killing form  on any basis of a Lie algebra of matrices we find the rank and the index of the Killing form which are fundamental invariants of the Lie algebra.  The orthonormalization procedure defined in this section can be applied to arbitrary symmetric bilinear forms on matrix spaces; it is independent of the Lie algebra structure.
Here is a matrix version of euvec`outzero (from euvec.m, in [2]), which we need for the orthonormalization procedure; the procedure deletes the null matrices of the list b of matrices:

\(matrixoutzero[b_List]\  := \ 
      Module[{v = \ {}, \ l\  = \ Length[b], \ k\  = \ Length[b[\([1]\)]], 
          i}, 
			For[i\  = \ 1, \ 
          i <= \ l, \ \(i++\), \ 
				If[
            Not[smoothing[b[\([i]\)]]\  == \ nullmatrix[k]], 

            AppendTo[v, \ b[\([i]\)]], Null[], AppendTo[v, \ b[\([i]\)]]]]; \ 
        Return[v]]\)

The following module is contained in the package pseuvec.m in [2]:

normalize[v_, prod_:  glkilling] := 
      Module[{a = Simplify[prod[v, v]], w}, 
        If[a == 0, w = v, w = v/Sqrt[Abs[a]], 
          w = v/Sqrt[Abs[a]]]; 
Return[w]]

We created  the following procedure matrixorthonorm from orthonorm, pseuvec.m (contained in [2]),  replacing outzero by matrixoutzero:

Options[matrixorthonorm] = {innerprod -> glkilling, 
        normed -> True, print -> False, 
        neglect -> -10}

\(matrixorthonorm[b_List, opts___] := 
      Module[{v, w, va, vb, l, ort = {}, i, j, f, h, sm, aus, prod, nor, pr, 
          bn, follow, iso, 
          control}, {prod, nor, pr, 
            bn} = \({innerprod, normed, print, neglect} /. {opts}\) /. 
            Options[matrixorthonorm]; 
f[h_] := 
          smoothing[h, 10^bn]; 
sm[aus_] := 
          MapAll[f, aus]; 
w = 
          matrixoutzero[sm[b]]; 
Label[
          follow]; 
l = Length[w]; 
If[
          l == 0, Goto[control]]; 
For[i = 1, 
          i ≤ l, \(i++\), 
          If[Not[Simplify[sm[prod[w[\([i]\)], w[\([i]\)]]]] == 0], 
            AppendTo[ort, w[\([i]\)]]; 
If[
              pr == True, 
              Print[w[\([i]\)] // MatrixForm]]; 
v = 
              Simplify[
                sm[Table[
                    w[\([j]\)] - 
                      w[\([i]\)]*
                        prod[w[\([i]\)], w[\([j]\)]]/
                          prod[w[\([i]\)], w[\([i]\)]], {j, 
                      l}]]]; 
w = matrixoutzero[v]; \ 
            Goto[follow], Null, 
            AppendTo[ort, w[\([i]\)]]; 
If[
              pr == True, 
              Print[w[\([i]\)] // MatrixForm]]; 
v = 
              Simplify[
                sm[Table[
                    w[\([j]\)] - 
                      w[\([i]\)]*
                        prod[w[\([i]\)], w[\([j]\)]]/
                          prod[w[\([i]\)], w[\([i]\)]], {j, 
                      l}]]]; 
w = matrixoutzero[v]; \ 
            Goto[follow]]]; 
Label[iso]; 
        l = Length[w]; 
If[l == 0, 
          Goto[control]]; 
v = w; 
If[
          l == 1, AppendTo[ort, v[\([1]\)]]; \ 
          If[pr == True, 
            Print[v[\([1]\)] // MatrixForm]]; 
Goto[
            control]]; 
For[i = 1, 
          i ≤ l, \(i++\), 
          For[j = i + 1, j ≤ l, \(j++\), 
            If[Not[Simplify[sm[prod[v[\([i]\)], v[\([j]\)]]]] == 0], 
              va = v[\([j]\)] - v[\([i]\)]; 
vb = 
                v[\([j]\)] + v[\([i]\)]; \ 				v[\([i]\)] = va; 
              v[\([j]\)] = vb; 
w = 
                matrixoutzero[Simplify[sm[v]]]; 
              Goto[follow]]]]; \ 			ort = 
          Join[ort, v]; 
Label[
          control]; 
l = Length[ort]; 
If[
          l == 0, Return[ort]]; 
If[
          nor == True, 
          ort = sm[
              Table[Simplify[normalize[ort[\([i]\)], prod]], {i, 
                  Length[ort]}]]]; 
For[i = 1, 
          i ≤ l - 1, \(i++\), 
          For[j = i + 1, j ≤ l, \(j++\), 
            If[Not[Simplify[sm[prod[ort[\([i]\)], ort[\([j]\)]]]] == 
                  0], Return[
                Print["I cannot orthogonalize the given sequence!"]], 
              Null, Return[
                Print["I cannot orthogonalize the given sequence!"]]]]]; \ 	Return[ort]]\)

Tests

normalize[IdentityMatrix[5]*a]

glkilling[%, %]

normalize[nullmatrix[5]*a]

normalize[basismatrix[1, 3]*a]

glkilling[%, %]

normalize[basismatrix[1, 1]*a]

glkilling[%, %]

tlist  =  Table[basismatrix[i,  i],  {i,  dim}]

matrixorthonorm[tlist,  print  ->  True]

Table[glkilling[%[[i]],  %[[j]]],  {i,  dim},  {j,  dim}] // 
      MatrixForm

Simplify[Together[%]] // MatrixForm

2.3 An orthonormal basis of the general linear Lie algebra gl(n,K)

To apply the procedure orthonorm to the general case we rename the Killing form in an appropriate way

sprod[n_Integer][a_, b_]  :=  glkilling[a, b, n]

sprod[2][{{(1/(Sqrt[2])), 0}, {0, 0}}, {{(1/(Sqrt[2])), 0}, {0, 0}}]

Table[sprod[
            3][glbasis[3][[i]], glbasis[3][[j]]], {i, 
          9}, {j, 9}] // MatrixForm

matrixorthonorm[glbasis[3], innerprod  -> sprod[3]]

test3  =  %;

Table[test3[[i]] // MatrixForm,  {i,  Length[test3]}]

Table[sprod[3][test3[[i]], test3[[j]]], {i,  
          Length[test3]}, {j,  Length[test3]}] // MatrixForm

The last element is isotropic; it is the basis of the diagonal (the center). Generally, the standard basis is far from being orthogonal:

Table[
        glkilling[glbasis[][[i]], glbasis[][[j]]], {i, 
          Length[glbasis[]]}, {j, Length[glbasis[]]}] // 
      MatrixForm

Here and in the following cell we used the global definition of dim, and for the next cell we remember that glkilling is the default inner product.

Timing[matrixorthonorm[glbasis[]]]

Mathematica needed 185 s for the orthonormalization.

%[[1]]

glortho =  %%[[2]];

Table[glortho[[i]] // MatrixForm,  {i, 25}]

Table[
      glkilling[glortho[[i]], glortho[[j]]], {i, 25}, {j, 
        25}]

Simplify[%] // MatrixForm

2.4 The special linear Lie algebra sl(n,K)

The special linear Lie algebra sl(n,K) consists of all square matrices of order n with trace zero. It is the kernel of the trace map

trace:a∈gl(n,K) ↦ trace(a) ϵ K = gl(1,K)

which is an homomorphism of Lie algebras, and therefore an ideal within the general linear Lie algebra. From the definitions it follows easily that the  Killing form of any ideal is the restriction of the Killing form of the whole Lie algebra. Thus,  for finding the index of the Killing form of sl(n, K) we first define a basis of s(ln, K), and then orthonormalize itz with respect to glkilling.

A basis of sl(n,K)

\(\(slbasismatrix[i_, \ j_, n_:  dim]\  := 
	
        basismatrix[i, j, n] /; i != \ j;\)\)
\(slbasismatrix[i_, \ j_, \ 
        n_:  dim]\  := \ 
\((basismatrix[i, j, n] - 	
            basismatrix[n, n, n])\) /; \((i == \ j && \ j < n)\)\)

slbasis[n_:  dim]  :=  
      Join[Flatten[Table[slbasismatrix[i, j, n], {i,  n - 1}, {j,  n}], 1], 
        Table[slbasismatrix[n, h, n],  {h, n - 1}]]

slbasisMF[n_:  dim]  :=  
      Join[Flatten[
          Table[slbasismatrix[i, j, n] // MatrixForm, {i,  n - 1}, {j,  
              n}], 1], 
        Table[slbasismatrix[n, h, n] // MatrixForm,  {h, n - 1}]]

slbasis[2]

slbasis[3]

slbasisMF[4]

Orthonormalization of the basis

matrixorthonorm[slbasis[2], innerprod  ->  sprod[2]]

Table[sprod[2][%[[i]], %[[j]]], {i, 3}, {j, 3}]

matrixorthonorm[slbasis[3], innerprod  ->  sprod[3]]

stest3  =  %

Length[stest3]

Table[
        glkilling[stest3[[a]],  stest3[[b]], 3], {a, 8},  {b, 8}] // 
      MatrixForm

Timing[matrixorthonorm[slbasis[]]]

%[[1]]

Calculation of test5 on the Dell Inspiron 3200 under Linux needed about 175 s.

stest5  =  %%[[2]];

Length[stest5]

Table[glkilling[stest5[[a]], stest5[[b]]], {a, 24}, {b, 24}] // 
      MatrixForm

Simplify[Together[%]] // MatrixForm

The index of the Killing form of sl(5,R) is 10. As for all semisimple Lie algebras the form is non degenerate. The Cartan index of a semi simple real Lie algebra is defined as

CartanIndex := pos -neg,

where pos denotes the number of the spacelike and neg the number of the timelike elements of an orthogonalized basis. Obviously one has

CartanIndex = dim - 2 neg

The result CartanIndex[sl(5, R)] = 4 coincides with the value given in [3], p. 27. 
Parts of the orthonormal basis stest5 can be printed by

printstest5[a_,  b_]  :=  
      Table[stest5[[i]] // MatrixForm,  {i, a, b}]

printstest5[1,  10]

3 The orthogonal Lie algebras o(n)

3.1 Basis of o(n), general element

The orthogonal Lie algebra o(n) is the space of all skew symmetric matrices of order n. The standard  basis of o(n) is:

obm[i_,  j_, n_:  dim]  :=  
      basismatrix[i,  j, n]  -  basismatrix[j,  i,  n] /; 
        i  <  j

obm[1,2,3]

obm[3, 4] // MatrixForm

obm[2,3,3]

obm[i, j, n] will not be evaluated for invalid arguments:

obm[2,2,3]

The standard basis is

obasis[n_:  dim] := 
      Flatten[Table[Table[obm[i, j, n], {j, i + 1, n}], {i, n}], 
        1]

obasis[3]

The abitrary element of the orthogonal Lie algebra o(n):

\(\(\(oelm[a_, n_:  dim]\)\(\ \)\(:=\)\(\ \)\(Sum[
        Sum[obm[i, \ j, n]\ a[i, \ j], \ {i, \ 1, \ 
            j\  - 1}], \ 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {j, \ 2, \ 
          n}]\)\(\ \)\)\)

oelm[a]//MatrixForm

3.2 The Killing form of o(n)

The Killing form:

\(\(\(okilling[a_, \ b_, \ 
        n_:  dim]\)\(\ \)\(:=\)\(\ \)\(
\)\(\ \ \)\(Sum[
        Sum[\(cobasis[i, \ j, n]\)[\ 
            Evaluate[
              commute[a, \ 
                commute[b, \ obm[i, \ j, \ n]]]]], \ 
\ \ \ \ {i, \ 1, \ 
            j\  - \ 1}], \ {j, \ 2, \ n}]\)\(\ \)\)\)

The standard basis is orthogonal; therefore an orthogonalization is not necessary.

okilling[oelm[a, 6], oelm[b,  6], 6]

The restriction of glkilling to o(n), n = 2, 3, 4, 6, is conformal to the Killingform okilling.

glkilling[oelm[a, 6], oelm[b,  6], 6]

The Lie algebra o(2) is abelian, therefore one has

okilling[oelm[a, 2], oelm[b,  2], 2]

Since o(n) for n >2 is semisimple and compact, the Killing forms are negative definite, e.g.

okilling[oelm[a], oelm[a]]

We obtain an orthonormed basis using normalize:

obasis[]

Table[normalize[obasis[][[i]], okilling],  {i, 10}]

otest5  = %;

Table[otest5[[i]] // MatrixForm,  {i, 10}]

Table[okilling[%%[[i]],  %%[[j]]], {i, 10},  {j,  10}] // 
      MatrixForm

4 The pseudo-orthogonal Lie algebras o(n,k)

4.1 Basis, arbitrary element

The pseudo-orthogonal Lie algebras o(n,k) is the Lie algebra of the pseudo-orthogonal group O(n,k), which is the group of all linear automorphisms of the n-dimensional real vector space leaving a non degenerate symmetric bilinear form of index k invariant. The group O(4,1) is the Lorentz group applied in relativity theory. The Lie algebra o(5,1) is the Lie algebra of the conformal group of the 3-sphere (Möbius group of the 3-sphere).The standard basis of o(n, k) is:

\(psobm[i_\ , h_, k_:  ind, n_:  dim]\  := 
	
      If[i <= n - k && \ h > n\  - k, 
          basismatrix[i, h, n] + basismatrix[h, i, n], 
\ 
          obm[\ i, \ h, n]] /; \((i < h\  && \ k\  <= \ n)\)\)

psobasis[k_:  ind,  n_:  dim] := 
      Flatten[Table[Table[psobm[i, j, k, n], {j, i + 1, n}], {i, n}], 
        1]

The abitrary element of the pseudo-orthogonal Lie algebra o(k, n):

\(psoelm[a_, k_:  ind, n_:  dim]\  := \ 
      Sum[Sum[psobm[i, \ j, k, n]\ a[i, \ j], \ 
			{i, \ 1, \ 
              j\  - 1}], \ {j, \ 2, \ n}]\  /; k <= \ n\)

Examples, tests

psobasis[1, 3]

psobasis[]

Map[MatrixForm, %]

psobm[1,2]//MatrixForm

psobm[4,5]//MatrixForm

psobm[1,4,2,4]//MatrixForm

psoelm[a] //MatrixForm

psoelm[a,2,6] //MatrixForm

4.2 The Killing form of o(n,k)

\(\(\(psokilling[a_, \ b_, k_:  ind, \ 
        n_:  dim]\)\(\ \)\(:=\)\(\ \)\(
\)\(\ \ \)\(Sum[
        Sum[\(cobasis[i, \ j, n]\)[\ 
            Evaluate[
              commute[a, \ 
                commute[b, \ psobm[i, j, k\ , \ n]]]]], \ 
\ \ \ \ {i, \ 
            1, \ j\  - \ 1}], \ {j, \ 2, \ n}]\)\(\ \)\)\)

Using the tables [3] one concludes that the index of inertia of this Killing form is

psoindex[k_, n_]  :=  k^2  - k*n  +  n*(n - 1)/2

Comparing this value with the index of the Killing forms calculated below controls our constructions.

psoindex[1, 5]

psokilling[psoelm[a], psoelm[a]]

Again the Killing form psokilling is conformal to the restriction of glkilling:

glkilling[psoelm[a], psoelm[a]]

psoindex[2, 5]

psokilling[psoelm[a, 2, 5], psoelm[a, 2, 5], 2, 5]

For n > 2 all the pseudo-orthogonal Lie algebras have a non-degenerate, and, for n > k > 0, indefinite Killing form; the standard Basis is orthogonal.

Timing: The Killing form of o(19, 1):

Timing[psokilling[psoelm[a], psoelm[a]]]

Timing[
      psokilling[psoelm[a, 1, 19], psoelm[a, 1, 19], 1, 19]]

Simplify[%[[2]]]

From the shape of this Killing form we conclude:
1. The standard basis of o(19,1) is orthogonal.
2. All its elements have the same absolute length (Sqrt[34]).

%%[[1]]

n*(n - 1)/2  - psoindex[1, n]

Result: The index of the negative Killing form  -psokillingForm[a,b,1,n] equals n-1, what coincides with the result for n = 19.   
For the calculation for k=1 and n=19 the AT  486 needed 50 CPU minutes. The Dell Inspiron 3200 laptop needed 168s  only!

To get an orthonormal basis it suffices to normalize the elements of psobasis[1,19]: By the result above we may define:

psnormbasis  =  psobasis[1, 19]/Sqrt[34];

psnormbasis[[18]]

psokilling[psnormbasis[[18]], psnormbasis[[18]], 1, 
      19]

For testing the times we want to apply normalize, and define

psoprod[k_, n_][a_, b_] :=  psokilling[a, b, k, n]

psoprod[1, 19][psnormbasis[[100]], 
      psnormbasis[[100]]]

Timing[
      Table[normalize[psobasis[1, 19][[i]], psoprod[1, 19]], {i,  
          171}]]

Dell Inspiron  3200 needed 49 min to perform the 171 Normalizations of the 19x19 matrices. Therefore we made this cell inactive, and test only

Timing[
      Table[normalize[psobasis[1, 19][[i]], psoprod[1, 19]], {i,  
          19}]]

%[[1]]

test19  =  %%[[2]];

The Dell Inspiron 3200 needed 328 s. for norming these 19 matrices.

test19[[19]] // MatrixForm

test19[[18]] // MatrixForm

5 The symplectic Lie algebras sp(2m, K)

The Lie algebra sp(2m,K) is the Lie algebra of the symplectic group Sp(2m,K), which consists of all linear automorphisms of a 2m-dimensional vector space leaving a non degenerate alternating bilinear form invariant.

5.1 The symplectic bilinear form

The symplectic bilinear form on a finite dimensional vector space is non degenerate and skew symmetric (alternating); it exists only for even-dimensional vector spaces. All such forms are equivalent under the action of the general linear group. Its matrix with respect to a standard basis is

\(alt[n_?EvenQ] := \ 
      Module[{m = nullmatrix[n], \ i}, 
		For[i = \ 1, \ 
          i <= n/2, \ \(i++\), \((\ m[\([i, i\  + \ n/2\ ]\)]\  = \ 1; \ 
            m[\([i + n/2, \ i]\)] = \ \(-1\);)\)]; 
		m]\)

alt[10] // MatrixForm

Det[%]

The symplectic bilinear form is

altprod[x_List, y_List]  :=  
      x . (alt[Length[x]] . y) /; (Length[x] == Length[y] && 
            EvenQ[Length[x]])

On a 2-dimensional vector space altprod coincides with the determinant:

altprod[vec[x, 2],  vec[y, 2]]

altprod[vec[x, 6],  vec[y, 6]]

altprod[vec[x, 4],  vec[y, 2]]

altprod[vec[x, 4],  vec[y, 4]]  +  
      altprod[vec[y, 4],  vec[x, 4]]

altprod[vec[x, 4],  vec[x, 4]]

5.2 Basis and general element

The set of the elements defined as follows contains a basis of the Lie algebra sp(2n,K); for simplicity we admit that some of the elements spbasis[i,j,n] are nullmatrices.

\(spbasis[i_, \ j_, \ n_?EvenQ] := \ 
      Module[{m = nullmatrix[n], \ k\  = \ n/2}, 
		If[i <= k && j <= k, \ 
          m[\([i, j]\)]\  = \ 1; \ m[\([k + j, \ k + i]\)]\  = \ \(-1\); 
          Return[m]]; 
		If[i <= k && i <= j - k\  <= k, \ 
          m[\([i, j]\)]\  = \ 1; \ m[\([j - k, i\  + \ k]\)]\  = \ 1; \ 
          Return[m]]; 
		If[i\  > \ k && \ i - k <= j\  <= \ k, \ 
          m[\([i, j]\)]\  = \ 1; \ m[\([k + j, i - k]\)] = \ 1; 
          Return[m]]; 
		Return[nullmatrix[n]]]\)

Applying matrixoutzero we may construct a basis of sp(2n, K):

basislist[n_?EvenQ]  :=   matrixoutzero[
        Flatten[Table[spbasis[i, j, n], {i, n}, {j, n}], 1]]

Since the nullmatrices do not contribute to the sum, the general element of sp[2n, K) can be defined as

spelm[a_, n_?EvenQ]  := 
      Sum[spbasis[i, j, n]*a[i, j], {i, n}, {j, n}]

Examples, tests

spbasis[1, 1, 2] // MatrixForm

Table[spbasis[i, j, 2], {i, 2}, {j, 2}]

spbasis[2, 1, 2]

Table[spbasis[i, j, 4] // MatrixForm, {i, 4}, {j, 4}]

Flatten[Table[spbasis[i, j, 4] // MatrixForm, {i, 4}, {j, 4}],  
      1]

Evaluating the next cell we learn that sp(2, K) =  sl(2, K):

spelm[a, 2] // MatrixForm

spelm[a, 4]

Here is a test of the invariance condition:

Transpose[%] . alt[4]  +  alt[4] . %

spelm[a, 4] // MatrixForm

basislist[2]

basislist[4]

basislist[10];

Length[%]

sptt4  =  basislist[4]

Length[sptt4]

Test of the invariance condition:

spelm[a, 6] // MatrixForm

% . alt[6]  + alt[6] . Transpose[%]

The dimension of the Lie algebra sp(2m, K) is (with n = 2m), see [3], p.32:

spdim[n_?EvenQ]  :=  n*(n + 1)/2

spdim[2]

spdim[4]

spdim[10]

This coincides with the lengths of our basislists.

5.2 The Killingform spkilling

Since nullmatrices do not contribute terms to the Killing form we may define

\(spkilling[a_, \ b_, n_?EvenQ]\  := 
\ \ \ \ \ Sum[
        Sum[\(cobasis[i, \ j, n]\)[\ 
            commute[a, \ 
              commute[b, spbasis[i, \ j, n]]]], 
\ \ \ \ \ \ \ \ {i, \ 1, \ 
            n}], \ {j, \ 1, \ n}]\)

spkilling[spelm[a, 2],  spelm[b, 2],  2]

Of course, this coincides with the Killing form of sl(2,K):

glkilling[spelm[a, 2],  spelm[b, 2],  2]

spkilling[spelm[a, 6],  spelm[a, 6],  6]

Simplify[%]

glkilling[spelm[a, 6],  spelm[a, 6],  6]

Simplify[%]

Again we obtained the conformality to the restriction of the Killing form of the general linear Lie algebra.

spdim[6]

spdim[12]

Timing[spkilling[spelm[a, 12],  spelm[a, 12],  12]]

%[[1]]

Mathematica needed 30.15 s.

Simplify[%%[[2]]]

spprod[n_?EvenQ][a_, b_]  :=  spkilling[a, b, n]

matrixorthonorm[basislist[2], 
      innerprod  ->  spprod[2]]

Table[spprod[2][%[[i]], %[[j]]], {i, 3}, {j, 3}]

matrixorthonorm[basislist[4], 
      innerprod  ->  spprod[4]]

sptest[4]  = %;

Length[sptest[4]]

Table[spprod[
            4][sptest[4][[i]], sptest[4][[j]]], {i, 
          10}, {j, 10}] // MatrixForm

Mathematica needed 222 s  for the next calculation, on the Dell Inspiron 3200 under Linux

Timing[
      matrixorthonorm[basislist[6], 
        innerprod   ->  spprod[6]]]

%[[1]]

sptest[6]  = %%[[2]];

Length[sptest[6]]

Table[sptest[6][[i]] // MatrixForm, {i, 21}]

Table[spprod[
            6][sptest[6][[i]], sptest[6][[j]]], {i, 
          21}, {j, 21}] // MatrixForm

From the tables [3], p. 33,   it follows that the index of the Killlingform spkilling[a,b,n], n even, is

spindex[n_?EvenQ]  :=  n^2/4

and this coincides with our results:

Table[{2  k,  spindex[2  k]}, {k, 6}] // TableForm

6 The unitary and the special unitary Lie algebras u(n), su(n)

REMARK: Not all the needed cells of this section are initialized, since  first  the package [4] must be downloaded from MathSource (see below). Only if this is done, the section may be evaluated completely!

6.1 A basis of u(n)

ubasisa[i_,  j_,  n_:  dim] :=  
      obm[i, j, n] /; (i <  j  &&  j <=  n)

ubasisb[i_,  j_,  
        n_:  dim] := (basismatrix[i, j, n] +  basismatrix[j, i, n])*
          I /; (i <  j  &&  j <=  n)

ubasisc[i_,   n_:  dim] := 
      basismatrix[i, i, n]*I /; (i <=  n)

ubasis[n_:  dim]  := 
      Join[Flatten[
          Join[Table[ubasisa[i, j, n], {j,  2, n}, {i, 1, j - 1}], 
            Table[ubasisb[i, j, n], {j,  2, n}, {i, 1, j - 1}]],  1], 
        Table[ubasisc[i, n],  {i, n}]]

Tests

The dimension of the real vector space u(n) is (n^2).

Length[ubasis[10]]

ubasis[3]

6.2 Declare real coefficients

In spite of the fact that u(n) consists of complex matrices it is a real Lie algebra: a complex square matrix of order n belongs to u(n) if and only if it fulfils

Transpose[matrix[a]]  ==  -Conjugate[matrix[a]]

This condition is preserved under linear combination with real coefficients only.

a  =  ubasis[3][[9]]; 
    Transpose[a] ==  -Conjugate[a]

a  =  ubasis[3][[9]]*I; 
    Transpose[a] ==  -Conjugate[a]

Remove[a]

Thus we have to declare that the coordinates of the elements of u(n) shall be real. This can be done by the function Declare contained in the package [4] by Pekka Janhunen. First download the package, and copy it in the working directory. Then import

<< Declare.m

We add some rules for the function Conjugate:

Unprotect[Conjugate]

Conjugate[x_?RealQ  + I*y_?RealQ] := x  -  I*y

Conjugate[x_?RealQ]  :=  x

Conjugate[I*x_?RealQ]  :=  -I*x

Protect[Conjugate]

Now evaluate the definitions contained in the next subsection.

?Declare

6.3 General element, cobasis, and Killing form of u(n)

Definitions

The general element of the Lie algebra u(n) is

\(uelm[a_, n_:  dim]\  := 
      Module[{k, \ c = Table[a[k], \ {k, \ \ n^2}]}, \ 
        Declare[c, 
          Real]; 
			\ Sum[\(ubasis[n]\)[\([k]\)]*a[k], \ {k, \ 
            n^2}]]\)

ucobasisa[i_, j_, n_:  dim][m_?MatrixQ] :=  
      Re[cobasis[i, j, n][m]] /; (i < j && j <= n)

ucobasisb[i_, j_, n_:  dim][m_?MatrixQ] :=  
      Im[cobasis[i, j, n][m]] /; (i < j && j <= n)

ucobasisc[i_, n_:  dim][m_?MatrixQ] :=  
      Im[cobasis[i, i, n][m]] /; (i <= n)

ucobasis[n_:  dim][m_?MatrixQ]  := 
      Join[Flatten[
          Join[Table[ucobasisa[i, j, n][m], {j,  2, n}, {i, 1, j - 1}], 
            Table[ucobasisb[i, j, n][m], {j,  2, n}, {i, 1, j - 1}]],  
          1], Table[ucobasisc[i, n][m],  {i, n}]]

ukilling[x_?MatrixQ,  y_?MatrixQ, n_:  dim]  :=  
      Sum[ucobasis[n][
            commute[x, commute[y, ubasis[n][[i]]]]][[i]], {i,  
          n^2}]

Examples, Tests

uelm[a, 2] // MatrixForm

TrueQ[Conjugate[uelm[ab, 2]] == -Transpose[uelm[ab, 2]]]

RealQ[a[1]]

Conjugate[I*a[3]]

uelm[a, 4] // MatrixForm

Conjugate[uelm[a, 4]] // MatrixForm

TrueQ[Conjugate[uelm[a, 4]] == -Transpose[uelm[a, 4]]]

ucobasis[4][uelm[a, 4]]

ucobasis[4][ubasisc[1, 4]][[1]]

ucobasis[4][ubasisc[4, 4]][[1]]

ucobasis[4][ubasisc[4, 4]]

ucobasisc[1, 4][uelm[a, 4]]

ukilling[uelm[a, 2], uelm[a, 2], 2]

Simplify[%]

Simplify[ukilling[uelm[a, 4], uelm[b, 4], 4]]

Simplify[glkilling[uelm[a, 4], uelm[b, 4], 4]]

In this case the unitary Killing form is just the restriction of the (complex) Killingform of the general linear Lie algebra!

uprod[x_,  y_]  :=  ukilling[x, y, 3]

Table[
      uprod[ubasis[3][[i]], ubasis[3][[j]]], {i, 9}, {j, 
        9}]

% // MatrixForm

Timing[matrixorthonorm[ubasis[3], innerprod ->  uprod]]

Mathematica needed 29.19 s  for this calculation.

olist  =  %[[2]];

Length[olist]

Timing[
      Table[uprod[olist[[i]], olist[[j]]], {i, 9}, {j, 
          9}]]

For this calculation Mathematica needed 17.11 s.

Simplify[%[[2]]] // MatrixForm

Timing[
      Simplify[Table[
            ukilling[ubasis[][[i]], ubasis[][[j]]], {i, 
              25},  {j, 25}]] // MatrixForm]

For the last calculation Mathematica needed 33 min.

uprod4[a_, b_]  :=  ukilling[a, b, 4]

Timing[
      matrixorthonorm[ubasis[4],  innerprod  ->  uprod4]]

Mathematica needed 6.3 min for this orthonormalization.

%[[1]]/60

olist4  =  %%[[2]];

Length[olist4]

Timing[
      Table[uprod4[olist4[[i]],  olist4[[j]]],  {i,  16},  {j, 
          16}]]

Time: 228.38 s

Simplify[Together[%[[2]]]] // MatrixForm

dim

Timing[
      matrixorthonorm[ubasis[],  innerprod  ->  ukilling]]

The time needed was 51.2 min

u5list  =  %%[[2]];

Table[
      ukilling[u5list[[i]], u5list[[j]]], {i,  25},  {j,  
        25}]

Simplify[Together[%]]

Table[ubasis[][[i]] // MatrixForm,  {i, 25}]

6.4 The special unitary Lie algebras su(n)

The special unitary Lie algebra su(n) is the subalgebra of the elements of u(n) with trace zero;as kernel of the trace map it is an ideal. Therefore its Killing form is the restriction of ukilling to su(n). We define a basis of su(n):

dim

subasis[n_:  dim]  :=  
      Join[Table[ubasis[n][[i]],  {i,  
            n*(n - 1)}], 
Table[ubasis[
                n][[j]]  -  ubasis[n][[n^2]],  {j, 
            n*(n - 1) + 1,  n^2  - 1}]]

Table[subasis[5][[j]] // MatrixForm,  {j, 5*(5 - 1) + 1,  
        5^2  - 1}]

The general element of su(n) is

\(suelm[a_, \ n_:  dim]\  := \ 
      Module[{k, \ c = Table[a[k], \ {k, \ \ n^2}]}, \ 
        Declare[c, 
          Real]; 
			\ Sum[\(subasis[n]\)[\([k]\)]*a[k], \ {k, \ 
            n^2 - 1}]]\)

abc  =  suelm[a]

Conjugate[abc]  ==  - Transpose[abc]

suelm[a] // MatrixForm

Timing[
      matrixorthonorm[subasis[],  
        innerprod  ->  ukilling]]

%[[1]]

Time needed for this orthonormalization: 48 min

su5list  =  %%[[2]];

Length[su5list]

Table[
      ukilling[su5list[[i]],  su5list[[j]]], {i, 24}, {j, 
        24}]

Simplify[Together[%]] // MatrixForm