LieAlgebra Lessons - Maple Programming Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : Lessons and Tutorials : LieAlgebras : DifferentialGeometry/LessonsAndTutorials/LieAlgebras/MatrixAlgebras

LieAlgebra Lessons

Lesson 7:  Matrix Lie Algebras

Overview

The set of all nxn matrices with real entries define a Lie algebra with Lie bracket given by the matrix commutator [a, b] = ab - ba This Lie algebra is called the general linear Lie algebra and is customarily denoted by gl(n). Its dimension is n^2.  In this lesson we will use the MatrixAlgebras command to create the general Lie algebra and some of its well-known and important subalgebras. You will learn to do the following.

 – Calculate the structure equations for the general Lie algebra gl(n) for small values of n.
 – Calculate the structure equations for the Lie algebra of all upper triangular matrices.
 – Calculate the structure equations for the Lie algebra of all strictly upper triangular matrices.
 – Calculate sl(3), the special linear Lie algebra, as a subalgebra of gl(3).
 – Calculate the orthogonal Lie algebras so(4,0) and so(3,1) as subalgebras of gl(4).
 – Calculate the Euclidean Lie algebra e(3) as a subalgebra of gl(4)
 – Calculate the exceptional Lie algebra g2 as a subalgebra of gl(7)

We shall initialize each of these Lie algebras and calculate some simple properties. Further computation of matrix algebras can be found in the DifferentialGeometry Tutorial ClassicalMatrixAlgebras.

The general linear Lie algebra and the Lie algebras of  upper triangular and strictly upper triangular matrices

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

Example 1.  We begin by using the MatrixAlgebras command to create the 4 dimensional Lie algebra gl(2) of all 2x2 matrices.

 > L, V, Omega := MatrixAlgebras("Full",2, gl2);
 ${L}{,}{V}{,}{\mathrm{Ω}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e1}}{-}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{\mathrm{e3}}\right]{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}{,}{\mathrm{e21}}{,}{\mathrm{e22}}\right]{,}\left[{\mathrm{ε11}}{,}{\mathrm{ε12}}{,}{\mathrm{ε21}}{,}{\mathrm{ε22}}\right]$ (2.1)

The command returns a sequence of 3 objects. The first object L is the Lie algebra data structure for gl(2). As always, the structure equations for the Lie algebra data structure are displayed, using the generic labels e1, e2, e3, e4 for the vectors in the Lie algebra.  The next output element V gives the labels that we shall use to denote the vectors in gl2 upon initialization with the command DGsetup. Here eij denotes the elementary matrix with a 1 in the i-th row and the j-th column.  The last output element gives the labels that with be used for the 1-forms on the Lie algebra.

 > DGsetup(L, V, Omega);
 ${\mathrm{Lie algebra: gl2}}$ (2.2)
 gl2 > MultiplicationTable("LieTable");
 $\left[\begin{array}{cccccc}{}& {\mathrm{|}}& {\mathrm{e11}}& {\mathrm{e12}}& {\mathrm{e21}}& {\mathrm{e22}}\\ {}& {\mathrm{---}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}\\ {\mathrm{e11}}& {\mathrm{|}}& {0}& {\mathrm{e12}}& {-}{\mathrm{e21}}& {0}\\ {\mathrm{e12}}& {\mathrm{|}}& {-}{\mathrm{e12}}& {0}& {\mathrm{e11}}{-}{\mathrm{e22}}& {\mathrm{e12}}\\ {\mathrm{e21}}& {\mathrm{|}}& {\mathrm{e21}}& {-}{\mathrm{e11}}{+}{\mathrm{e22}}& {0}& {-}{\mathrm{e21}}\\ {\mathrm{e22}}& {\mathrm{|}}& {0}& {-}{\mathrm{e12}}& {\mathrm{e21}}& {0}\end{array}\right]$ (2.3)

We emphasize that the MatrixAlgebras program simply contains the general formulas for the bracket  of the elementary matrices eij and ehk and does not calculate explicitly with matrices.

