Classical Matrix Algebras - Maple Help

DifferentialGeometry Tutorials

Classical Matrix Algebras

 Overview The Lie algebra of all real mxm  matrices is called the general linear Lie algebra gl(m, R).  Many important Lie algebras, the so-called  classical matrix Lie algebras, can be  characterized as subalgebras of gl(m, R). This tutorial shows how to construct the classical matrix Lie algebras so(p,q), sl(n), gl(n,C), u(n), su(n), gl(n,H), sp(n) and g2 for small values of p, q, and n. In each case we realize these Lie algebras as subalgebras of the appropriate gl(m, R) which fix some tensor or collection of tensors on R^m.   The MatrixAlgebras command in the LieAlgebra package is used  to construct these Lie algebras. We shall also use the LieAlgebra package explore some special properties of these Lie algebras.
 Procedures Illustrated In this tutorial we shall make use of the following packages and commands:

Example 1.  The special orthogonal Lie algebras so(4), so(3,1), so(2,2)

Let g be an inner product on the vector space R^n with signature (p,q)  p + q= n. The Lie algebra so(p,q) is the subalgebra of  gl(n) consisting of  nxn matrices a such that g(ax, y) + g(x, ay) =0 . Typically one takes g to be the inner product defined by the diagonal matrix DiagonalMatrix([1$p, -1$q]) with p 1's and q  (-1)'s  along the diagonal but strictly speaking this is not necessary and other choices for g are sometimes preferred.

In this example we construct the Lie algebras so(4) , so(3,1) and so(2, 2).

 > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):

Introduce the vector space E4 on which the orthogonal algebras will act.

 > DGsetup([x1,x2,x3,x4],E4):

Create and then initialize the full general linear algebras gl(4).

 E4 > gl4 := MatrixAlgebras("Full",4, gl4R);
 ${\mathrm{gl4}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e10}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e11}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e10}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e6}}{-}{\mathrm{e11}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e6}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e10}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e10}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e11}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e15}}\right]{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e21}}{,}{\mathrm{e22}}{,}{\mathrm{e23}}{,}{\mathrm{e24}}{,}{\mathrm{e31}}{,}{\mathrm{e32}}{,}{\mathrm{e33}}{,}{\mathrm{e34}}{,}{\mathrm{e41}}{,}{\mathrm{e42}}{,}{\mathrm{e43}}{,}{\mathrm{e44}}\right]{,}\left[{\mathrm{ε11}}{,}{\mathrm{ε12}}{,}{\mathrm{ε13}}{,}{\mathrm{ε14}}{,}{\mathrm{ε21}}{,}{\mathrm{ε22}}{,}{\mathrm{ε23}}{,}{\mathrm{ε24}}{,}{\mathrm{ε31}}{,}{\mathrm{ε32}}{,}{\mathrm{ε33}}{,}{\mathrm{ε34}}{,}{\mathrm{ε41}}{,}{\mathrm{ε42}}{,}{\mathrm{ε43}}{,}{\mathrm{ε44}}\right]$ (3.1)
 E4 > DGsetup(gl4);
 ${\mathrm{Lie algebra: gl4R}}$ (3.2)

Define the inner product on E4 with signature (4,0).

 gl4R > ChangeFrame(E4):
 E4 > g := CanonicalTensors("Metric", "bas", 4, 0);
 ${g}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx3}}{+}{\mathrm{dx4}}{}{\mathrm{dx4}}$ (3.3)

Calculate the subalgebra of gl4R which preserves the inner product g.

 E4 > so4subalgebra := MatrixAlgebras("Subalgebra", gl4R, [g]);
 ${\mathrm{so4subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{,}{\mathrm{e24}}{-}{\mathrm{e42}}{,}{\mathrm{e34}}{-}{\mathrm{e43}}\right]$ (3.4)

Now we initialize so4, viewed as a Lie algebra of gl4, as a Lie algebra in its own right.

 gl4R > so4data := LieAlgebraData(so4subalgebra, so4);
 ${\mathrm{so4data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}\right]$ (3.5)
 gl4R > DGsetup(so4data);
 ${\mathrm{Lie algebra: so4}}$ (3.6)
 so4 > MultiplicationTable("LieTable");

We check that so4 is a semi-simple Lie algebra.

 so4 > Query("Semisimple");
 ${\mathrm{true}}$ (3.7)

We can decompose so4 into a direct sum of  two 3-dimensional algebras.

 so4 > B := Decompose();
 ${\mathrm{Alg1Data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{2}{}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{2}{}{\mathrm{e1}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{2}{}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{-}{2}{}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{2}{}{\mathrm{e4}}\right]$ (3.8)
 so4 > DGsetup(Alg1Data);
 ${\mathrm{Lie algebra: Alg1}}$ (3.9)
 Alg1 > MultiplicationTable("LieTable");

We repeat the above computations for so(3,1) except that we find this Lie algebra to be indecomposable (over the real numbers) .

We shall construct two different representations of so(3,1) based upon different  choices for the inner product on E4.  The structure equations for both

representations are seen to be the same.

Here are the two inner products we shall use.  For the second inner product gB, the vectors D_x3 and D_x4 are null vectors.

 Alg1 > ChangeFrame(E4):
 E4 > gA := CanonicalTensors("Metric", "bas", 3, 1);
 ${\mathrm{gA}}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx3}}{-}{\mathrm{dx4}}{}{\mathrm{dx4}}$ (3.10)
 E4 > gB := evalDG(dx1 &t dx1 + dx2 &t dx2  +  dx3 &s dx4);
 ${\mathrm{gB}}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx4}}{+}{\mathrm{dx4}}{}{\mathrm{dx3}}$ (3.11)

