# Introduction

Algebras are viewed as free modules over a ring $R$ with an additional multiplication. There are no a priori conditions imposed on the ring except that it must be unital, but some functions may require that an echelonization algorithm is available for modules over $R$ and sometimes it is also required that $R$ is a field. For example, quotients of algebras can only be constructed over fields, since otherwise the quotient module is not necessarily a free module over $R$.

The most general way to define an algebra is by structure constants, but for special types of algebras Magma uses more efficient representations.

## The Categories of Algebras

At present, Magma contains seven main categories of algebras:

**(1)**
General algebras represented by structure constants: category `AlgGen`;

**(2)**
Associative algebras represented by structure constants: category `AlgAss`;

**(3)**
Quaternion algebras as special types of associative algebras; category `AlgQuat`;

**(4)**
Lie algebras represented by structure constants: category `AlgLie`;

**(5)**
Group algebras: category `AlgGrp` with a special type `AlgGrpSub` for subalgebras of group algebras;

**(6)**
Matrix algebras: category `AlgMat`;

**(7)**
Finitely presented algebras: category `AlgFP`.

The hierarchy of these categories is such that `AlgGen` is on the top level and `AlgAss` and `AlgLie` are on the next level inheriting the functions available for `AlgGen`. The categories `AlgQuat`, `AlgGrp` and `AlgMat` are on a third level inheriting the functions available for `AlgAss`. Finitely presented algebras are independent of the other categories.
