The Magma Handbook

The Magma Handbook#

Magma logo Magma logo

Magma is a computer algebra system for computations in algebra, number theory, algebraic geometry, and combinatorics. This handbook documents the functions, data types, and algorithms available in the system.


The Magma Language

Syntax, types, control flow, procedures, functions and the Magma programming model.

The Magma Language
Sets, Sequences & Mappings

Fundamental aggregate types: sets, multisets, sequences, tuples and mappings.

Sets, Sequences and Mappings
Basic Rings

Integers, rationals, finite fields, residue class rings and polynomial rings.

Basic Rings
Matrices & Linear Algebra

Matrix construction, arithmetic, decompositions and solving linear systems.

Matrices and Linear Algebra
Lattices & Quadratic Forms

Integral lattices, quadratic forms, reduction algorithms and enumeration.

Lattices and Quadratic Forms
Global Fields

Number fields and function fields: rings of integers, ideals, class groups and units.

Global Fields
Local Fields

p-adic fields and formal power series: completions, extensions and Newton polygons.

Local Fields
Finite Groups

Permutation groups, matrix groups and generic finite groups with structural algorithms.

Finite Groups
Finitely Presented Groups

Groups given by generators and relations, coset enumeration and rewriting systems.

Finitely Presented Groups
Representation Theory

Characters, modules over group algebras, and ordinary and modular representations.

Representation Theory
Lie Theory

Lie algebras, root systems, Coxeter groups and Chevalley groups.

Lie Theory
Modules

Modules over rings, free and finitely generated modules, and homological constructions.

Modules
Algebras

Associative and non-associative algebras, quaternion algebras and crossed products.

Algebras
Commutative Algebra

Ideals in polynomial rings, Gröbner bases, primary decomposition and schemes.

Commutative Algebra
Algebraic Geometry

Schemes, varieties, divisors and sheaves over general fields.

Algebraic Geometry
Arithmetic Geometry

Elliptic and hyperelliptic curves, Jacobians, rational points and descent.

Arithmetic Geometry
Modular Arithmetic Geometry

Modular forms, modular curves and related L-functions.

Modular Arithmetic Geometry
Topology

Simplicial complexes, homology groups and topological invariants.

Topology
Geometry

Projective and affine geometry, polytopes and incidence structures.

Geometry
Combinatorics

Graphs, designs, permutation groups on sets and combinatorial enumeration.

Combinatorics
Coding Theory

Linear codes, decoding algorithms and bounds on minimum distance.

Coding Theory
Cryptography

Cryptographic primitives and number-theoretic cryptographic algorithms.

Cryptography
Optimization

Integer programming, lattice problems and optimization over algebraic structures.

Optimization