Here are the algebras as subalgebras of gl4R.

 E4 > so31Asubalgebra := MatrixAlgebras("Subalgebra",gl4R,[gA]);
 ${\mathrm{so31Asubalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{,}{\mathrm{e14}}{+}{\mathrm{e41}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{,}{\mathrm{e24}}{+}{\mathrm{e42}}{,}{\mathrm{e34}}{+}{\mathrm{e43}}\right]$ (3.12)
 gl4R > so31Bsubalgebra := MatrixAlgebras("Subalgebra",gl4R,[gB]);
 ${\mathrm{so31Bsubalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{-}{\mathrm{e41}}{,}{\mathrm{e14}}{-}{\mathrm{e31}}{,}{\mathrm{e23}}{-}{\mathrm{e42}}{,}{\mathrm{e24}}{-}{\mathrm{e32}}{,}{\mathrm{e33}}{-}{\mathrm{e44}}\right]$ (3.13)

Initialize so31Asubalgebra and so31Bsubalgebra as abstract Lie algebras.

 gl4R > so31Bdata := LieAlgebraData(so31Asubalgebra, so31B):
 ${\mathrm{Lie algebra: so31A}}$ (3.14)
 so31A > DGsetup(so31Bdata,[f], [theta]);
 ${\mathrm{Lie algebra: so31B}}$ (3.15)

By inspection we see that these Lie algebras are isomorphic.

 so31B > MultiplicationTable( so31A, "LieTable"),MultiplicationTable( so31B, "LieTable");

These algebras are semi-simple and  indecomposable and therefore simple, real Lie algebras. Of course, they not indecomposable over the complex numbers since over the complex numbers there are isomorphic to so(4).

 so31B > Query("Semisimple"), Query("Indecomposable"), Query("AbsolutelyIndecomposable");
 ${\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{false}}$ (3.16)

Finally, we construct the Lie algebra so(2,2). Here is the inner product we use

 so31B > A := LinearAlgebra:-DiagonalMatrix([1,1,-1,-1]);
 so31B > ChangeFrame(E4);
 ${\mathrm{so31B}}$ (3.17)
 E4 > g := convert(A, DGtensor, [["cov_bas", "cov_bas"], []]);
 ${g}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{-}{\mathrm{dx3}}{}{\mathrm{dx3}}{-}{\mathrm{dx4}}{}{\mathrm{dx4}}$ (3.18)
 E4 > so22subalgebra := MatrixAlgebras("Subalgebra",gl4R,[g]);
 ${\mathrm{so22subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{+}{\mathrm{e31}}{,}{\mathrm{e14}}{+}{\mathrm{e41}}{,}{\mathrm{e23}}{+}{\mathrm{e32}}{,}{\mathrm{e24}}{+}{\mathrm{e42}}{,}{\mathrm{e34}}{-}{\mathrm{e43}}\right]$ (3.19)

Now we initialize so22subalgebra, viewed as a Lie algebra of gl4, as a Lie algebra in its own right.

${\mathrm{so22subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{+}{\mathrm{e31}}{,}{\mathrm{e14}}{+}{\mathrm{e41}}{,}{\mathrm{e23}}{+}{\mathrm{e32}}{,}{\mathrm{e24}}{+}{\mathrm{e42}}{,}{\mathrm{e34}}{-}{\mathrm{e43}}\right]$

 ${\mathrm{so22data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}\right]$ (3.20)
 gl4R > DGsetup(so22data);
 ${\mathrm{Lie algebra: so4}}$ (3.21)
 so4 > MultiplicationTable("LieTable");

We check that so22 is a semi-simple but not a simple Lie algebra.

 so4 > Query("Semisimple"), Query("Indecomposable");
 ${\mathrm{true}}{,}{\mathrm{false}}$ (3.22)

Example 2.  The Lie algebra of trace-free 3x3 matrices sl(3,R)

The Lie algebra sl(n, R) is defined as the subalgebra of  gl(n) which preserves the volume form on R^n. Equivalently, sl(n,R) is the subalgebra of  gl(n,R)  consisting of trace-free matrices.  The dimension of sl(n,R) is n^2-1. In this example we construct the Lie algebra  sl(3, R)

 so4 > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 so4 > gl3 := MatrixAlgebras("Full",3, gl3R);
 ${\mathrm{gl3}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e8}}\right]{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e21}}{,}{\mathrm{e22}}{,}{\mathrm{e23}}{,}{\mathrm{e31}}{,}{\mathrm{e32}}{,}{\mathrm{e33}}\right]{,}\left[{\mathrm{ε11}}{,}{\mathrm{ε12}}{,}{\mathrm{ε13}}{,}{\mathrm{ε21}}{,}{\mathrm{ε22}}{,}{\mathrm{ε23}}{,}{\mathrm{ε31}}{,}{\mathrm{ε32}}{,}{\mathrm{ε33}}\right]$ (4.1)
 so4 > DGsetup(gl3);
 ${\mathrm{Lie algebra: gl3R}}$ (4.2)

Define the space E3 upon which gl3 acts and define the standard volume form on E3.

 gl3R > DGsetup([x1, x2, x3], E3):
 E3 > nu := Tools:-DGvolume("form");
 ${\mathrm{ν}}{≔}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx3}}$ (4.3)

Define sl(3, R) as the subalgebra of  gl(3, R).

 E3 > sl3Rsubalgebra := MatrixAlgebras("Subalgebra", gl3R, [nu]);
 ${\mathrm{sl3Rsubalgebra}}{≔}\left[{\mathrm{e11}}{-}{\mathrm{e33}}{,}{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e21}}{,}{\mathrm{e22}}{-}{\mathrm{e33}}{,}{\mathrm{e23}}{,}{\mathrm{e31}}{,}{\mathrm{e32}}\right]$ (4.4)

Define sl(3, R) as a Lie algebra in its own right.

 gl3R > sl3Rdata := LieAlgebraData(sl3Rsubalgebra, sl3R);
 ${\mathrm{sl3Rdata}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{2}{}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}\right]$ (4.5)
 gl3R > DGsetup(sl3Rdata);
 ${\mathrm{Lie algebra: sl3R}}$ (4.6)
 sl3R > MultiplicationTable("LieTable");

Check that sl(3, R) is a simple Lie algebra, over both the real and complex numbers.

 sl3R > Query("Semisimple"), Query("Indecomposable"), Query("AbsolutelyIndecomposable");
 ${\mathrm{true}}{,}{\mathrm{true}}{,}{\mathrm{true}}$ (4.7)

Example 3. Construct gl(3,C) as a real subalgebra of gl(6, R)

The real Lie algebra gl(n,C) is the subalgebra of gl(2n, R) which fixes the standard complex structure on R^2n. The Lie algebra gl(n, C) consists of matrices of the form blockmatrix(n, n, [A, B, -B, A]), where A and B are nxn matrices. The (real )dimension of gl(n,C) is 2n^2. In this example we shall  construct the 18 dimensional Lie algebra gl(3, C) and show that this algebra is the complexification of the Lie algebra gl(3, R).

First we initialize the Lie algebra gl(6, R).

 sl3R > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 sl3R > DGsetup(MatrixAlgebras("Full",6, gl6R)):