As a simple calculation we calculate the center of the Lie algebra gl2 -- as expected it contains just the identity matrix.

 gl2 > Center();
 gl2 >
 $\left[{\mathrm{e11}}{+}{\mathrm{e22}}\right]$ (2.4)

Example 2.  Here is the 10 dimensional Lie algebra of 4x4 upper triangular matrices.

 gl2 > L, V, Omega := MatrixAlgebras("Upper",4, T4);
 ${L}{,}{V}{,}{\mathrm{Ω}}{≔}\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{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e7}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e9}}{,}\left[{\mathrm{e9}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e9}}\right]{,}\left[{\mathrm{e11}}{,}{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e22}}{,}{\mathrm{e23}}{,}{\mathrm{e24}}{,}{\mathrm{e33}}{,}{\mathrm{e34}}{,}{\mathrm{e44}}\right]{,}\left[{\mathrm{ε11}}{,}{\mathrm{ε12}}{,}{\mathrm{ε13}}{,}{\mathrm{ε14}}{,}{\mathrm{ε22}}{,}{\mathrm{ε23}}{,}{\mathrm{ε24}}{,}{\mathrm{ε33}}{,}{\mathrm{ε34}}{,}{\mathrm{ε44}}\right]$ (2.5)
 gl2 > DGsetup(L, V, Omega);
 ${\mathrm{Lie algebra: T4}}$ (2.6)

To display the multiplication table we need to increase the rtablesize parameter (see interface)

 T4 > interface(rtablesize = 13);
 ${10}$ (2.7)
 T4 > MultiplicationTable("LieTable");
 $\left[\begin{array}{cccccccccccc}{}& {\mathrm{|}}& {\mathrm{e11}}& {\mathrm{e12}}& {\mathrm{e13}}& {\mathrm{e14}}& {\mathrm{e22}}& {\mathrm{e23}}& {\mathrm{e24}}& {\mathrm{e33}}& {\mathrm{e34}}& {\mathrm{e44}}\\ {}& {\mathrm{---}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}\\ {\mathrm{e11}}& {\mathrm{|}}& {0}& {\mathrm{e12}}& {\mathrm{e13}}& {\mathrm{e14}}& {0}& {0}& {0}& {0}& {0}& {0}\\ {\mathrm{e12}}& {\mathrm{|}}& {-}{\mathrm{e12}}& {0}& {0}& {0}& {\mathrm{e12}}& {\mathrm{e13}}& {\mathrm{e14}}& {0}& {0}& {0}\\ {\mathrm{e13}}& {\mathrm{|}}& {-}{\mathrm{e13}}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e13}}& {\mathrm{e14}}& {0}\\ {\mathrm{e14}}& {\mathrm{|}}& {-}{\mathrm{e14}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e14}}\\ {\mathrm{e22}}& {\mathrm{|}}& {0}& {-}{\mathrm{e12}}& {0}& {0}& {0}& {\mathrm{e23}}& {\mathrm{e24}}& {0}& {0}& {0}\\ {\mathrm{e23}}& {\mathrm{|}}& {0}& {-}{\mathrm{e13}}& {0}& {0}& {-}{\mathrm{e23}}& {0}& {0}& {\mathrm{e23}}& {\mathrm{e24}}& {0}\\ {\mathrm{e24}}& {\mathrm{|}}& {0}& {-}{\mathrm{e14}}& {0}& {0}& {-}{\mathrm{e24}}& {0}& {0}& {0}& {0}& {\mathrm{e24}}\\ {\mathrm{e33}}& {\mathrm{|}}& {0}& {0}& {-}{\mathrm{e13}}& {0}& {0}& {-}{\mathrm{e23}}& {0}& {0}& {\mathrm{e34}}& {0}\\ {\mathrm{e34}}& {\mathrm{|}}& {0}& {0}& {-}{\mathrm{e14}}& {0}& {0}& {-}{\mathrm{e24}}& {0}& {-}{\mathrm{e34}}& {0}& {\mathrm{e34}}\\ {\mathrm{e44}}& {\mathrm{|}}& {0}& {0}& {0}& {-}{\mathrm{e14}}& {0}& {0}& {-}{\mathrm{e24}}& {0}& {-}{\mathrm{e34}}& {0}\end{array}\right]$ (2.8)
 T4 > Series("Derived");
 $\left[\left[{\mathrm{e11}}{,}{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e22}}{,}{\mathrm{e23}}{,}{\mathrm{e24}}{,}{\mathrm{e33}}{,}{\mathrm{e34}}{,}{\mathrm{e44}}\right]{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e23}}{,}{\mathrm{e24}}{,}{\mathrm{e34}}\right]{,}\left[{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e24}}\right]{,}\left[{}\right]\right]$ (2.9)

