---
title: "Roots, Coroots, and Reflections"
canonical: "https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/action.html"
source: "https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/action.md"
part: "Lie Theory"
chapter: "Reflection Groups"
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": "Reflection Groups", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/index-reflection-groups.md"}
prev: {"title": "Properties of Reflection Groups", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/properties.md"}
next: {"title": "Related Structures", "source": "https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/related.md"}
intrinsics:
  - {"name": "RootSpace", "signature": "RootSpace(W): GrpMat -> Lat"}
  - {"name": "CorootSpace", "signature": "CorootSpace(W): GrpMat -> Lat"}
  - {"name": "SimpleOrders", "signature": "SimpleOrders(W): GrpMat -> [RngIntElt]"}
  - {"name": "SimpleRoots", "signature": "SimpleRoots(W): GrpMat -> Mtrx"}
  - {"name": "SimpleCoroots", "signature": "SimpleCoroots(W): GrpMat -> Mtrx"}
  - {"name": "NumberOfPositiveRoots", "signature": "NumberOfPositiveRoots(W): GrpMat -> RngIntElt"}
  - {"name": "NumPosRoots", "signature": "NumPosRoots(W): GrpMat -> RngIntElt"}
  - {"name": "Roots", "signature": "Roots(W): GrpMat -> SetIndx"}
  - {"name": "Coroots", "signature": "Coroots(W): GrpMat -> SetIndx"}
  - {"name": "PositiveRoots", "signature": "PositiveRoots(W): GrpMat -> SetIndx"}
  - {"name": "PositiveCoroots", "signature": "PositiveCoroots(W): GrpMat -> SetIndx"}
  - {"name": "Root", "signature": "Root(W, r): GrpMat, RngIntElt -> SetIndx"}
  - {"name": "Coroot", "signature": "Coroot(W, r): GrpMat, RngIntElt -> SetIndx"}
  - {"name": "RootPosition", "signature": "RootPosition(W, v): GrpMat, . -> SetIndx"}
  - {"name": "CorootPosition", "signature": "CorootPosition(W, v): GrpMat, . -> SetIndx"}
  - {"name": "ReflectionMatrices", "signature": "ReflectionMatrices(W): GrpMat -> [AlgMatElt]"}
  - {"name": "CoreflectionMatrices", "signature": "CoreflectionMatrices(W): GrpMat -> [AlgMatElt]"}
  - {"name": "SimpleReflectionMatrices", "signature": "SimpleReflectionMatrices(W): GrpMat -> [AlgMatElt]"}
  - {"name": "SimpleCoreflectionMatrices", "signature": "SimpleCoreflectionMatrices(W): GrpMat -> [AlgMatElt]"}
  - {"name": "ReflectionMatrix", "signature": "ReflectionMatrix(W, r): GrpMat, RngIntElt -> AlgMatElt"}
  - {"name": "CoreflectionMatrix", "signature": "CoreflectionMatrix(W, r): GrpMat, RngIntElt -> []"}
  - {"name": "SimpleReflectionPermutations", "signature": "SimpleReflectionPermutations(W): GrpMat -> []"}
  - {"name": "ReflectionPermutations", "signature": "ReflectionPermutations(W): GrpMat -> []"}
  - {"name": "ReflectionPermutation", "signature": "ReflectionPermutation(W, r): GrpMat, RngIntElt -> []"}
  - {"name": "ReflectionWords", "signature": "ReflectionWords(W): GrpMat -> []"}
  - {"name": "ReflectionWord", "signature": "ReflectionWord(W, r): GrpMat, RngIntElt -> []"}
  - {"name": "Length", "signature": "Length(w): GrpMatElt -> RngIntElt"}
  - {"name": "CoxeterLength", "signature": "CoxeterLength(w): GrpMatElt -> RngIntElt"}
  - {"name": "WeightLattice", "signature": "WeightLattice(W): GrpMat -> Lat"}
  - {"name": "CoweightLattice", "signature": "CoweightLattice(W): GrpMat -> Lat"}
  - {"name": "FundamentalWeights", "signature": "FundamentalWeights(W): GrpMat -> Mtrx"}
  - {"name": "FundamentalCoweights", "signature": "FundamentalCoweights(W): GrpMat -> Mtrx"}
  - {"name": "IsDominant", "signature": "IsDominant(R, v): RootDtm, . -> ModTupFldElt, GrpFPCoxElt"}
  - {"name": "DominantWeight", "signature": "DominantWeight(W, v): GrpMat, . -> ModTupFldElt, GrpFPCoxElt"}
  - {"name": "WeightOrbit", "signature": "WeightOrbit(W, v): GrpMat, . -> {@ ModTupFldElt @}, [GrpFPCoxElt]"}
examples:
  - "ex-16412e"
  - "ex-194100"
  - "ex-a49ddd"
  - "ex-843e25"
  - "ex-a17dda"
---

<a id="action"></a>
<a id="sectgrpfpcoxaction"></a>
# Roots, Coroots, and Reflections

Many of these functions have an optional argument `Basis` which may take one of the following values

1. `"Standard"`: the standard basis for the (co)root space. This is the default.
2. `"Root"`: the basis of simple (co)roots.
3. `"Weight"`: the basis of fundamental (co)weights (see Subsection [Weights](https://docs.magma-maths.org/v2.30-1/LieTheory/ReflectionGroups/action.md#subsectgrprflrootweight) below).

## Accessing Roots and Coroots

<a id="function-rootspace-grpmat"></a>
### `RootSpace(W): GrpMat -> Lat`

<a id="function-corootspace-grpmat"></a>
### `CorootSpace(W): GrpMat -> Lat`

The base space of the reflection group $W$. If $W$ is not a reflection group, an error occurs.

<a id="example-ex-16412e"></a>
### `Example: Root Space of a Complex Reflection Group (ex-16412e)`

```magma
> W := ComplexReflectionGroup("M", 3);
> RootSpace(W);
Full Vector space of degree 3 over Cyclotomic Field of order 24 and degree 8
```

<a id="function-simpleorders-grpmat"></a>
### `SimpleOrders(W): GrpMat -> [RngIntElt]`

The sequence of simple orders of the reflection group $W$. If $W$ is not a reflection group, an error is flagged.

<a id="function-simpleroots-grpmat"></a>
### `SimpleRoots(W): GrpMat -> Mtrx`

<a id="function-simplecoroots-grpmat"></a>
### `SimpleCoroots(W): GrpMat -> Mtrx`

The simple (co)roots of the reflection group $W$ as the rows of a matrix, i.e. $A$ (resp. $B$).

<a id="function-numberofpositiveroots-grpmat"></a>
### `NumberOfPositiveRoots(W): GrpMat -> RngIntElt`

<a id="function-numposroots-grpmat"></a>
### `NumPosRoots(W): GrpMat -> RngIntElt`

The number of positive roots of the real reflection group $W$. This is also the number of positive coroots. The total number of (co)roots is twice the number of positive (co)roots. This number is finite if and only if $W$ is finite.

<a id="function-roots-grpmat"></a>
### `Roots(W): GrpMat -> SetIndx`

<a id="function-coroots-grpmat"></a>
### `Coroots(W): GrpMat -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The indexed set of (co)roots of the real reflection group $W$, i.e. $\{@\,\alpha_1,\dots\alpha_{2N}\,@\}$ (resp. $\{@\,\alpha_1^\star,\dots\alpha_{2N}^\star\,@\}$). If $W$ is infinite, an error is flagged.

<a id="function-positiveroots-grpmat"></a>
### `PositiveRoots(W): GrpMat -> SetIndx`

<a id="function-positivecoroots-grpmat"></a>
### `PositiveCoroots(W): GrpMat -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The indexed set of positive (co)roots of the real reflection group $W$, that is, $\{@\,\alpha_1,\dots\alpha_N\,@\}$ (resp. $\{@\,\alpha_1^\star,\dots\alpha_N^\star\,@\}$). If $W$ is infinite, an error is flagged.

<a id="function-root-grpmat-rngintelt"></a>
### `Root(W, r): GrpMat, RngIntElt -> SetIndx`

<a id="function-coroot-grpmat-rngintelt"></a>
### `Coroot(W, r): GrpMat, RngIntElt -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The $r$th (co)root $\alpha_r$ (resp. $\alpha_r^\star$) of the real reflection group $W$. If $W$ is infinite, an error is flagged.

<a id="function-rootposition-grpmat"></a>
### `RootPosition(W, v): GrpMat, . -> SetIndx`

<a id="function-corootposition-grpmat"></a>
### `CorootPosition(W, v): GrpMat, . -> SetIndx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

If $v$ is a (co)root in the finite real reflection group $W$, return its index; otherwise return 0. These functions will try to coerce $v$ into the appropriate lattice; $v$ should be written with respect to the basis specified by the parameter `Basis`. If $W$ is infinite, an error is flagged.

<a id="example-ex-194100"></a>
### `Example: Roots and Coroots of a Reflection Group (ex-194100)`

```magma
> W := ReflectionGroup("A3");
> Roots(W);
{@
    (1 0 0),
    (0 1 0),
    (0 0 1),
    (1 1 0),
    (0 1 1),
    (1 1 1),
    (-1  0  0),
    (0 -1  0),
    (0  0 -1),
    (-1 -1  0),
    (0 -1 -1),
    (-1 -1 -1)
@}
> PositiveCoroots(W);
{@
    (2 -1  0),
    (-1  2 -1),
    (0 -1  2),
    (1  1 -1),
    (-1  1  1),
    (1 0 1)
@}
> #Roots(W) eq 2*NumPosRoots(W);
true
> Root(W, 4);
(1 1 0)
> Root(W, 4 : Basis := "Root");
(1 1 0)
> RootPosition(W, [1,1,0]);
4
> A := Matrix(3,3,[1,0,0, -1,-1,-3, 1,2,4]);
> B := Matrix(3,3,[2,-1,0, -1,2,-1, 0,1,0]);
> W := ReflectionGroup(A,B);
> Roots(W);
{@
    (1 0 0),
    (-1 -1 -3),
    (1 2 4),
    (0 -1 -3),
    (0 1 1),
    (1 1 1),
    (-1  0  0),
    (1 1 3),
    (-1 -2 -4),
    (0 1 3),
    (0 -1 -1),
    (-1 -1 -1)
@}
> PositiveCoroots(W);
{@
    (2 -1  0),
    (-1  2 -1),
    (0 1 0),
    (1  1 -1),
    (-1  3 -1),
    (1  2 -1)
@}
> #Roots(W) eq 2*NumPosRoots(W);
true
> Root(W, 4);
(0 -1 -3)
> Root(W, 4 : Basis := "Root");
(1 1 0)
> RootPosition(W, [0,-1,-3]);
4
```

## Reflections

The root $\alpha$ acts on the root space via the reflection $s_\alpha$; the coroot $\alpha^\star$ acts on the coroot space via the coreflection $s_\alpha^\star$.

<a id="function-reflectionmatrices-grpmat"></a>
### `ReflectionMatrices(W): GrpMat -> [AlgMatElt]`

<a id="function-coreflectionmatrices-grpmat"></a>
### `CoreflectionMatrices(W): GrpMat -> [AlgMatElt]`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The sequence of reflections in the finite real reflection group $W$. The $r$th reflection in the sequence corresponds to the $r$th (co)root.

<a id="function-simplereflectionmatrices-grpmat"></a>
### `SimpleReflectionMatrices(W): GrpMat -> [AlgMatElt]`

<a id="function-simplecoreflectionmatrices-grpmat"></a>
### `SimpleCoreflectionMatrices(W): GrpMat -> [AlgMatElt]`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The matrices giving the action of the simple (co)roots on the (co)root space of the finite real reflection group $W$.

<a id="function-reflectionmatrix-grpmat-rngintelt"></a>
### `ReflectionMatrix(W, r): GrpMat, RngIntElt -> AlgMatElt`

<a id="function-coreflectionmatrix-grpmat-rngintelt"></a>
### `CoreflectionMatrix(W, r): GrpMat, RngIntElt -> []`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The reflection in finite real reflection group $W$ corresponding to the $r$th (co)root. If $r=1,\dots,n$, this is a generator of $W$.

<a id="function-simplereflectionpermutations-grpmat"></a>
### `SimpleReflectionPermutations(W): GrpMat -> []`

The sequence of permutations giving the action of the simple (co)roots of the finite reflection group $W$ on the (co)roots. This action is the same for roots and coroots.

<a id="function-reflectionpermutations-grpmat"></a>
### `ReflectionPermutations(W): GrpMat -> []`

The sequence of permutations giving the action of the (co)roots of the finite reflection group $W$ on the (co)roots. This action is the same for roots and coroots.

<a id="function-reflectionpermutation-grpmat-rngintelt"></a>
### `ReflectionPermutation(W, r): GrpMat, RngIntElt -> []`

The permutation giving the action of the $r$th (co)root of the finite reflection group $W$ on the (co)roots. This action is the same for roots and coroots.

<a id="function-reflectionwords-grpmat"></a>
### `ReflectionWords(W): GrpMat -> []`

The sequence of words in the simple reflections for all the reflections of the real reflection group $W$. These words are given as sequences of integers. In other words, if $a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWords(W)[r]}$, then $s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}$.

<a id="function-reflectionword-grpmat-rngintelt"></a>
### `ReflectionWord(W, r): GrpMat, RngIntElt -> []`

The word in the simple reflections for the $r$th reflection of the real reflection group $W$. The word is given as a sequence of integers. In other words, if $a = [a_1,\dots,a_l] = \hbox{\tt ReflectionWord(W,r)}$, then $s_{\alpha_r} = s_{\alpha_{a_1}} \cdots s_{\alpha_{a_l}}$.

<a id="example-ex-a49ddd"></a>
### `Example: Reflection Matrices and Permutations (ex-a49ddd)`

```magma
> Q := RationalField();
> W := ReflectionGroup("A3");
> mx := ReflectionMatrix(W, 4);
> perm := ReflectionPermutation(W, 4);
> RootPosition(W, Vector(Q, Eltseq(Root(W,2))) * mx) eq 2^perm;
true
> mx := CoreflectionMatrix(W, 4);
> CorootPosition(W, Coroot(W,2) * mx) eq 2^perm;
true
```

<a id="function-length-grpmatelt"></a>
### `Length(w): GrpMatElt -> RngIntElt`

<a id="function-coxeterlength-grpmatelt"></a>
### `CoxeterLength(w): GrpMatElt -> RngIntElt`

The length of $w$ as an element of the Coxeter group $W$, i.e. the number of positive roots of $W$ which become negative under the action of $w$.

<a id="subsectgrprflrootweight"></a>
<a id="id1"></a>
## Weights

<a id="function-weightlattice-grpmat"></a>
### `WeightLattice(W): GrpMat -> Lat`

<a id="function-coweightlattice-grpmat"></a>
### `CoweightLattice(W): GrpMat -> Lat`

The (co)weight lattice of the real reflection group $W$. The roots and coroots of $W$ must have integral components.

<a id="function-fundamentalweights-grpmat"></a>
### `FundamentalWeights(W): GrpMat -> Mtrx`

<a id="function-fundamentalcoweights-grpmat"></a>
### `FundamentalCoweights(W): GrpMat -> Mtrx`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The fundamental weights of the real reflection group $W$ given as the rows of a matrix. The roots and coroots of $W$ must have integral components.

<a id="example-ex-843e25"></a>
### `Example: Weight Lattice of a Reflection Group (ex-843e25)`

```magma
> W := ReflectionGroup("E6");
> WeightLattice(W);
Lattice of rank 6 and degree 6
Basis:
(4  3  5  6  4  2)
(3  6  6  9  6  3)
(5  6 10 12  8  4)
(6  9 12 18 12  6)
(4  6  8 12 10  5)
(2  3  4  6  5  4)
Basis Denominator: 3
> FundamentalWeights(W);
[ 4/3    1  5/3    2  4/3  2/3]
[   1    2    2    3    2    1]
[ 5/3    2 10/3    4  8/3  4/3]
[   2    3    4    6    4    2]
[ 4/3    2  8/3    4 10/3  5/3]
[ 2/3    1  4/3    2  5/3  4/3]
```

<a id="function-isdominant-rootdtm"></a>
### `IsDominant(R, v): RootDtm, . -> ModTupFldElt, GrpFPCoxElt`

```magma
Basis: MonStgElt                    Default: "Standard"
```

Returns `true` if and only if $v$ is a dominant weight for the root datum $R$, ie, a nonnegative integral linear combination of the fundamental weights.

<a id="function-dominantweight-grpmat"></a>
### `DominantWeight(W, v): GrpMat, . -> ModTupFldElt, GrpFPCoxElt`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The unique dominant weight in the same $W$-orbit as $v$, where $W$ is a real reflection group and $v$ is a weight given as a vector or a sequence representing a vector. The second value returned is a Coxeter group element taking $v$ to the dominant weight.

<a id="function-weightorbit-grpmat"></a>
### `WeightOrbit(W, v): GrpMat, . -> {@ ModTupFldElt @}, [GrpFPCoxElt]`

```magma
Basis: MonStgElt                    Default: "Standard"
```

The $W$-orbit of $v$ as an indexed set, where $W$ is a real reflection group and $v$ is a weight given as a vector or a sequence representing a vector. The first element in the orbit is always dominant. The second value returned is a sequence of Coxeter group words taking the weight $v$ to the corresponding element of the orbit.

<a id="example-ex-a17dda"></a>
### `Example: Dominant Weights and Weight Orbits (ex-a17dda)`

```magma
> W := CoxeterGroup("B3");
> DominantWeight(W, [1,-1,0] : Basis:="Weight");
(1 0 0)
$.2 * $.3 * $.2 * $.1
> #WeightOrbit(W, [1,-1,0] : Basis:="Weight");
6
```