Define the 6 dimensional vector space E6 on which gl(6, R) acts and define the standard complex structure on E6 , defined as a 1-1 tensor.

 gl6R > DGsetup([x1, x2, x3, x4, x5, x6], E6):
 E6 > J := CanonicalTensors("ComplexStructure","bas", E6);
 ${J}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_x4}}{-}{\mathrm{dx2}}{}{\mathrm{D_x5}}{-}{\mathrm{dx3}}{}{\mathrm{D_x6}}{+}{\mathrm{dx4}}{}{\mathrm{D_x1}}{+}{\mathrm{dx5}}{}{\mathrm{D_x2}}{+}{\mathrm{dx6}}{}{\mathrm{D_x3}}$ (5.1)
 E6 > gl3Csubalgebra := MatrixAlgebras("Subalgebra", gl6R, [J]);
 ${\mathrm{gl3Csubalgebra}}{≔}\left[{\mathrm{e11}}{+}{\mathrm{e44}}{,}{\mathrm{e12}}{+}{\mathrm{e45}}{,}{\mathrm{e13}}{+}{\mathrm{e46}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e15}}{-}{\mathrm{e42}}{,}{\mathrm{e16}}{-}{\mathrm{e43}}{,}{\mathrm{e21}}{+}{\mathrm{e54}}{,}{\mathrm{e22}}{+}{\mathrm{e55}}{,}{\mathrm{e23}}{+}{\mathrm{e56}}{,}{\mathrm{e24}}{-}{\mathrm{e51}}{,}{\mathrm{e25}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e53}}{,}{\mathrm{e31}}{+}{\mathrm{e64}}{,}{\mathrm{e32}}{+}{\mathrm{e65}}{,}{\mathrm{e33}}{+}{\mathrm{e66}}{,}{\mathrm{e34}}{-}{\mathrm{e61}}{,}{\mathrm{e35}}{-}{\mathrm{e62}}{,}{\mathrm{e36}}{-}{\mathrm{e63}}\right]$ (5.2)

We reorder this basis for gl3C so that the first 9 elements corresponding to the 9 matrices of the form blockmatrix(3, 3, [A, 0, 0,A]) and the last 9 elements corresponding to the 9 matrices of the form blockmatrix(3, 3, [0, B, -B, 0]).

 gl6R > reorderBasis := [e11+e44, e12+e45, e13+e46,e21+e54, e22+e55, e23+e56,e31+e64, e32+e65, e33+e66, e14-e41, e15-e42, e16-e43,e24-e51, e25-e52, e26-e53,e34-e61, e35-e62, e36-e63];
 ${\mathrm{reorderBasis}}{≔}\left[{\mathrm{e11}}{+}{\mathrm{e44}}{,}{\mathrm{e12}}{+}{\mathrm{e45}}{,}{\mathrm{e13}}{+}{\mathrm{e46}}{,}{\mathrm{e21}}{+}{\mathrm{e54}}{,}{\mathrm{e22}}{+}{\mathrm{e55}}{,}{\mathrm{e23}}{+}{\mathrm{e56}}{,}{\mathrm{e31}}{+}{\mathrm{e64}}{,}{\mathrm{e32}}{+}{\mathrm{e65}}{,}{\mathrm{e33}}{+}{\mathrm{e66}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e15}}{-}{\mathrm{e42}}{,}{\mathrm{e16}}{-}{\mathrm{e43}}{,}{\mathrm{e24}}{-}{\mathrm{e51}}{,}{\mathrm{e25}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e53}}{,}{\mathrm{e34}}{-}{\mathrm{e61}}{,}{\mathrm{e35}}{-}{\mathrm{e62}}{,}{\mathrm{e36}}{-}{\mathrm{e63}}\right]$ (5.3)

Calculate the structure equations and initialize:

 gl6R > gl3Cdata := LieAlgebraData(reorderBasis, gl3C);
 ${\mathrm{gl3Cdata}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e10}}{-}{\mathrm{e14}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e10}}{-}{\mathrm{e18}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e10}}{+}{\mathrm{e14}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e14}}{-}{\mathrm{e18}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e10}}{+}{\mathrm{e18}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e14}}{+}{\mathrm{e18}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e5}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e5}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e16}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e17}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e8}}\right]$ (5.4)
 gl6R > DGsetup(gl3Cdata);
 ${\mathrm{Lie algebra: gl3C}}$ (5.5)

Now we show that the Lie algebra gl3C is isomorphic to the Lie algebra obtained by complexifying gl3R:

 gl3C > DGsetup(MatrixAlgebras("Full", 3, gl3R));
 ${\mathrm{Lie algebra: gl3R}}$ (5.6)
 gl3R > Alg1data := Complexify(gl3R, Alg1);
 ${\mathrm{Alg1data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e10}}{-}{\mathrm{e14}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e10}}{-}{\mathrm{e18}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e10}}{+}{\mathrm{e14}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e14}}{-}{\mathrm{e18}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e10}}{+}{\mathrm{e18}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e14}}{+}{\mathrm{e18}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e17}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e16}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e17}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e5}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e17}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e17}}\right]{=}{-}{\mathrm{e5}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e18}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e16}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e17}}{,}{\mathrm{e18}}\right]{=}{\mathrm{e8}}\right]$ (5.7)
 gl3R > DGsetup(Alg1data);
 ${\mathrm{Lie algebra: Alg1}}$ (5.8)

We see by inspection that Alg1 and gl3C are isomorphic but we can still check this formally using the Query command to verify that the identity matrix is a Lie algebra homomorphism.

 Alg1 > A := LinearAlgebra:-IdentityMatrix(18):
 Alg1 > Query( Alg1,gl3C, A, "Homomorphism");
 ${\mathrm{true}}$ (5.9)

Example 4. Construct the unitary Lie algebra u(3)

The unitary Lie algebra u(n) is the subalgebra of gl(2n,R) which fixes the standard complex structure and the standard metric. It consists of matrices of the form  blockmatrix(n, n, [A, B, -B, A]), where A and B are nxn matrices, A is skew-symmetric and B is symmetric. The dimension of u(n) is n^2.  In this example we construct u(3).

 gl3C > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):

First initialize gl(6, R)

 gl3C > DGsetup(MatrixAlgebras("Full", 6, gl6R)):

Define the vector space E6 on which gl(6, R) acts.

 gl6R > DGsetup([x1, x2, x3, y1, y2, y3], E6):
 E6 > g := CanonicalTensors("Metric", "bas", 6,0):
 E6 > J := CanonicalTensors("ComplexStructure","bas"):
 E6 > u3subalgebra := MatrixAlgebras("Subalgebra",gl6R,[g, J]);
 ${\mathrm{u3subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{+}{\mathrm{e45}}{-}{\mathrm{e54}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e46}}{-}{\mathrm{e64}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e15}}{+}{\mathrm{e24}}{-}{\mathrm{e42}}{-}{\mathrm{e51}}{,}{\mathrm{e16}}{+}{\mathrm{e34}}{-}{\mathrm{e43}}{-}{\mathrm{e61}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{,}{\mathrm{e25}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e62}}{,}{\mathrm{e36}}{-}{\mathrm{e63}}\right]$ (6.1)