Note that the first term in the derived series (the derived algebra) consists of the 6 strictly upper triangular matrices. The fact that the last term in the derived series T4 is empty implies that the Lie algebra of 4x4 upper triangular matrices is solvable.

 T4 > Query("Solvable");
 ${\mathrm{true}}$ (2.10)

Example 3.  Here is the 10 dimensional Lie algebra of 5x5  strictly upper triangular matrices. This is a nilpotent Lie algebra.

 T4 > L, V, Omega := MatrixAlgebras("StrictlyUpper",5, U5);
 ${L}{,}{V}{,}{\mathrm{Ω}}{≔}\left[\left[{\mathrm{e1}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e7}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e4}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e8}}\right]{=}{\mathrm{e6}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e9}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e6}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e7}}{,}\left[{\mathrm{e8}}{,}{\mathrm{e10}}\right]{=}{\mathrm{e9}}\right]{,}\left[{\mathrm{e12}}{,}{\mathrm{e13}}{,}{\mathrm{e14}}{,}{\mathrm{e15}}{,}{\mathrm{e23}}{,}{\mathrm{e24}}{,}{\mathrm{e25}}{,}{\mathrm{e34}}{,}{\mathrm{e35}}{,}{\mathrm{e45}}\right]{,}\left[{\mathrm{ε12}}{,}{\mathrm{ε13}}{,}{\mathrm{ε14}}{,}{\mathrm{ε15}}{,}{\mathrm{ε23}}{,}{\mathrm{ε24}}{,}{\mathrm{ε25}}{,}{\mathrm{ε34}}{,}{\mathrm{ε35}}{,}{\mathrm{ε45}}\right]$ (2.11)
 T4 > DGsetup(L, V, Omega);
 ${\mathrm{Lie algebra: U5}}$ (2.12)

To display the multiplication table we need to increase the rtablesize parameter (see interface)

 U5 > MultiplicationTable("LieTable");
 $\left[\begin{array}{cccccccccccc}{}& {\mathrm{|}}& {\mathrm{e12}}& {\mathrm{e13}}& {\mathrm{e14}}& {\mathrm{e15}}& {\mathrm{e23}}& {\mathrm{e24}}& {\mathrm{e25}}& {\mathrm{e34}}& {\mathrm{e35}}& {\mathrm{e45}}\\ {}& {\mathrm{---}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}\\ {\mathrm{e12}}& {\mathrm{|}}& {0}& {0}& {0}& {0}& {\mathrm{e13}}& {\mathrm{e14}}& {\mathrm{e15}}& {0}& {0}& {0}\\ {\mathrm{e13}}& {\mathrm{|}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e14}}& {\mathrm{e15}}& {0}\\ {\mathrm{e14}}& {\mathrm{|}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e15}}\\ {\mathrm{e15}}& {\mathrm{|}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}\\ {\mathrm{e23}}& {\mathrm{|}}& {-}{\mathrm{e13}}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e24}}& {\mathrm{e25}}& {0}\\ {\mathrm{e24}}& {\mathrm{|}}& {-}{\mathrm{e14}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\mathrm{e25}}\\ {\mathrm{e25}}& {\mathrm{|}}& {-}{\mathrm{e15}}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}\\ {\mathrm{e34}}& {\mathrm{|}}& {0}& {-}{\mathrm{e14}}& {0}& {0}& {-}{\mathrm{e24}}& {0}& {0}& {0}& {0}& {\mathrm{e35}}\\ {\mathrm{e35}}& {\mathrm{|}}& {0}& {-}{\mathrm{e15}}& {0}& {0}& {-}{\mathrm{e25}}& {0}& {0}& {0}& {0}& {0}\\ {\mathrm{e45}}& {\mathrm{|}}& {0}& {0}& {-}{\mathrm{e15}}& {0}& {0}& {-}{\mathrm{e25}}& {0}& {-}{\mathrm{e35}}& {0}& {0}\end{array}\right]$ (2.13)

