DifferentialGeometry/LieAlgebras/Query/MatrixAlgebra - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : DifferentialGeometry/LieAlgebras/Query/MatrixAlgebra

Query[MatrixAlgebra] - check if each matrix in a list of matrices belongs to a specified classical matrix algebra

Calling Sequences

Query("MatrixAlgebra")

Parameters

A        - a  list of square matrices, or a matrix representation of a Lie algebra

alg      - a string, specifying a classical matrix algebra

options  - (optional) keyword arguments output, quadraticform, skewform

Description

 • This query checks if a given list of matrices belongs to one of the following matrix algebras :

 • For the definitions of all these matrix algebras see, SimpleLieAlgebraData.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{LieAlgebras}\right):$

Example 1.

We check if each matrix in a list of matrices belongs to $\mathrm{sl}\left(2\right).$

 > $\mathrm{A1}≔\left[\mathrm{Matrix}\left(\left[\left[1,0\right],\left[0,-1\right]\right]\right),\mathrm{Matrix}\left(\left[\left[0,1\right],\left[0,0\right]\right]\right),\mathrm{Matrix}\left(\left[\left[0,0\right],\left[1,0\right]\right]\right)\right]$
 > $\mathrm{Query}\left(\mathrm{A1},"sl\left(2\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.1)
 > $\mathrm{A2}≔\left[\mathrm{Matrix}\left(\left[\left[1,0\right],\left[0,-1\right]\right]\right),\mathrm{Matrix}\left(\left[\left[1,1\right],\left[0,0\right]\right]\right),\mathrm{Matrix}\left(\left[\left[0,0\right],\left[1,0\right]\right]\right)\right]$
 > $\mathrm{Query}\left(\mathrm{A2},"sl\left(2\right)","MatrixAlgebra"\right)$
 ${\mathrm{false}}$ (2.2)

With the keyword argument output  = 'integer' , 0 is returned if all the matrices belong to the specified matrix algebra, otherwise the position of the first matrix which does not belong to the specified matrix algebra is returned.

 > $\mathrm{Query}\left(\mathrm{A1},"sl\left(2\right)",\mathrm{output}='\mathrm{integer}',"MatrixAlgebra"\right)$
 ${0}$ (2.3)
 > $\mathrm{Query}\left(\mathrm{A2},"sl\left(2\right)",\mathrm{output}='\mathrm{integer}',"MatrixAlgebra"\right)$
 ${2}$ (2.4)

Example 2.

We check if each matrix in list of matrices belong to $\mathrm{so}\left(2,2\right)$. This is the Lie algebra of 4×4 matrices which are skew-symmetric with respect to a quadratic form of signature [2,2]. The default choice for the quadratic form is .  With the keyword argument version  = 2, the quadratic form  is used. With the keyword argument quadraticform  = $M$, the quadratic form (a 4×4 symmetric matrix with signature [2, 2]) is used.

1. Default option.

 > $\mathrm{B1}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[1,0,0,0\right],\left[0,0,0,0\right],\left[0,0,-1,0\right],\left[0,0,0,0\right]\right],\left[\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,-1,0\right]\right],\left[\left[0,0,0,0\right],\left[1,0,0,0\right],\left[0,0,0,-1\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,-1\right]\right],\left[\left[0,0,0,-1\right],\left[0,0,1,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,-1,0,0\right],\left[1,0,0,0\right]\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{B1},"so\left(2, 2\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.5)

2. with version = 2.

 > $\mathrm{B2}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[0,-1,0,0\right],\left[1,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,1,0\right],\left[0,0,0,0\right],\left[1,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,1\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[1,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,1,0\right],\left[0,1,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,1\right],\left[0,0,0,0\right],\left[0,1,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,-1\right],\left[0,0,1,0\right]\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{B2},"so\left(2,2\right)",\mathrm{version}=2,"MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.6)

3. with quadraticform = M

 > $\mathrm{B3}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[1,0,0,0\right],\left[0,-1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,1,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,-1,0,0\right]\right],\left[\left[0,0,0,1\right],\left[0,0,0,0\right],\left[0,-1,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,1,0\right],\left[0,0,0,0\right],\left[-1,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,1\right],\left[-1,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,1,0\right],\left[0,0,0,-1\right]\right]\right]\right)$
 > $M≔\mathrm{Matrix}\left(\left[\left[0,1,0,0\right],\left[1,0,0,0\right],\left[0,0,0,1\right],\left[0,0,1,0\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{B3},"so\left(2, 2\right)",\mathrm{quadraticform}=M,"MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.7)



Example 3.

We check if the members of a list of matrices belong to This is the real Lie algebra of matrices which are skew-symmetric with respect to a skew-symmetric matrix $J$.  The default choice is .  Other forms for can be specified with the keyword argument skewform = $J$

Here is the standard form of the matrices for .

 > $\mathrm{C1}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[1,0,0,0\right],\left[0,0,0,0\right],\left[0,0,-1,0\right],\left[0,0,0,0\right]\right],\left[\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,-1,0\right]\right],\left[\left[0,0,0,0\right],\left[1,0,0,0\right],\left[0,0,0,-1\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,-1\right]\right],\left[\left[0,0,1,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,1\right],\left[0,0,1,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,1\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[1,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,1,0,0\right],\left[1,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,1,0,0\right]\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{C1},"sp\left(4, R\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.8)

Define a skew-symmetric matrix $J$.

 > $J≔\mathrm{Matrix}\left(\left[\left[0,-1,0,0\right],\left[1,0,0,0\right],\left[0,0,0,1\right],\left[0,0,-1,0\right]\right]\right)$

Here is the form of the matrices for with respect to $J.$



 > $\mathrm{C2}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[-1,0,0,0\right],\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,1,0\right],\left[0,0,0,0\right],\left[-1,0,0,0\right]\right],\left[\left[0,0,0,-1\right],\left[0,0,0,0\right],\left[0,1,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,1,0\right],\left[0,0,0,-1\right]\right],\left[\left[0,0,0,0\right],\left[1,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,1\right],\left[1,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,1\right],\left[0,0,0,0\right]\right],\left[\left[0,1,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,1,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,1,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,1,0\right]\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{C2},"sp\left(4, R\right)",\mathrm{skewform}=J,"MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.9)

Example 4.

Check that a list of matrices consists of  upper triangular matrices.

 > $\mathrm{D1}≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[1,0,0\right],\left[0,0,0\right],\left[0,0,0\right]\right],\left[\left[0,1,0\right],\left[0,0,0\right],\left[0,0,0\right]\right],\left[\left[0,0,1\right],\left[0,0,0\right],\left[0,0,0\right]\right],\left[\left[0,0,0\right],\left[0,1,0\right],\left[0,0,0\right]\right],\left[\left[0,0,0\right],\left[0,0,1\right],\left[0,0,0\right]\right],\left[\left[0,0,0\right],\left[0,0,0\right],\left[0,0,1\right]\right]\right]\right)$
 > $\mathrm{Query}\left(\mathrm{D1},"sol\left(3\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.10)

Example 5.

Check that a list of matrices consists of nilpotent matrices.

 alg > $E≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[-1,2,1,3\right],\left[-1,2,1,3\right],\left[1,-2,-1,-3\right],\left[0,0,0,0\right]\right],\left[\left[-1,3,2,4\right],\left[-1,2,1,2\right],\left[1,-4,-3,-6\right],\left[0,1,1,2\right]\right],\left[\left[0,1,1,0\right],\left[0,1,1,0\right],\left[0,-1,-1,0\right],\left[0,0,0,0\right]\right]\right]\right)$
 > $\mathrm{Query}\left(E,"nil\left(4\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.11)
 > $\mathrm{LieAlgebraData}\left(\mathrm{D1},\mathrm{NN}\right)$
 $\left[\left[{\mathrm{e1}}{,}{\mathrm{e2}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e2}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e4}}{,}{\mathrm{e5}}\right]{=}{\mathrm{e5}}{,}\left[{\mathrm{e5}}{,}{\mathrm{e6}}\right]{=}{\mathrm{e5}}\right]$ (2.12)