Alternatively, we can calculate gl(3,C) and so(6) and use the command IntersectSubspaces to find u(3) as the intersection of these 2 subalgebras

 gl6R > gl3C := MatrixAlgebras("Subalgebra", gl6R, [J]);
 ${\mathrm{gl3C}}{≔}\left[{\mathrm{e11}}{+}{\mathrm{e44}}{,}{\mathrm{e12}}{+}{\mathrm{e45}}{,}{\mathrm{e13}}{+}{\mathrm{e46}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e15}}{-}{\mathrm{e42}}{,}{\mathrm{e16}}{-}{\mathrm{e43}}{,}{\mathrm{e21}}{+}{\mathrm{e54}}{,}{\mathrm{e22}}{+}{\mathrm{e55}}{,}{\mathrm{e23}}{+}{\mathrm{e56}}{,}{\mathrm{e24}}{-}{\mathrm{e51}}{,}{\mathrm{e25}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e53}}{,}{\mathrm{e31}}{+}{\mathrm{e64}}{,}{\mathrm{e32}}{+}{\mathrm{e65}}{,}{\mathrm{e33}}{+}{\mathrm{e66}}{,}{\mathrm{e34}}{-}{\mathrm{e61}}{,}{\mathrm{e35}}{-}{\mathrm{e62}}{,}{\mathrm{e36}}{-}{\mathrm{e63}}\right]$ (6.2)
 gl6R > so6 := MatrixAlgebras("Subalgebra", gl6R, [g]);
 ${\mathrm{so6}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{,}{\mathrm{e14}}{-}{\mathrm{e41}}{,}{\mathrm{e15}}{-}{\mathrm{e51}}{,}{\mathrm{e16}}{-}{\mathrm{e61}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{,}{\mathrm{e24}}{-}{\mathrm{e42}}{,}{\mathrm{e25}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e62}}{,}{\mathrm{e34}}{-}{\mathrm{e43}}{,}{\mathrm{e35}}{-}{\mathrm{e53}}{,}{\mathrm{e36}}{-}{\mathrm{e63}}{,}{\mathrm{e45}}{-}{\mathrm{e54}}{,}{\mathrm{e46}}{-}{\mathrm{e64}}{,}{\mathrm{e56}}{-}{\mathrm{e65}}\right]$ (6.3)
 gl6R > newu3subalgebra := IntersectSubspaces([gl3C, so6]);
 ${\mathrm{newu3subalgebra}}{≔}\left[{-}{\mathrm{e12}}{+}{\mathrm{e21}}{-}{\mathrm{e45}}{+}{\mathrm{e54}}{,}{-}{\mathrm{e36}}{+}{\mathrm{e63}}{,}{-}{\mathrm{e26}}{-}{\mathrm{e35}}{+}{\mathrm{e53}}{+}{\mathrm{e62}}{,}{-}{\mathrm{e16}}{-}{\mathrm{e34}}{+}{\mathrm{e43}}{+}{\mathrm{e61}}{,}{-}{\mathrm{e15}}{-}{\mathrm{e24}}{+}{\mathrm{e42}}{+}{\mathrm{e51}}{,}{-}{\mathrm{e14}}{+}{\mathrm{e41}}{,}{-}{\mathrm{e25}}{+}{\mathrm{e52}}{,}{-}{\mathrm{e13}}{+}{\mathrm{e31}}{-}{\mathrm{e46}}{+}{\mathrm{e64}}{,}{-}{\mathrm{e23}}{+}{\mathrm{e32}}{-}{\mathrm{e56}}{+}{\mathrm{e65}}\right]$ (6.4)

The command  DGequal can be used to check that  the subalgebras u3 and newu3 are equal.

 gl6R > Tools:-DGequal(u3subalgebra,newu3subalgebra);
 ${\mathrm{true}}$ (6.5)

Calculate the structure equations for u(3).

 ${\mathrm{u3data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{2}{}{\mathrm{e3}}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{2}{}{\mathrm{e3}}{-}{2}{}{\mathrm{e9}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{2}{}{\mathrm{e7}}{-}{2}{}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e6}}\right]$ (6.6)
 gl6R > DGsetup(u3data):
 u3 >
 > C := Center();
 ${C}{≔}\left[{\mathrm{e3}}{+}{\mathrm{e7}}{+}{\mathrm{e9}}\right]$ (6.7)
 u3 > L := QuotientAlgebra(C, [e1, e2, e3, e4, e5, e6, e7, e8], u3mod);
 ${L}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{2}{}{\mathrm{e3}}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{4}{}{\mathrm{e3}}{+}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{2}{}{\mathrm{e3}}{+}{4}{}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e6}}\right]$ (6.8)
 u3 > DGsetup(L);
 ${\mathrm{Lie algebra: u3mod}}$ (6.9)
 u3mod >

Example 5. Construct the special unity Lie algebra su(3)

The special unity algebra su(n) is the subalgebra of gl(6,R) which fixes the standard complex structure, the standard metric and the real and imaginary parts of the complex volume form. It consists of matrices of the form blockmatrix(n, n, [A, B, -B, A]), where A and B are nxn matrices, A is skew-symmetric and B is symmetric and trace-free.  The dimension of su(n) is n^2 - 1.

 > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 u3mod > DGsetup(MatrixAlgebras("Full",6)):
 gl6R > DGsetup([x1, x2, x3, y1, y2, y3], E6):

Define the metric, the complex structure,  the real and imaginary parts of the complex volume form.

 E6 > g := CanonicalTensors("Metric", "bas",6,0):
 E6 > J := CanonicalTensors("ComplexStructure", "bas");
 ${J}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_y1}}{-}{\mathrm{dx2}}{}{\mathrm{D_y2}}{-}{\mathrm{dx3}}{}{\mathrm{D_y3}}{+}{\mathrm{dy1}}{}{\mathrm{D_x1}}{+}{\mathrm{dy2}}{}{\mathrm{D_x2}}{+}{\mathrm{dy3}}{}{\mathrm{D_x3}}$ (7.1)
 E6 > dz1 := DGzip([1,I],[dx1, dy1],"plus"): dz2 := DGzip([1,I],[dx2, dy2], "plus"): dz3 := DGzip([1,I],[dx3, dy3], "plus"): nu := dz1&wedge dz2 &wedge dz3:
 E6 > nuR:= (1/2) &mult ( nu  &plus Tools:-DGmap(1,conjugate,nu));
 ${\mathrm{nuR}}{≔}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx3}}{-}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dy2}}{}{\mathrm{^}}{}{\mathrm{dy3}}{+}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dy1}}{}{\mathrm{^}}{}{\mathrm{dy3}}{-}{\mathrm{dx3}}{}{\mathrm{^}}{}{\mathrm{dy1}}{}{\mathrm{^}}{}{\mathrm{dy2}}$ (7.2)
 E6 > nuI:=(I/2) &mult ( nu  &minus Tools:-DGmap(1,conjugate,nu));
 ${\mathrm{nuI}}{≔}{-}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dy3}}{+}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx3}}{}{\mathrm{^}}{}{\mathrm{dy2}}{-}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx3}}{}{\mathrm{^}}{}{\mathrm{dy1}}{+}{\mathrm{dy1}}{}{\mathrm{^}}{}{\mathrm{dy2}}{}{\mathrm{^}}{}{\mathrm{dy3}}$ (7.3)