The Lie algebras of upper triangular matrices are all nilpotent.

 U5 > Query("Nilpotent");
 ${\mathrm{true}}$ (2.14)

We illustrate the fact that the upper series (Series) of a nilpotent Lie algebra g always stablizes at g.

 U5 > Series("Upper");
 $\left[\left[{\mathrm{e15}}\right]{,}\left[{\mathrm{e25}}{,}{\mathrm{e15}}{,}{\mathrm{e14}}\right]{,}\left[{\mathrm{e15}}{,}{\mathrm{e14}}{,}{\mathrm{e13}}{,}{\mathrm{e35}}{,}{\mathrm{e25}}{,}{\mathrm{e24}}\right]{,}\left[{\mathrm{e45}}{,}{\mathrm{e35}}{,}{\mathrm{e34}}{,}{\mathrm{e25}}{,}{\mathrm{e24}}{,}{\mathrm{e23}}{,}{\mathrm{e15}}{,}{\mathrm{e14}}{,}{\mathrm{e13}}{,}{\mathrm{e12}}\right]\right]$ (2.15)

The special linear Lie algebra sl(3)

The special linear Lie algebra sl(n) is defined as the subalgebra of gl(n) consisting of trace-free matrices. To calculate the elements of sl(n) with the MatrixAlgebras command we shall use the following observation.

Define a 3 dimensional space M with coordinates [x, y, z] and on M define a general linear vector field X  . This is easily done with the a DifferentialGeometry extension of Maple's convert command.

 U5 > DGsetup([x, y, z], M);
 ${\mathrm{frame name: M}}$ (3.1)
 M > A:= Matrix([[a1, b1, c1], [a2 ,b2,c3], [a3, b3, c3]]);
 ${A}{≔}\left[\begin{array}{ccc}{\mathrm{a1}}& {\mathrm{b1}}& {\mathrm{c1}}\\ {\mathrm{a2}}& {\mathrm{b2}}& {\mathrm{c3}}\\ {\mathrm{a3}}& {\mathrm{b3}}& {\mathrm{c3}}\end{array}\right]$ (3.2)
 M > X := convert(A, DGvector);
 ${X}{≔}\left({\mathrm{a1}}{}{x}{+}{\mathrm{b1}}{}{y}{+}{\mathrm{c1}}{}{z}\right){}{\mathrm{D_x}}{+}\left({\mathrm{a2}}{}{x}{+}{\mathrm{b2}}{}{y}{+}{\mathrm{c3}}{}{z}\right){}{\mathrm{D_y}}{+}\left({\mathrm{a3}}{}{x}{+}{\mathrm{b3}}{}{y}{+}{\mathrm{c3}}{}{z}\right){}{\mathrm{D_z}}$ (3.3)

Now define the standard volume form on M and  calculate the Lie derivative of this volume form with respect to X.

 M > nu := evalDG(dx &w dy &w dz);
 ${\mathrm{ν}}{≔}{\mathrm{dx}}{}{\mathrm{^}}{}{\mathrm{dy}}{}{\mathrm{^}}{}{\mathrm{dz}}$ (3.4)
 M > LieDerivative(X, nu);
 $\left({\mathrm{c3}}{+}{\mathrm{b2}}{+}{\mathrm{a1}}\right){}{\mathrm{dx}}{}{\mathrm{^}}{}{\mathrm{dy}}{}{\mathrm{^}}{}{\mathrm{dz}}$ (3.5)

