---
title: "Bimodules"
canonical: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/bimodules.html"
source: "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/bimodules.md"
part: "Representation Theory"
chapter: "Modules over an Algebra and Group Representations"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Representation Theory", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/index-representation-theory.md"}
  - {"title": "Modules over an Algebra and Group Representations", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/index-modules-over-an-algebra-and-group-representations.md"}
prev: {"title": "Vertex and Source of an Indecomposable Module", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/vertex-source.md"}
next: {"title": "Enumerating All Irreducible Modules", "source": "https://docs.magma-maths.org/v2.30-1/RepresentationTheory/ModulesOverAnAlgebraAndGroupRepresentations/construct-irreds.md"}
intrinsics:
  - {"name": "Bimodule", "signature": "Bimodule(M, N): ModGrp, ModGrp -> LRModGrp"}
  - {"name": "Bimodule", "signature": "Bimodule(G, H, M): Grp, Grp, ModGrp -> LRModGrp"}
  - {"name": "LeftBimodule", "signature": "LeftBimodule(M): ModGrp -> LRModGrp"}
  - {"name": "RightBimodule", "signature": "RightBimodule(M): ModGrp -> LRModGrp"}
  - {"name": "LeftOppositeModule", "signature": "LeftOppositeModule(B): LRModGrp -> ModGrp"}
  - {"name": "RightModule", "signature": "RightModule(B): LRModGrp -> ModGrp"}
  - {"name": "PermutationBimodule", "signature": "PermutationBimodule(G, H, m, K): Grp, Grp, Map, Fld -> LRModGrp"}
  - {"name": "TensorProduct", "signature": "TensorProduct(B1, B2): LRModGrp, LRModGrp -> LRModGrp"}
examples:
  - "ex-31c812"
  - "ex-5e5954"
  - "ex-022d8f"
  - "ex-791051"
  - "ex-f17ecc"
---

# Bimodules

## Introduction

For a field $K$ and groups $G$ and $H$, a $(KG,\ KH)$-bimodule is a vector space over $K$ equipped with a left $G$-action and a right $H$-action.

In the Magma implementation, $(KG,KH)$-bimodules are regarded as being equivalent to standard right $K(G \times H)$-modules, where

- the right action of $H$ in the bimodule is the same as the right action of $H$ in the equivalent $K(G \times H)$-module; and
- the left action of $G$ in the bimodule is related to the right action of $G$ in the equivalent $K(G \times H)$-module by $g^{-1}*v = v*g$ for all $g \in G$ and $v$ in the common underlying $K$-vector space.

Most of the functionality for standard right $KG$-modules, such as forming sub- and quotient modules, defining homomorphisms, etc, should also work for $(KG,KH)$-modules, where results are calculated using the equivalent $K(G \times H)$-module. But note that there is no requirement for the groups $G$ and $H$ to have the same type.

## Construction

<a id="function-bimodule-modgrp-modgrp"></a>
### `Bimodule(M, N): ModGrp, ModGrp -> LRModGrp`

Inputs $M$ and $N$ should be $KG$- and $KH$-modules of the same dimension, such that the actions of $G$ and $H$ commute; i.e. $(v * g) * h = (v * h) * g$ for all $g \in G$, $h \in H$, and $v$ in the common underlying $K$-vector space $V$ of $M$ and $N$. An error will result if this condition is not satisfied.

The corresponding bimodule is returned in which $g^{-1} * v = v * g$ for all $g \in G$ and $v \in V$.

<a id="example-ex-31c812"></a>
### `Example: Bimodule from Sym(3) and a Cyclic Group (ex-31c812)`

```magma
> G:=Sym(3);
> H:=CyclicGroup(2);
> M:=PermutationModule(G,GF(3));
> S:=ScalarMatrix(3, GF(3)!2);
> N:=GModule(H,[S]);
> B:=Bimodule(M,N);
> B;
Bimodule B of dimension 3 over GF(3)
> M.1 * G.1;
M: (0 1 0)
> G.1^-1 * B.1;
B: (0 1 0)
> GHom(B,B);
KMatrixSpace of 3 by 3 matrices and dimension 2 over GF(3)
> #Submodules(B);
4
```

It is often more convenient to construct a bimodule directly from the equivalent $K(G~\times~H)$-module.

<a id="function-bimodule-grp-grp-modgrp"></a>
### `Bimodule(G, H, M): Grp, Grp, ModGrp -> LRModGrp`

Inputs $G$ and $H$ should be groups, and $M$ should be a $(G \times H)$-module. The equivalent $(KG,KH)$-bimodule is constructed.

<a id="example-ex-5e5954"></a>
### `Example: Bimodule from a Direct Product (ex-5e5954)`

```magma
> X := DirectProduct(Sym(4), Alt(5));
> I := IrreducibleModules(X, GF(3));
> M12 := I[9];
> M12;
GModule M12 of dimension 12 over GF(3)
> B := Bimodule(Sym(4), Alt(5), M12);
> B;
Bimodule B of dimension 12 over GF(3)
> IsIrreducible(B);
true
```

<a id="function-leftbimodule-modgrp"></a>
### `LeftBimodule(M): ModGrp -> LRModGrp`

$M$ should be a $KG$-module. The corresponding $(KG,KT)$-bimodule is returned in which $T$ is the trivial group and $g^{-1} * v = v * g$ for all $g \in G$ and $v \in V$.

<a id="function-rightbimodule-modgrp"></a>
### `RightBimodule(M): ModGrp -> LRModGrp`

$M$ should be a $KH$-module. The corresponding $(KT,KH)$-bimodule is returned in which $T$ is the trivial group.

## Extracting the Left and Right Modules From a Bimodule

<a id="function-leftoppositemodule-lrmodgrp"></a>
### `LeftOppositeModule(B): LRModGrp -> ModGrp`

Extract the equivalent right $KG$-module $M$ from the $(KG,KH)$-bimodule $B$, where $g^{-1} * v = v * g$ for $g \in G$, and $v$ in the common $K$-vector space $V$ of $B$ and $M$.

<a id="function-rightmodule-lrmodgrp"></a>
### `RightModule(B): LRModGrp -> ModGrp`

Extract the equivalent right $KH$-module $M$ from the $(KG,KH)$-bimodule $B$.

<a id="example-ex-022d8f"></a>
### `Example: Left and Right Modules of a Bimodule (ex-022d8f)`

We continue with the previous example, and check the property $g^{-1} * v = v * g$ for all $g \in G$ and $v \in V$.

```magma
> ML := LeftOppositeModule(B);
> ML;
GModule ML of dimension 12 over GF(3)
> G := Group(ML);
> G;
Symmetric group G acting on a set of cardinality 4
Order = 24 = 2^3 * 3
    (1, 2, 3, 4)
    (1, 2)
> V := VectorSpace(B);
> forall{<i,j> : i in [1..2], j in [1..12] |
>                                V!(G.i^-1*B.j) eq V!(ML.j*G.i)};
true
```

## Permutation Bimodules

<a id="function-permutationbimodule-grp-grp-map-fld"></a>
### `PermutationBimodule(G, H, m, K): Grp, Grp, Map, Fld -> LRModGrp`

The last argument $K$ should be a field, $G$ and $H$ should be groups, and $m$ should be a homomorphism from a subgroup $A$ of $G$ to $H$.

Let $Y$ be the subgroup $\{ (a,m(a)) : a \in A\}$ of $G \times H$, and let $M$ be the $K(G \times H)$-permutation module defined by the image of the action of $G \times H$ on the right cosets of $Y$. The $(KG,KH)$-bimodule corresponding to $M$ is returned.

<a id="example-ex-791051"></a>
### `Example: Permutation Bimodules (ex-791051)`

```magma
> G := Sym(3);
> H := CyclicGroup(6);
> PG := Sylow(G,3);
> PH := Sylow(H,3);
> m := hom<PG -> PH | [PH.1] >;
> K := GF(3);
> B := PermutationBimodule(G,H,m,K);
> B;
Bimodule B of dimension 12 over GF(3)
> GHom(B,B);
KMatrixSpace of 12 by 12 matrices and dimension 8 over GF(3)
```

## Tensor Products of Bimodules

<a id="function-tensorproduct-lrmodgrp-lrmodgrp"></a>
### `TensorProduct(B1, B2): LRModGrp, LRModGrp -> LRModGrp`

The arguments $B_1$ and $B_2$ are, respectively, $(KG,KH)$- and $(KH,KJ)$-bimodules for the groups $G,H,J$. The $(KG,KJ)$-bimodule $B_1 \otimes_{KH} B_2$ is returned.

<a id="example-ex-f17ecc"></a>
### `Example: Induced Modules via Tensor Products (ex-f17ecc)`

Let $H$ be a subgroup of a group $G$, and $M$ be a right $KH$-module. Then $M \otimes_{KH} KG$ is (by definition) equal to the induced module $M^G$.

This is not a sensible way to construct induced modules in practice, but we can use it as an example of the use of the tensor product of bimodules. We regard $M$ as a $(KT,KH)$-bimodule, where $T$ is the trivial group, and $KH$ as a $(KH,KG)$-bimodule.

```magma
>  G := Sym(5);
>  H := Stabiliser(G,5);
>  K := GF(5);
>  M := IrreducibleModules(H,K)[4];
>  M;
GModule M of dimension 3 over GF(5)
>  B1 := RightBimodule(M);
>  //make KG as right G-module
>  eG := [ g: g in G ];
>  mats := [];
>  for i in [1..Ngens(G)] do
>    perm := Sym(#G)![Position(eG, g*G.i) : g in eG ];
>    Append(~mats, PermutationMatrix(K,perm));
>  end for;
>  RM := GModule(G,mats);
>  //and as left H-module
>  mats := [];
>  for i in [1..Ngens(H)] do
>    perm := Sym(#G)![Position(eG, H.i*g) : g in eG ];
>    Append(~mats, PermutationMatrix(K,perm)^-1);
>  end for;
>  LM := GModule(H,mats);
>  B2 := Bimodule(LM,RM);
>  T := TensorProduct(B1,B2);
>  T;
Bimodule T of dimension 15 over GF(5)
>  IsIsomorphic(RightModule(T), Induction(M,G));
true
```