Find the subalgebra of gl6R which fixes g, J, nuI and nuR.

 E6 > su3subalgebra := MatrixAlgebras("Subalgebra",gl6R,[g, J, nuI, nuR]);
 ${\mathrm{su3subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{+}{\mathrm{e45}}{-}{\mathrm{e54}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e46}}{-}{\mathrm{e64}}{,}{\mathrm{e14}}{-}{\mathrm{e36}}{-}{\mathrm{e41}}{+}{\mathrm{e63}}{,}{\mathrm{e15}}{+}{\mathrm{e24}}{-}{\mathrm{e42}}{-}{\mathrm{e51}}{,}{\mathrm{e16}}{+}{\mathrm{e34}}{-}{\mathrm{e43}}{-}{\mathrm{e61}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{,}{\mathrm{e25}}{-}{\mathrm{e36}}{-}{\mathrm{e52}}{+}{\mathrm{e63}}{,}{\mathrm{e26}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e62}}\right]$ (7.4)
 gl6R > su3data := LieAlgebraData(su3subalgebra, su3);
 ${\mathrm{su3data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{2}{}{\mathrm{e3}}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{2}{}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{2}{}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e8}}\right]{=}{-}{2}{}{\mathrm{e6}}\right]$ (7.5)
 gl6R >

Example 6. Construct the general quaternionic Lie algebra gl(2,H) as a subalgebra of gl(8, R)

The Lie algebra gl(n, H) is the real Lie algebra of nxn matrices with quaternion entries. The algebra gl(n, H) can also be defined as  the subalgebra of gl(4n, R) which fixes a pair of skew-commuting complex  structures on R^4n. The algebra gl(n, H) consists of matrices of the type

blockmatrix(n, n, [A,  -C, B, - D], [C, A, -D, -B], [-B, D, A, -C],[D, B, C,-A]]),

where the matrices A, B, C, D are arbitrary nxn matrices. The dimension of  gl(n, H) is 4n^2.  In this example we construct gl(2,H).

 > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 gl6R > DGsetup(MatrixAlgebras("Full",8), gl8R):
 gl8R > DGsetup([x1, y1, u1, v1, x2, y2, u2, v2], E8):

Define two matrices Jm and Km which satisfy Jm^2 = -I , Km^2 = -I and Jm . Km = - Km . Jm

 E8 > Jm := Matrix([[0, 0, 0, 0, -1, 0, 0, 0], [0, 0, 0, 0, 0, -1, 0, 0], [0, 0, 0, 0, 0, 0, -1, 0], [0, 0, 0, 0, 0, 0, 0, -1], [1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0]]);
 E8 > Km := Matrix([[0, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, -1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, -1, 0, 0, 0], [0, 0, 0, 0, 0, -1, 0, 0]]);
 E8 > (Jm^2 +1), evalm(Km^2 +1), evalm(Jm &* Km + Km &*Jm);

Convert Jm and Km to type (1,1) tensors.

 E8 > J := convert(Jm, DGtensor,[["cov_bas", "con_bas"],[]]);
 ${J}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_x2}}{-}{\mathrm{dy1}}{}{\mathrm{D_y2}}{-}{\mathrm{du1}}{}{\mathrm{D_u2}}{-}{\mathrm{dv1}}{}{\mathrm{D_v2}}{+}{\mathrm{dx2}}{}{\mathrm{D_x1}}{+}{\mathrm{dy2}}{}{\mathrm{D_y1}}{+}{\mathrm{du2}}{}{\mathrm{D_u1}}{+}{\mathrm{dv2}}{}{\mathrm{D_v1}}$ (8.1)
 E8 > K := convert(Km,DGtensor,[["cov_bas", "con_bas"],[]]);
 ${K}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_u1}}{-}{\mathrm{dy1}}{}{\mathrm{D_v1}}{+}{\mathrm{du1}}{}{\mathrm{D_x1}}{+}{\mathrm{dv1}}{}{\mathrm{D_y1}}{+}{\mathrm{dx2}}{}{\mathrm{D_u2}}{+}{\mathrm{dy2}}{}{\mathrm{D_v2}}{-}{\mathrm{du2}}{}{\mathrm{D_x2}}{-}{\mathrm{dv2}}{}{\mathrm{D_y2}}$ (8.2)
 E8 > gl2Hsubalgebra := MatrixAlgebras("Subalgebra", gl8R, [J, K]); ${\mathrm{gl2Hsubalgebra}}{≔}\left[{\mathrm{e11}}{+}{\mathrm{e33}}{+}{\mathrm{e55}}{+}{\mathrm{e77}}{,}{\mathrm{e12}}{+}{\mathrm{e34}}{+}{\mathrm{e56}}{+}{\mathrm{e78}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e57}}{-}{\mathrm{e75}}{,}{\mathrm{e14}}{-}{\mathrm{e32}}{+}{\mathrm{e58}}{-}{\mathrm{e76}}{,}{\mathrm{e15}}{-}{\mathrm{e37}}{-}{\mathrm{e51}}{+}{\mathrm{e73}}{,}{\mathrm{e16}}{-}{\mathrm{e38}}{-}{\mathrm{e52}}{+}{\mathrm{e74}}{,}{\mathrm{e17}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e71}}{,}{\mathrm{e18}}{+}{\mathrm{e36}}{-}{\mathrm{e54}}{-}{\mathrm{e72}}{,}{\mathrm{e21}}{+}{\mathrm{e43}}{+}{\mathrm{e65}}{+}{\mathrm{e87}}{,}{\mathrm{e22}}{+}{\mathrm{e44}}{+}{\mathrm{e66}}{+}{\mathrm{e88}}{,}{\mathrm{e23}}{-}{\mathrm{e41}}{+}{\mathrm{e67}}{-}{\mathrm{e85}}{,}{\mathrm{e24}}{-}{\mathrm{e42}}{+}{\mathrm{e68}}{-}{\mathrm{e86}}{,}{\mathrm{e25}}{-}{\mathrm{e47}}{-}{\mathrm{e61}}{+}{\mathrm{e83}}{,}{\mathrm{e26}}{-}{\mathrm{e48}}{-}{\mathrm{e62}}{+}{\mathrm{e84}}{,}{\mathrm{e27}}{+}{\mathrm{e45}}{-}{\mathrm{e63}}{-}{\mathrm{e81}}{,}{\mathrm{e28}}{+}{\mathrm{e46}}{-}{\mathrm{e64}}{-}{\mathrm{e82}}\right]$
 ${\mathrm{gl2Hsubalgebra}}{≔}\left[{\mathrm{e11}}{+}{\mathrm{e33}}{+}{\mathrm{e55}}{+}{\mathrm{e77}}{,}{\mathrm{e12}}{+}{\mathrm{e34}}{+}{\mathrm{e56}}{+}{\mathrm{e78}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e57}}{-}{\mathrm{e75}}{,}{\mathrm{e14}}{-}{\mathrm{e32}}{+}{\mathrm{e58}}{-}{\mathrm{e76}}{,}{\mathrm{e15}}{-}{\mathrm{e37}}{-}{\mathrm{e51}}{+}{\mathrm{e73}}{,}{\mathrm{e16}}{-}{\mathrm{e38}}{-}{\mathrm{e52}}{+}{\mathrm{e74}}{,}{\mathrm{e17}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e71}}{,}{\mathrm{e18}}{+}{\mathrm{e36}}{-}{\mathrm{e54}}{-}{\mathrm{e72}}{,}{\mathrm{e21}}{+}{\mathrm{e43}}{+}{\mathrm{e65}}{+}{\mathrm{e87}}{,}{\mathrm{e22}}{+}{\mathrm{e44}}{+}{\mathrm{e66}}{+}{\mathrm{e88}}{,}{\mathrm{e23}}{-}{\mathrm{e41}}{+}{\mathrm{e67}}{-}{\mathrm{e85}}{,}{\mathrm{e24}}{-}{\mathrm{e42}}{+}{\mathrm{e68}}{-}{\mathrm{e86}}{,}{\mathrm{e25}}{-}{\mathrm{e47}}{-}{\mathrm{e61}}{+}{\mathrm{e83}}{,}{\mathrm{e26}}{-}{\mathrm{e48}}{-}{\mathrm{e62}}{+}{\mathrm{e84}}{,}{\mathrm{e27}}{+}{\mathrm{e45}}{-}{\mathrm{e63}}{-}{\mathrm{e81}}{,}{\mathrm{e28}}{+}{\mathrm{e46}}{-}{\mathrm{e64}}{-}{\mathrm{e82}}\right]$ (8.3)
 gl8R > gl2Hdata := LieAlgebraData(gl2Hsubalgebra, gl2H);
 ${\mathrm{gl2Hdata}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e10}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e3}}{-}{\mathrm{e12}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e5}}{-}{\mathrm{e14}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e7}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{2}{}{\mathrm{e5}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e3}}{-}{\mathrm{e12}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e10}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e7}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e5}}{+}{\mathrm{e14}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{-}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e5}}{-}{\mathrm{e14}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e7}}{+}{\mathrm{e16}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e10}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e3}}{-}{\mathrm{e12}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e7}}{-}{\mathrm{e16}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e8}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e5}}{-}{\mathrm{e14}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e3}}{+}{\mathrm{e12}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e10}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e10}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e15}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e11}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e15}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e14}}\right]{=}{-}{2}{}{\mathrm{e16}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e15}}\right]{=}{\mathrm{e13}}{,}\left[{\mathrm{e12}}{,}{\mathrm{e16}}\right]{=}{2}{}{\mathrm{e14}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e13}}{,}{\mathrm{e16}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e15}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e14}}{,}{\mathrm{e16}}\right]{=}{-}{2}{}{\mathrm{e12}}{,}\left[{\mathrm{e15}}{,}{\mathrm{e16}}\right]{=}{\mathrm{e9}}\right]$ (8.4)
 gl8R > DGsetup(gl2Hdata);
 ${\mathrm{Lie algebra: gl2H}}$ (8.5)
 gl2H >