We see that nu is invariant with respect to X precisely when the matrix A is trace-free.  In general sl(n) can be defined the subalgebra of gl(n) for which the

associated linear vector fields preserve the standard volume form. This is the approach taken by the MatrixAlgebras program. Here are the steps in detail.

Step 1.  Define and initialize the ambient matrix algebra gl(3)

 M > L1 := MatrixAlgebras("Full", 3, gl3);
 ${\mathrm{L1}}{≔}\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]$ (3.6)
 M > DGsetup(L1):

Step 2.  Calculate sl(3) as a subalgebra of gl(3) -- note that each element of sl3_subalg is a trace-free matrix.

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

Step 3.  Calculate the structure equations for sl(3) and initialize the result.

 gl3 > L2 := LieAlgebraData(sl3_subalg, sl3);
 ${\mathrm{L2}}{≔}\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]$ (3.8)
 gl3 > DGsetup(L2);
 ${\mathrm{Lie algebra: sl3}}$ (3.9)
 sl3 > MultiplicationTable("LieTable");
 $\left[\begin{array}{cccccccccc}{}& {\mathrm{|}}& {\mathrm{e1}}& {\mathrm{e2}}& {\mathrm{e3}}& {\mathrm{e4}}& {\mathrm{e5}}& {\mathrm{e6}}& {\mathrm{e7}}& {\mathrm{e8}}\\ {}& {\mathrm{---}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}& {\mathrm{----}}\\ {\mathrm{e1}}& {\mathrm{|}}& {0}& {\mathrm{e2}}& {2}{}{\mathrm{e3}}& {-}{\mathrm{e4}}& {0}& {\mathrm{e6}}& {-}{2}{}{\mathrm{e7}}& {-}{\mathrm{e8}}\\ {\mathrm{e2}}& {\mathrm{|}}& {-}{\mathrm{e2}}& {0}& {0}& {\mathrm{e1}}{-}{\mathrm{e5}}& {\mathrm{e2}}& {\mathrm{e3}}& {-}{\mathrm{e8}}& {0}\\ {\mathrm{e3}}& {\mathrm{|}}& {-}{2}{}{\mathrm{e3}}& {0}& {0}& {-}{\mathrm{e6}}& {-}{\mathrm{e3}}& {0}& {\mathrm{e1}}& {\mathrm{e2}}\\ {\mathrm{e4}}& {\mathrm{|}}& {\mathrm{e4}}& {-}{\mathrm{e1}}{+}{\mathrm{e5}}& {\mathrm{e6}}& {0}& {-}{\mathrm{e4}}& {0}& {0}& {-}{\mathrm{e7}}\\ {\mathrm{e5}}& {\mathrm{|}}& {0}& {-}{\mathrm{e2}}& {\mathrm{e3}}& {\mathrm{e4}}& {0}& {2}{}{\mathrm{e6}}& {-}{\mathrm{e7}}& {-}{2}{}{\mathrm{e8}}\\ {\mathrm{e6}}& {\mathrm{|}}& {-}{\mathrm{e6}}& {-}{\mathrm{e3}}& {0}& {0}& {-}{2}{}{\mathrm{e6}}& {0}& {\mathrm{e4}}& {\mathrm{e5}}\\ {\mathrm{e7}}& {\mathrm{|}}& {2}{}{\mathrm{e7}}& {\mathrm{e8}}& {-}{\mathrm{e1}}& {0}& {\mathrm{e7}}& {-}{\mathrm{e4}}& {0}& {0}\\ {\mathrm{e8}}& {\mathrm{|}}& {\mathrm{e8}}& {0}& {-}{\mathrm{e2}}& {\mathrm{e7}}& {2}{}{\mathrm{e8}}& {-}{\mathrm{e5}}& {0}& {0}\end{array}\right]$ (3.10)

