---
title: "Conjugacy"
canonical: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/FiniteSolubleGroups/elt-conjugacy.html"
source: "https://docs.magma-maths.org/v2.30-1/FiniteGroups/FiniteSolubleGroups/elt-conjugacy.md"
part: "Finite Groups"
chapter: "Finite Soluble Groups"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Finite Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/index-finite-groups.md"}
  - {"title": "Finite Soluble Groups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/FiniteSolubleGroups/index-finite-soluble-groups.md"}
prev: {"title": "Elements", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/FiniteSolubleGroups/elements.md"}
next: {"title": "Subgroups", "source": "https://docs.magma-maths.org/v2.30-1/FiniteGroups/FiniteSolubleGroups/subgroups.md"}
intrinsics:
  - {"name": "Class", "signature": "Class(H, g): GrpPC, GrpPCElt -> { GrpPCElt}"}
  - {"name": "Conjugates", "signature": "Conjugates(H, g): GrpPC, GrpPCElt -> { GrpPCElt}"}
  - {"name": "^", "signature": "g ^ H: GrpPCElt, GrpPC -> { GrpPCElt}"}
  - {"name": "ConjugacyClasses", "signature": "ConjugacyClasses(G): GrpPC -> [ <RngIntElt, RngIntElt, GrpPCElt> ]"}
  - {"name": "Classes", "signature": "Classes(G): GrpPC -> [ <RngIntElt, RngIntElt, GrpPCElt> ]"}
  - {"name": "ClassMap", "signature": "ClassMap(G): GrpPC -> Map"}
  - {"name": "ClassRepresentative", "signature": "ClassRepresentative(G, x): GrpPC, GrpPCElt -> GrpPCElt"}
  - {"name": "ClassRepresentative", "signature": "ClassRepresentative(G, i): GrpPC, RngIntElt -> GrpPCElt"}
  - {"name": "ClassCentraliser", "signature": "ClassCentraliser(G, i): GrpPC, RngIntElt -> GrpPCElt"}
  - {"name": "ClassCentralizer", "signature": "ClassCentralizer(G, i): GrpPC, RngIntElt -> GrpPCElt"}
  - {"name": "IsConjugate", "signature": "IsConjugate(G, g, h): GrpPC, GrpPCElt, GrpPCElt -> BoolElt, GrpPCElt"}
  - {"name": "NumberOfClasses", "signature": "NumberOfClasses(G): GrpPC -> RngIntElt"}
  - {"name": "Nclasses", "signature": "Nclasses(G): GrpPC -> RngIntElt"}
  - {"name": "PowerMap", "signature": "PowerMap(G): GrpPC -> Map"}
examples:
  - "ex-bdfb19"
---

# Conjugacy

<a id="function-class-grppc-grppcelt"></a>
## `Class(H, g): GrpPC, GrpPCElt -> { GrpPCElt}`

<a id="function-conjugates-grppc-grppcelt"></a>
## `Conjugates(H, g): GrpPC, GrpPCElt -> { GrpPCElt}`

<a id="operation-op-pow-grppcelt-grppc"></a>
## `g ^ H: GrpPCElt, GrpPC -> { GrpPCElt}`

Given a group $H$ and an element $g$ belonging to a group $K$ such that $H$ and $K$ are subgroups of some covering group, this function returns the set of conjugates of $g$ under the action of $H$. If $H = K$, the function returns the conjugacy class of $g$ in $H$.

<a id="function-conjugacyclasses-grppc"></a>
## `ConjugacyClasses(G): GrpPC -> [ <RngIntElt, RngIntElt, GrpPCElt> ]`

<a id="function-classes-grppc"></a>
## `Classes(G): GrpPC -> [ <RngIntElt, RngIntElt, GrpPCElt> ]`

Construct a set of representatives for the conjugacy classes of $G$. The classes are returned as a sequence of tuples containing the order of the elements in the class, the class length, and a representative element for the class. For non-$p$-groups, the classes are computed using the homomorphism principle down a series with elementary abelian factors and orbit-stabilizer in each quotient. See [[MN89](https://docs.magma-maths.org/v2.30-1/references.md#cite-mecky-neubuser)] for details. For $p$-groups an algorithm based on linear algebra developed by Charles Leedham-Green is used.

<a id="function-classmap-grppc"></a>
## `ClassMap(G): GrpPC -> Map`

The class map $M\colon G \rightarrow \{1, \ldots, n\}$ for the group $G$, where $n$ is the number of conjugacy classes of $G$.

<a id="function-classrepresentative-grppc-grppcelt"></a>
## `ClassRepresentative(G, x): GrpPC, GrpPCElt -> GrpPCElt`

<a id="function-classrepresentative-grppc-rngintelt"></a>
## `ClassRepresentative(G, i): GrpPC, RngIntElt -> GrpPCElt`

The designated representative for the conjugacy class of $G$ containing the element $x$ (relative to existing conjugacy classes) or the stored representative for conjugacy class $i$.

<a id="function-classcentraliser-grppc-rngintelt"></a>
## `ClassCentraliser(G, i): GrpPC, RngIntElt -> GrpPCElt`

<a id="function-classcentralizer-grppc-rngintelt"></a>
## `ClassCentralizer(G, i): GrpPC, RngIntElt -> GrpPCElt`

The centralizer in $G$ of the designated representative for conjugacy class $i$ of $G$.

<a id="function-isconjugate-grppc-grppcelt-grppcelt-2"></a>
## `IsConjugate(G, g, h): GrpPC, GrpPCElt, GrpPCElt -> BoolElt, GrpPCElt`

Given a group $G$ and elements $g$ and $h$ belonging to $G$, return the value true if $g$ and $h$ are conjugate in $G$. The function also returns a second value in the event that the elements are conjugate: an element $z$ which conjugates $g$ into $h$.

<a id="function-numberofclasses-grppc"></a>
## `NumberOfClasses(G): GrpPC -> RngIntElt`

<a id="function-nclasses-grppc"></a>
## `Nclasses(G): GrpPC -> RngIntElt`

The number of conjugacy classes of elements of the group $G$.

<a id="function-powermap-grppc"></a>
## `PowerMap(G): GrpPC -> Map`

The power map $M\colon \{1 \ldots n\}\times {\mathbb{Z}}\rightarrow \{1 \ldots n\}$ associated with the conjugacy classes of $G$. The map $M$ describes where the elements of the conjugacy classes of $G$ move under powers. That is, $<c$, $n>$@$M$ returns the class number where class $c$ moves under the power $n$. The value of $c$ must be in the range [$1\ldots$`Nclasses(G)`].

<a id="example-ex-bdfb19"></a>
## `Example: Conjugacy Classes of SL(2, 3) (ex-bdfb19)`

Let $G$ be a pc-representation of SL(2,3). We can compute the conjugacy classes of $G$. Notice that the conjugacy class object has a special printing routine, but you can still access individual entries.

```magma
> G := PCGroup(SpecialLinearGroup(2,GF(3)));
> G;
GrpPC : G of order 24 = 2^3 * 3
PC-Relations:
    G.1^3 = Id(G),
    G.2^2 = G.4,
    G.3^2 = G.4,
    G.4^2 = Id(G),
    G.2^G.1 = G.3 * G.4,
    G.3^G.1 = G.2 * G.3 * G.4,
    G.3^G.2 = G.3 * G.4
> Nclasses(G);
7
> cc := Classes(G);
> cc;
Conjugacy Classes of group G
----------------------------
[1]     Order 1       Length 1
        Rep Id(G)

[2]     Order 2       Length 1
        Rep G.4

[3]     Order 3       Length 4
        Rep G.1

[4]     Order 3       Length 4
        Rep G.1^2

[5]     Order 4       Length 6
        Rep G.2

[6]     Order 6       Length 4
        Rep G.1 * G.4

[7]     Order 6       Length 4
        Rep G.1^2 * G.4


> cc[3];
<3, 4, G.1>
> x := cc[3][3];
> Class(G,x);
{ G.1 * G.2 * G.3 * G.4, G.1 * G.2 * G.4, G.1, G.1 * G.3 }
7
>
```

We can use the `ClassMap` function to compute class multiplication constants (structure constants for the center of the group algebra). For example, we compute the decomposition of class 3 times class 5.

```magma
> cm := ClassMap(G);
> cm(G.1);
3
> i := 3; j := 5;
> t := [0: c in cc];
> for x in Class(G,cc[i][3]), y in Class(G,cc[j][3]) do
>   t[cm(x*y)] +:= 1;
> end for;
> t;
[ 0, 0, 12, 0, 0, 12, 0 ]
```

To get the actual structure constants, we need to divide each entry in `t` by the corresponding class size.

```magma
> [ t[i]/cc[i][2]: i in [1..#t] ];
[ 0, 0, 3, 0, 0, 3, 0 ]
```