Example 7.  Construct the symplectic Lie algebra sp(2)

The symplectic algebra sp(n) is the subalgebra of gl(2n, R) of matrices which fixes a symplectic form on R^n. With this definition the algebra sp(n) consists of matrices of the form blockmatrix(n, n, [[A, B], [C, D]]), where D = -transpose(A) and B and C are nxn symmetric matrices. The dimension of sp(n)  is n(2n+1).

Alternatively, the symplectic algebra sp(n)  can be viewed as the subalgebra of  gl(n, H) in gl(4n, R) of matrices which fixes the standard metric. In this description sp(n) is the subalgebra of gl(4n, R) given by matrices of  the form

blockmatrix(n, n, [A, -C, B, -D], [C, A, -,D, -B],[-B, D, A, -C],[D, B, C,-A]]).

Here A is skew-symmetric and B, C, D are symmetric.

 > with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 gl2H > DGsetup(MatrixAlgebras("Full",4),gl4R):
 gl4R > DGsetup([q1, p1, q2, p2], E4);
 ${\mathrm{frame name: E4}}$ (9.1)

Define the standard symplectic form on E4.

 E4 > omega := CanonicalTensors("SymplecticForm", "bas");
 ${\mathrm{ω}}{≔}{\mathrm{dq1}}{}{\mathrm{^}}{}{\mathrm{dq2}}{+}{\mathrm{dp1}}{}{\mathrm{^}}{}{\mathrm{dp2}}$ (9.2)
 E4 > sp2Asubalgebra := MatrixAlgebras("Subalgebra", gl4R, [omega]);
 ${\mathrm{sp2Asubalgebra}}{≔}\left[{\mathrm{e11}}{-}{\mathrm{e33}}{,}{\mathrm{e12}}{-}{\mathrm{e43}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{+}{\mathrm{e23}}{,}{\mathrm{e21}}{-}{\mathrm{e34}}{,}{\mathrm{e22}}{-}{\mathrm{e44}}{,}{\mathrm{e24}}{,}{\mathrm{e31}}{,}{\mathrm{e32}}{+}{\mathrm{e41}}{,}{\mathrm{e42}}\right]$ (9.3)
 ${\mathrm{sp2Adata}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{2}{}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{-}{2}{}{\mathrm{e10}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e1}}{+}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e9}}\right]{=}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{2}{}{\mathrm{e7}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e10}}\right]{=}{-}{2}{}{\mathrm{e10}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e6}}\right]$ (9.4)
 ${\mathrm{Lie algebra: sp2A}}$ (9.5)
 ${\mathrm{true}}{,}{\mathrm{true}}$ (9.6)

