---
title: "Introduction"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/introduction.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/introduction.md"
part: "Algebras"
chapter: "Matrix 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": "Matrix Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/index-matrix-algebras.md"}
prev: {"title": "Matrix Algebras", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/index-matrix-algebras.md"}
next: {"title": "Construction of Matrix Algebras and their Elements", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/creation.md"}
---

# Introduction

Matrix algebras (or matrix rings) may be defined over any ring $S$. We shall regard such a matrix algebra as an $S$*-algebra*. Let us denote the complete algebra of $n\times n$ matrices over $S$ by $M_n(S)$. It will often be convenient to regard $M_n(S)$ as the endomorphism ring of the free $S$-module $S^{(n)}$. We will then speak of $S^{(n)}$ as the natural $S$-module associated with $M_n(S)$.

Matrix algebras have type `AlgMat` and their elements have type `AlgMatElt`. These types inherit from `AlgMatV` and `AlgMatVElt` respectively (which cover both ordinary matrix algebras and matrix Lie algebras).
