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).