Now turn to the alternative formulation. We use the construction of gl(2, H) given in the previous example.

 sp2A > DGsetup([x1, y1, u1, v1, x2, y2, u2, v2], E8);
 E8 > J := CanonicalTensors("ComplexStructure", "bas");
 ${J}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_x2}}{-}{\mathrm{dy1}}{}{\mathrm{D_y2}}{-}{\mathrm{du1}}{}{\mathrm{D_u2}}{-}{\mathrm{dv1}}{}{\mathrm{D_v2}}{+}{\mathrm{dx2}}{}{\mathrm{D_x1}}{+}{\mathrm{dy2}}{}{\mathrm{D_y1}}{+}{\mathrm{du2}}{}{\mathrm{D_u1}}{+}{\mathrm{dv2}}{}{\mathrm{D_v1}}$ (9.7)
 E8 > K1 := evalDG( -dx1 &t D_u1 - dy1 &t D_v1 +du1 &t D_x1 + dv1 &t D_y1);
 ${\mathrm{K1}}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_u1}}{-}{\mathrm{dy1}}{}{\mathrm{D_v1}}{+}{\mathrm{du1}}{}{\mathrm{D_x1}}{+}{\mathrm{dv1}}{}{\mathrm{D_y1}}$ (9.8)
 E8 > K2 := evalDG( -dx2 &t D_u2 - dy2 &t D_v2 +du2 &t D_x2 + dv2 &t D_y2);
 ${\mathrm{K2}}{≔}{-}{\mathrm{dx2}}{}{\mathrm{D_u2}}{-}{\mathrm{dy2}}{}{\mathrm{D_v2}}{+}{\mathrm{du2}}{}{\mathrm{D_x2}}{+}{\mathrm{dv2}}{}{\mathrm{D_y2}}$ (9.9)
 E8 > K := K1 &minus K2;
 ${K}{≔}{-}{\mathrm{dx1}}{}{\mathrm{D_u1}}{-}{\mathrm{dy1}}{}{\mathrm{D_v1}}{+}{\mathrm{du1}}{}{\mathrm{D_x1}}{+}{\mathrm{dv1}}{}{\mathrm{D_y1}}{+}{\mathrm{dx2}}{}{\mathrm{D_u2}}{+}{\mathrm{dy2}}{}{\mathrm{D_v2}}{-}{\mathrm{du2}}{}{\mathrm{D_x2}}{-}{\mathrm{dv2}}{}{\mathrm{D_y2}}$ (9.10)
 E8 > g := CanonicalTensors("Metric", "bas", 8, 0);
 ${g}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dy1}}{}{\mathrm{dy1}}{+}{\mathrm{du1}}{}{\mathrm{du1}}{+}{\mathrm{dv1}}{}{\mathrm{dv1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dy2}}{}{\mathrm{dy2}}{+}{\mathrm{du2}}{}{\mathrm{du2}}{+}{\mathrm{dv2}}{}{\mathrm{dv2}}$ (9.11)
 E8 > DGsetup(MatrixAlgebras("Full",8), gl8R):
 gl8R > sp2Bsubalgebra := MatrixAlgebras("Subalgebra", gl8R, [J, K, g]);
 ${\mathrm{sp2Bsubalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{+}{\mathrm{e34}}{-}{\mathrm{e43}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{+}{\mathrm{e78}}{-}{\mathrm{e87}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e57}}{-}{\mathrm{e75}}{,}{\mathrm{e14}}{+}{\mathrm{e23}}{-}{\mathrm{e32}}{-}{\mathrm{e41}}{+}{\mathrm{e58}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{-}{\mathrm{e85}}{,}{\mathrm{e15}}{-}{\mathrm{e37}}{-}{\mathrm{e51}}{+}{\mathrm{e73}}{,}{\mathrm{e16}}{+}{\mathrm{e25}}{-}{\mathrm{e38}}{-}{\mathrm{e47}}{-}{\mathrm{e52}}{-}{\mathrm{e61}}{+}{\mathrm{e74}}{+}{\mathrm{e83}}{,}{\mathrm{e17}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e71}}{,}{\mathrm{e18}}{+}{\mathrm{e27}}{+}{\mathrm{e36}}{+}{\mathrm{e45}}{-}{\mathrm{e54}}{-}{\mathrm{e63}}{-}{\mathrm{e72}}{-}{\mathrm{e81}}{,}{\mathrm{e24}}{-}{\mathrm{e42}}{+}{\mathrm{e68}}{-}{\mathrm{e86}}{,}{\mathrm{e26}}{-}{\mathrm{e48}}{-}{\mathrm{e62}}{+}{\mathrm{e84}}{,}{\mathrm{e28}}{+}{\mathrm{e46}}{-}{\mathrm{e64}}{-}{\mathrm{e82}}\right]$ (9.12)
 gl8R > sp2Bdata := LieAlgebraData(sp2Bsubalgebra, sp2B);
 ${\mathrm{sp2Bdata}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{2}{}{\mathrm{e2}}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{2}{}{\mathrm{e4}}{-}{2}{}{\mathrm{e9}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{2}{}{\mathrm{e6}}{-}{2}{}{\mathrm{e10}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{2}{}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{2}{}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{2}{}{\mathrm{e6}}{-}{2}{}{\mathrm{e10}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{2}{}{\mathrm{e4}}{+}{2}{}{\mathrm{e9}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{-}{2}{}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{-}{2}{}{\mathrm{e2}}{-}{2}{}{\mathrm{e8}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{-}{2}{}{\mathrm{e10}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e10}}\right]{=}{2}{}{\mathrm{e9}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e10}}\right]{=}{-}{2}{}{\mathrm{e8}}\right]$ (9.13)
 gl8R > DGsetup(sp2Bdata);
 ${\mathrm{Lie algebra: sp2B}}$ (9.14)

One can use the Query command to check that the Lie algebra sp2B is semisimple and indecomposable (although this takes several minutes of computation time).

Example 8.  Construct the exceptional Lie algebra g2

In this example we follow the description of g2 as found in the text:  Spinors and Calibrations by F. Resse Harvey,  p113-118,  namely, g2 is the subalgebra of  gl(7,R) which fixes a certain 3-form.  We check that the g2 is a subalgebra of so(7) and we calculate the g2 stabilizer of  a vector to be a certain 8-dimensional subalgebra h ( this subalgebra is in fact su(3)).  This proves that the 7 sphere is a G2 homogeneous space.

 sp2B > restart: with(DifferentialGeometry): with(LieAlgebras): with(Tensor):
 > DGsetup(MatrixAlgebras("Full",7), gl7R);
 ${\mathrm{Lie algebra: gl7R}}$ (10.1)
 gl7R > DGsetup([x1, x2, x3, x4, x5, x6, x7],E7):
 E7 > g := CanonicalTensors("Metric", "bas", 7,0);
 ${g}{≔}{\mathrm{dx1}}{}{\mathrm{dx1}}{+}{\mathrm{dx2}}{}{\mathrm{dx2}}{+}{\mathrm{dx3}}{}{\mathrm{dx3}}{+}{\mathrm{dx4}}{}{\mathrm{dx4}}{+}{\mathrm{dx5}}{}{\mathrm{dx5}}{+}{\mathrm{dx6}}{}{\mathrm{dx6}}{+}{\mathrm{dx7}}{}{\mathrm{dx7}}$ (10.2)
 E7 > phi := evalDG(dx1 &w dx2 &w dx3  + dx1 &w dx4 &w dx5 -dx1 &w dx6 &w dx7 + dx2 &w dx4 &w dx6+ dx2 &w dx5 &w dx7 +dx3 &w dx4 &w dx7 -dx3 &w dx5 &w dx6);
 ${\mathrm{φ}}{≔}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx3}}{+}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx4}}{}{\mathrm{^}}{}{\mathrm{dx5}}{-}{\mathrm{dx1}}{}{\mathrm{^}}{}{\mathrm{dx6}}{}{\mathrm{^}}{}{\mathrm{dx7}}{+}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx4}}{}{\mathrm{^}}{}{\mathrm{dx6}}{+}{\mathrm{dx2}}{}{\mathrm{^}}{}{\mathrm{dx5}}{}{\mathrm{^}}{}{\mathrm{dx7}}{+}{\mathrm{dx3}}{}{\mathrm{^}}{}{\mathrm{dx4}}{}{\mathrm{^}}{}{\mathrm{dx7}}{-}{\mathrm{dx3}}{}{\mathrm{^}}{}{\mathrm{dx5}}{}{\mathrm{^}}{}{\mathrm{dx6}}$ (10.3)
 E7 >
 > g2subalgebra := MatrixAlgebras("Subalgebra",gl7R,[phi]);
 ${\mathrm{g2subalgebra}}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e57}}{-}{\mathrm{e75}}{,}{\mathrm{e14}}{-}{\mathrm{e36}}{-}{\mathrm{e41}}{+}{\mathrm{e63}}{,}{\mathrm{e15}}{-}{\mathrm{e37}}{-}{\mathrm{e51}}{+}{\mathrm{e73}}{,}{\mathrm{e16}}{+}{\mathrm{e34}}{-}{\mathrm{e43}}{-}{\mathrm{e61}}{,}{\mathrm{e17}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e71}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e24}}{+}{\mathrm{e35}}{-}{\mathrm{e42}}{-}{\mathrm{e53}}{,}{\mathrm{e25}}{-}{\mathrm{e34}}{+}{\mathrm{e43}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e37}}{-}{\mathrm{e62}}{+}{\mathrm{e73}}{,}{\mathrm{e27}}{+}{\mathrm{e36}}{-}{\mathrm{e63}}{-}{\mathrm{e72}}{,}{\mathrm{e45}}{-}{\mathrm{e54}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e46}}{-}{\mathrm{e57}}{-}{\mathrm{e64}}{+}{\mathrm{e75}}{,}{\mathrm{e47}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{-}{\mathrm{e74}}\right]$ (10.4)

