---
title: "Generalized Cartan Matrices"
canonical: "https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/cartan.html"
source: "https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/cartan.md"
part: "Lie Theory"
chapter: "Kac-Moody Lie Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Lie Theory", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/index-lie-theory.md"}
  - {"title": "Kac-Moody Lie Algebras", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/index-kac-moody-lie-algebras.md"}
prev: {"title": "Introduction", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/introduction.md"}
next: {"title": "Affine Kac–Moody Lie Algebras", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/affine.md"}
intrinsics:
  - {"name": "IsGeneralizedCartanMatrix", "signature": "IsGeneralizedCartanMatrix(C): AlgMatElt -> BoolElt"}
  - {"name": "KacMoodyClass", "signature": "KacMoodyClass(C): AlgMatElt -> MonStgElt, ModMatRngElt"}
  - {"name": "KacMoodyClasses", "signature": "KacMoodyClasses(C): AlgMatElt -> SeqEnum, SeqEnum, SeqEnum"}
examples:
  - "ex-89fcf7"
---

<a id="cartan"></a>
<a id="sectalgliekmcartan"></a>
# Generalized Cartan Matrices

<a id="function-isgeneralizedcartanmatrix-algmatelt"></a>
## `IsGeneralizedCartanMatrix(C): AlgMatElt -> BoolElt`

Whether the square matrix $C$ is a generalized Cartan matrix.

<a id="function-kacmoodyclass"></a>
## `KacMoodyClass(C): AlgMatElt -> MonStgElt, ModMatRngElt`

The class of the indecomposable generalized Cartan matrix $C$. The first return value is a string, “a”, “b”, or “c”, corresponding to the three cases described in the introduction [Introduction](https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/introduction.md#sectalgliekmintro). The second is a positive integral column vector $v$ such that $Cv$ is positive, 0, or negative, respectively (so this return value corresponds to the vectors $\theta$, $\delta$, and $\alpha$ in the introduction).

<a id="function-kacmoodyclasses-algmatelt"></a>
## `KacMoodyClasses(C): AlgMatElt -> SeqEnum, SeqEnum, SeqEnum`

The class of the possibly decomposable generalized Cartan matrix $C$. Three sequences are returned: the first is a sequence of strings “a”, “b”, or “c”, describing the class of each component; the second is a positive integral vector $v$ such that $Cv$ is positive, 0, or negative, respectively (see [`KacMoodyClass`](https://docs.magma-maths.org/v2.30-1/LieTheory/KacMoodyLieAlgebras/cartan.md#function-kacmoodyclass)).

The third sequence $Q$ contains integral sequences $Q_i$ such that the $i$-th component is formed by taking the rows and columns with index $j$, for $j \in Q_i$.

<a id="example-ex-89fcf7"></a>
## `Example: Classifying Generalized Cartan Matrices (ex-89fcf7)`

First, we consider an indecomposable Cartan matrix.

```magma
> C := Matrix(Integers(), 3, 3, [2,-1,0, -5,2,-1, 0,-1,2]);
> s, v := KacMoodyClass(C);
> s;
c
> v;
[2]
[5]
[1]
> C*v;
[-1]
[-1]
[-3]
```

As a second example, we consider a decomposable Cartan matrix.

```magma
> C := CartanMatrix("B2 A~3");
> S, V, Q := KacMoodyClasses(C);
> S;
[ a, b ]
> Q;
[
    [ 1, 2 ],
    [ 3, 4, 5, 6 ]
]
> C1 := Submatrix(C, Q[1], Q[1]);
> KacMoodyClass(C1);
a
> C2 := Submatrix(C, Q[2], Q[2]);
> KacMoodyClass(C2);
b
```
