---
title: "Operations on Matrix Algebras"
canonical: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/operation.html"
source: "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/operation.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": "The Construction of Extensions and their Elements", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/extension.md"}
next: {"title": "Changing Rings", "source": "https://docs.magma-maths.org/v2.30-1/Algebras/MatrixAlgebras/change-ring.md"}
intrinsics:
  - {"name": "Centre", "signature": "Centre(A): AlgMat -> AlgMat"}
  - {"name": "Centralizer", "signature": "Centralizer(A, S): AlgMat, AlgMat -> AlgMat"}
  - {"name": "Centraliser", "signature": "Centraliser(A, S): AlgMat, AlgMat -> AlgMat"}
---

# Operations on Matrix Algebras

<a id="function-centre-algmat"></a>
## `Centre(A): AlgMat -> AlgMat`

Given a matrix algebra $A$ whose base ring is a field, return the centre of $A$.

<a id="function-centralizer-algmat-algmat"></a>
## `Centralizer(A, S): AlgMat, AlgMat -> AlgMat`

<a id="function-centraliser-algmat-algmat"></a>
## `Centraliser(A, S): AlgMat, AlgMat -> AlgMat`

Given a matrix algebra $A$ whose base ring is a field, together with a subalgebra $S$ of $A$ return the centralizer of $S$ in $A$.