If we impose the additional constraint that the metric g be preserved, the result remains the same. This proves that g2 is a subalgebra of so(7).

 gl7R > S := MatrixAlgebras("Subalgebra", gl7R, [phi, g]);
 ${S}{≔}\left[{\mathrm{e12}}{-}{\mathrm{e21}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{,}{\mathrm{e13}}{-}{\mathrm{e31}}{+}{\mathrm{e57}}{-}{\mathrm{e75}}{,}{\mathrm{e14}}{-}{\mathrm{e36}}{-}{\mathrm{e41}}{+}{\mathrm{e63}}{,}{\mathrm{e15}}{-}{\mathrm{e37}}{-}{\mathrm{e51}}{+}{\mathrm{e73}}{,}{\mathrm{e16}}{+}{\mathrm{e34}}{-}{\mathrm{e43}}{-}{\mathrm{e61}}{,}{\mathrm{e17}}{+}{\mathrm{e35}}{-}{\mathrm{e53}}{-}{\mathrm{e71}}{,}{\mathrm{e23}}{-}{\mathrm{e32}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e24}}{+}{\mathrm{e35}}{-}{\mathrm{e42}}{-}{\mathrm{e53}}{,}{\mathrm{e25}}{-}{\mathrm{e34}}{+}{\mathrm{e43}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e37}}{-}{\mathrm{e62}}{+}{\mathrm{e73}}{,}{\mathrm{e27}}{+}{\mathrm{e36}}{-}{\mathrm{e63}}{-}{\mathrm{e72}}{,}{\mathrm{e45}}{-}{\mathrm{e54}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e46}}{-}{\mathrm{e57}}{-}{\mathrm{e64}}{+}{\mathrm{e75}}{,}{\mathrm{e47}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{-}{\mathrm{e74}}\right]$ (10.5)
 gl7R > Tools:-DGequal(g2subalgebra, S);
 ${\mathrm{true}}$ (10.6)

The infinitesimal isotropy algebra is 8 dimensional.

 gl7R > g2IsotropyData := MatrixAlgebras("Subalgebra",gl7R,[phi,D_x1]);
 ${\mathrm{g2IsotropyData}}{≔}\left[{\mathrm{e23}}{-}{\mathrm{e32}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e24}}{+}{\mathrm{e35}}{-}{\mathrm{e42}}{-}{\mathrm{e53}}{,}{\mathrm{e25}}{-}{\mathrm{e34}}{+}{\mathrm{e43}}{-}{\mathrm{e52}}{,}{\mathrm{e26}}{-}{\mathrm{e37}}{-}{\mathrm{e62}}{+}{\mathrm{e73}}{,}{\mathrm{e27}}{+}{\mathrm{e36}}{-}{\mathrm{e63}}{-}{\mathrm{e72}}{,}{\mathrm{e45}}{-}{\mathrm{e54}}{+}{\mathrm{e67}}{-}{\mathrm{e76}}{,}{\mathrm{e46}}{-}{\mathrm{e57}}{-}{\mathrm{e64}}{+}{\mathrm{e75}}{,}{\mathrm{e47}}{+}{\mathrm{e56}}{-}{\mathrm{e65}}{-}{\mathrm{e74}}\right]$ (10.7)
 gl7R > nops(%);
 ${8}$ (10.8)
 gl7R > g2data := LieAlgebraData(g2subalgebra, g2);
 ${\mathrm{g2data}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e8}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e5}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e4}}{-}{\mathrm{e10}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e11}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e4}}{-}{\mathrm{e10}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e5}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e13}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{-}{2}{}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{2}{}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e3}}{-}{\mathrm{e11}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e11}}\right]{=}{\mathrm{e5}}{+}{\mathrm{e9}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e12}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e5}}\right]{=}{-}{2}{}{\mathrm{e2}}{-}{2}{}{\mathrm{e13}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e10}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e2}}{+}{\mathrm{e13}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{-}{\mathrm{e14}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e6}}\right]{=}{-}{2}{}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e11}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e8}}\right]{=}{-}{\mathrm{e2}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e9}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e14}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e7}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e6}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e14}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{-}{\mathrm{e12}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e6}}{-}{\mathrm{e8}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e7}}{-}{\mathrm{e12}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e10}}\right]{=}{-}{\mathrm{e1}}{+}{\mathrm{e14}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e2}}{-}{\mathrm{e13}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e12}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e13}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e14}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e7}}\right]{=}{-}{\mathrm{e5}}{-}{\mathrm{e9}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e7}}{-}{\mathrm{e12}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e11}}\right]{=}{-}{\mathrm{e1}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e12}}\right]{=}{-}{\mathrm{e5}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e13}}\right]{=}{\mathrm{e4}}\right]$