Example 6.

Check that the following matrices define a Lie algebra and that this representation is unitary.

 u3 > $F≔\mathrm{map}\left(\mathrm{Matrix},\left[\left[\left[0,0,0,0\right],\left[0,I,0,0\right],\left[0,0,-I,0\right],\left[0,0,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,0\right],\left[0,0,I,0\right],\left[0,0,0,-I\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,-1\right],\left[0,0,0,0\right],\left[0,1,0,0\right]\right],\left[\left[0,0,0,0\right],\left[0,0,0,I\right],\left[0,0,0,0\right],\left[0,I,0,0\right]\right]\right]\right)$
 u3 > $\mathrm{LD}≔\mathrm{LieAlgebraData}\left(F,\mathrm{alg}\right)$
 ${\mathrm{LD}}{:=}\left[\left[{\mathrm{e1}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e1}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e3}}\right]{=}{-}{\mathrm{e4}}{,}\left[{\mathrm{e2}}{,}{\mathrm{e4}}\right]{=}{\mathrm{e3}}{,}\left[{\mathrm{e3}}{,}{\mathrm{e4}}\right]{=}{-}{2}{}{\mathrm{e2}}{-}{2}{}{\mathrm{e1}}\right]$ (2.13)
 u3 > $\mathrm{DGsetup}\left(\mathrm{LD}\right)$
 ${\mathrm{Lie algebra: alg}}$ (2.14)
 u3 > $\mathrm{DGsetup}\left(\left[\mathrm{x1},\mathrm{x2},\mathrm{x3}\right],V\right)$
 ${\mathrm{frame name: V}}$ (2.15)
 alg > $\mathrm{\rho }≔\mathrm{Representation}\left(\mathrm{alg},V,F\right)$
 alg > $\mathrm{Query}\left(\mathrm{\rho },"u\left(4\right)","MatrixAlgebra"\right)$
 ${\mathrm{true}}$ (2.16)