The Lie algebra sl(3) is semisimple:

 sl3 > Query("Semisimple");
 ${\mathrm{true}}$ (3.11)

The orthogonal Lie algebras so(4,0) and so(3,1)

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(*) . In the case where g(x, y) = transpose(x)*y this condition implies that a is skew-symmetric, that is,

so(n) = sn(n,0) = {a in gl(n) such that transpose(a) + a =0}  (**)

It we re-interprete the inner product g as a symmetric,rank 2 covariant tensor, then (*) becomes

LieDerivative(Z,  g) =0  (***)

where, just as in the previous example, Z is the linear vector field corresponding to the matrix a.

We start by illustrating this last point.

 sl3 > with(DifferentialGeometry): with(LieAlgebras):
 sl3 > DGsetup([w, x, y, z], M);
 ${\mathrm{frame name: M}}$ (4.1)
 M > g := evalDG(dw &t dw  + dx &t dx + dy &t dy + dz &t dz);
 ${g}{≔}{\mathrm{dw}}{}{\mathrm{dw}}{+}{\mathrm{dx}}{}{\mathrm{dx}}{+}{\mathrm{dy}}{}{\mathrm{dy}}{+}{\mathrm{dz}}{}{\mathrm{dz}}$ (4.2)
 M > A := Matrix([[a1, b1, c1, d1], [a2, b2, c2, d2], [a3, b3, c3, d3], [a4, b4, c4, d4]]);
 M >
 ${A}{≔}\left[\begin{array}{cccc}{\mathrm{a1}}& {\mathrm{b1}}& {\mathrm{c1}}& {\mathrm{d1}}\\ {\mathrm{a2}}& {\mathrm{b2}}& {\mathrm{c2}}& {\mathrm{d2}}\\ {\mathrm{a3}}& {\mathrm{b3}}& {\mathrm{c3}}& {\mathrm{d3}}\\ {\mathrm{a4}}& {\mathrm{b4}}& {\mathrm{c4}}& {\mathrm{d4}}\end{array}\right]$ (4.3)

Construct the linear vector field on M defined by the matrix A.

 M > Z := convert(A, DGvector);
 ${Z}{≔}\left({\mathrm{a1}}{}{w}{+}{\mathrm{b1}}{}{x}{+}{\mathrm{c1}}{}{y}{+}{\mathrm{d1}}{}{z}\right){}{\mathrm{D_w}}{+}\left({\mathrm{a2}}{}{w}{+}{\mathrm{b2}}{}{x}{+}{\mathrm{c2}}{}{y}{+}{\mathrm{d2}}{}{z}\right){}{\mathrm{D_x}}{+}\left({\mathrm{a3}}{}{w}{+}{\mathrm{b3}}{}{x}{+}{\mathrm{c3}}{}{y}{+}{\mathrm{d3}}{}{z}\right){}{\mathrm{D_y}}{+}\left({\mathrm{a4}}{}{w}{+}{\mathrm{b4}}{}{x}{+}{\mathrm{c4}}{}{y}{+}{\mathrm{d4}}{}{z}\right){}{\mathrm{D_z}}$ (4.4)
 M > h := LieDerivative(Z, g);
 ${h}{≔}{2}{}{\mathrm{a1}}{}{\mathrm{dw}}{}{\mathrm{dw}}{+}\left({\mathrm{b1}}{+}{\mathrm{a2}}\right){}{\mathrm{dw}}{}{\mathrm{dx}}{+}\left({\mathrm{c1}}{+}{\mathrm{a3}}\right){}{\mathrm{dw}}{}{\mathrm{dy}}{+}\left({\mathrm{d1}}{+}{\mathrm{a4}}\right){}{\mathrm{dw}}{}{\mathrm{dz}}{+}\left({\mathrm{b1}}{+}{\mathrm{a2}}\right){}{\mathrm{dx}}{}{\mathrm{dw}}{+}{2}{}{\mathrm{b2}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}\left({\mathrm{b3}}{+}{\mathrm{c2}}\right){}{\mathrm{dx}}{}{\mathrm{dy}}{+}\left({\mathrm{b4}}{+}{\mathrm{d2}}\right){}{\mathrm{dx}}{}{\mathrm{dz}}{+}\left({\mathrm{c1}}{+}{\mathrm{a3}}\right){}{\mathrm{dy}}{}{\mathrm{dw}}{+}\left({\mathrm{b3}}{+}{\mathrm{c2}}\right){}{\mathrm{dy}}{}{\mathrm{dx}}{+}{2}{}{\mathrm{c3}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}\left({\mathrm{c4}}{+}{\mathrm{d3}}\right){}{\mathrm{dy}}{}{\mathrm{dz}}{+}\left({\mathrm{d1}}{+}{\mathrm{a4}}\right){}{\mathrm{dz}}{}{\mathrm{dw}}{+}\left({\mathrm{b4}}{+}{\mathrm{d2}}\right){}{\mathrm{dz}}{}{\mathrm{dx}}{+}\left({\mathrm{c4}}{+}{\mathrm{d3}}\right){}{\mathrm{dz}}{}{\mathrm{dy}}{+}{2}{}{\mathrm{d4}}{}{\mathrm{dz}}{}{\mathrm{dz}}$ (4.5)

