Magma's algebra and representation-theory machinery spans about a dozen chapters of the Handbook. This is a survey — a map of what exists and when you'd reach for it — rather than a tour of individual intrinsics. The goal is to help you recognize which category or chapter is relevant to a problem, not to memorize signatures.
The Algebra Hierarchy
At the top sits the generic notion: an algebra is a free module over a ring R equipped with a bilinear multiplication. Magma's most general category is AlgGen, covering algebras given by structure constants (chapter AlgGen / AlgCon): you specify a basis $e_1, \ldots, e_n$ and the products $e_i * e_j$ as elements of $R^n$, and Magma builds the multiplication table from there.
> A := Algebra<Rationals(), 2 | [1,0, 0,1, 0,1, -1,0]>;
Most useful structural theory, however, needs more than "some multiplication" — it needs associativity. AlgAss (chapter AlgAss) is the associative specialization of structure-constant algebras, and it is the base type from which several richer categories inherit: quaternion algebras (AlgQuat), group algebras (AlgGrp), and matrix algebras (AlgMat) are all, structurally, associative algebras with extra representation-specific machinery layered on top. AlgFP (finitely presented algebras) sits alongside these as quotients of a free associative algebra by an ideal of relations, computed via noncommutative Gröbner bases — the noncommutative analogue of commutative Gröbner basis theory.
Matrix, Basic, and Quaternion Algebras
AlgMat (chapter AlgMat) represents the complete algebra $M_n(S)$ of $n \times n$ matrices over a ring $S$, or any subalgebra of it, and is often the most computationally convenient representation of an associative algebra since arithmetic is just matrix arithmetic.
> A := MatrixAlgebra(Rationals(), 3);
AlgBas (chapter AlgBas) captures basic algebras: finite-dimensional algebras over a field whose simple modules all have dimension one. Every finite-dimensional algebra is Morita equivalent to a basic algebra (after a possible field extension), and Magma's AlgBas type is specifically optimized for homological computations — projective indecomposables, radicals, and simple modules built from idempotent generators.
AlgQuat (chapter AlgQuat) specializes further to quaternion algebras: four-dimensional central simple algebras generated by $i, j$ with $i^2 = a$, $j^2 = b$, $ji = -ij$. These arise constantly in number theory (division rings, ramification at places of a number field) and Magma can recognize when a general associative algebra happens to be a quaternion algebra and normalize it to standard $a,b$ form.
Algebras with Extra Structure
A few chapters describe algebras carrying additional geometric or combinatorial structure rather than just a product. AlgInv, the "algebras with involution" (StarAlgebras) package, studies $$-algebras — algebras with an anti-automorphism $x \mapsto x^$ of order at most 2 — whose main application is computing isometry groups of systems of reflexive forms and intersections of classical groups. AlgClff builds the Clifford algebra of a quadratic form $Q$ on a vector space $V$: the associative algebra generated by $V$ subject to $v^2 = Q(v)$, universal among algebras satisfying that relation, with dimension $2^n$ for an $n$-dimensional $V$. AlgNAss steps outside associativity altogether, using Magma's multilinear-algebra ("exceptional tensor") machinery to construct composition algebras and octonion algebras via the Cayley-Dickson doubling construction — the natural home for non-associative structures like octonions.
> C := OctonionAlgebra(Rationals(), 1, 1, 1);
Representation Theory: Modules and Group Algebras
Representation theory in Magma is organized around the idea that a representation of an algebra $A$ is just an $A$-module. AlgGrp (chapter AlgGrp, "Group Algebras") constructs the group ring $R[G]$ for a group $G$ over a ring $R$ — the bridge between group theory and algebra. ModAlg (chapter ModAlg, "Modules over an Algebra and Group Representations") then develops the general theory of $A$-modules: when $A = K[G]$, $A$-modules are exactly group representations, and every finite-dimensional $A$-module affords a matrix representation of $A$.
> KG := GroupAlgebra(GF(2), G);
> M := GModule(G, MatrixAlgebra(GF(2), 3));
Character Theory and Symmetric Groups
Chtr (chapter AlgChtr, "Characters of Finite Groups") works with the ring of class functions on a finite group $G$ — complex-valued (in practice, cyclotomic-valued) functions constant on conjugacy classes. CharacterTable(G) computes the full table of irreducible characters, and the resulting AlgChtr ring supports the usual operations of induction, restriction, and inner products used to decompose representations.
RepSym (chapter RepSym) specializes to the symmetric and alternating groups, where irreducible (ordinary, non-modular) representations are indexed by partitions. Magma can construct integral representing matrices via SymmetricRepresentation, compute full character tables by combinatorial methods specific to $S_n$, and evaluate a single irreducible character at a group element without building the whole table.
Beyond the Classical Setting
Two further chapters push representation theory into more specialized or ongoing-research territory. ModRed ("Group Representations") is a newer package (introduced 2025) modeling representations of possibly infinite groups on free modules of finite rank — left $R[G]$-modules for general groups and rings — with an eye toward algebraic modular forms, especially for orthogonal and unitary groups. pAdicGalois addresses mod-$p$ Galois representations: it works with $\varphi$-modules over $k((u))$ for a finite field $k$, computing semisimplifications of such modules and of the associated Galois representations of the absolute Galois group of a $p$-adic field — connecting Magma's representation theory to arithmetic geometry via the Brauer-Nesbitt theorem.
Orienting Yourself
As a rule of thumb: reach for AlgAss/AlgAss-derived types (AlgMat, AlgQuat, AlgGrp) when you have concrete associative multiplication; reach for ModAlg/Chtr/RepSym when the question is about how a group acts on a vector space rather than about the algebra itself; and treat AlgInv, AlgClff, AlgNAss, ModRed, and pAdicGalois as specialized packages for particular structures (forms, quadratic spaces, non-associative algebras, infinite groups, and Galois representations respectively) that sit alongside — rather than beneath — the main hierarchy.