---
title: "Quiver and Relations"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/quiver.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/quiver.md"
part: "Algebras"
chapter: "Basic Algebras"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/index-algebras.md"}
  - {"title": "Basic Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/index-basic-algebras.md"}
prev: {"title": "Automorphisms and Isomorphisms", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/automorphism.md"}
next: {"title": "Modules over Basic Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/BasicAlgebras/modules.md"}
intrinsics:
  - {"name": "Quiver", "signature": "Quiver(A): AlgBas -> SeqEnum"}
  - {"name": "QuiverAndRelations", "signature": "QuiverAndRelations(A): AlgBas -> SeqEnum, SeqEnum, SeqEnum"}
examples:
  - "ex-3af24d"
---

# Quiver and Relations

<a id="function-quiver-algbas"></a>
## `Quiver(A): AlgBas -> SeqEnum`

For a basic algebra $A$, this intrinsic returns the quiver of $A$. The quiver is returned as a sequence of integer pairs where each pair represents an arrow. The first integer of a pair is the index of the source and the second is the index of the target of the arrow.

<a id="function-quiverandrelations-algbas"></a>
## `QuiverAndRelations(A): AlgBas -> SeqEnum, SeqEnum, SeqEnum`

For a basic algebra $A$, this intrinsic returns the quiver of $A$ and associated relations. The first return value is the quiver where each arrow is given as a pair consisting of the index of the source and the index of the target of the arrow. The second return value is a sequence containing relations on the quiver. The third return value is a sequence containing a condensed sequence of relations that does not contain the obvious relations of degree two where the head of the first arrow does not match the tail of the second.

<a id="example-ex-3af24d"></a>
## `Example: Quiver of the Principal Block of A7 (ex-3af24d)`

In this example we construct the quiver and relations for the basic algebra of the principal block of the alternating group $A_7$ over $GF(2)$.

```magma
> G := AlternatingGroup(7);
> A := BasicAlgebraOfPrincipalBlock(G, GF(2));
> A;
Basic algebra of dimension 19 over GF(2)
Number of projective modules: 3
Number of generators: 8
> quiv, rels, crels := QuiverAndRelations(A);
> quiv;
[ <1, 2>, <1, 3>, <2, 1>, <2, 2>, <3, 1> ]
> rels;

[
    $.1*$.3*$.2*$.5 + $.2*$.5*$.1*$.3,
    $.3*$.2*$.5*$.1 + $.4^2,
    $.1*$.4,
    $.3*$.1 + $.4^2,
    $.4*$.3,
    $.5*$.2,
    $.1^2,
    $.2*$.1,
    $.4*$.1,
    $.1*$.2,
    $.2^2,
    $.4*$.2,
    $.2*$.3,
    $.3^2,
    $.5*$.3,
    $.2*$.4,
    $.3*$.4,
    $.5*$.4,
    $.1*$.5,
    $.3*$.5,
    $.4*$.5,
    $.5^2
]

> crels;

[
    $.1*$.3*$.2*$.5 + $.2*$.5*$.1*$.3,
    $.3*$.2*$.5*$.1 + $.4^2,
    $.1*$.4,
    $.3*$.1 + $.4^2,
    $.4*$.3,
    $.5*$.2
]
```