Set h to zero, solve the resulting equations for the parameters of the matrix A and back substitute into A

 M > Eq := Tools:-DGinfo(h, "CoefficientSet");
 ${\mathrm{Eq}}{≔}\left\{{2}{}{\mathrm{d4}}{,}{\mathrm{b1}}{+}{\mathrm{a2}}{,}{\mathrm{c1}}{+}{\mathrm{a3}}{,}{\mathrm{c4}}{+}{\mathrm{d3}}{,}{\mathrm{b3}}{+}{\mathrm{c2}}{,}{2}{}{\mathrm{b2}}{,}{2}{}{\mathrm{c3}}{,}{2}{}{\mathrm{a1}}{,}{\mathrm{d1}}{+}{\mathrm{a4}}{,}{\mathrm{b4}}{+}{\mathrm{d2}}\right\}$ (4.6)
 M > subs(solve(Eq, convert(A, set)), A);
 $\left[\begin{array}{cccc}{0}& {\mathrm{b1}}& {\mathrm{c1}}& {\mathrm{d1}}\\ {-}{\mathrm{b1}}& {0}& {\mathrm{c2}}& {\mathrm{d2}}\\ {-}{\mathrm{c1}}& {-}{\mathrm{c2}}& {0}& {\mathrm{d3}}\\ {-}{\mathrm{d1}}& {-}{\mathrm{d2}}& {-}{\mathrm{d3}}& {0}\end{array}\right]$ (4.7)

These calculations illustrate the equivalence of conditions (**) and (***) for n = 4.

We are now ready to repeat the 3 steps using in the previous paragraph.

Step 1.  Define and initialize the ambient matrix algebra gl(4)

 M > L1 := MatrixAlgebras("Full", 4, gl4):
 M > DGsetup(L1):

Step 2.  Calculate so(4) as a subalgebra of gl(4) which preserves the metric g. Note that each element of so4_subalg is a skew-symmetric matrix.

 gl4 > so4_subalg := MatrixAlgebras("Subalgebra",gl4,[g]);
 ${\mathrm{so4_subalg}}{≔}\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]$ (4.8)

Step 3.  Calculate the structure equations for so4 and initialize the result.

 gl4 > L2 := LieAlgebraData(so4_subalg, so4);
 ${\mathrm{L2}}{≔}\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]$ (4.9)
 gl4 > DGsetup(L2);
 ${\mathrm{Lie algebra: so4}}$ (4.10)
 so4 > MultiplicationTable("LieTable"); </