# Elements of $M_n$ as Homomorphisms

The matrix algebra $M_n(S)$ may also be viewed as the module ${\operatorname{Hom}}(S^{(n)}, S^{(n)})$. At present this will not happen automatically so that in order to treat elements of $M_n(S)$ as homomorphisms, it is necessary to explicitly coerce the matrix into ${\operatorname{Hom}}(S^{(n)}, S^{(n)})$. However, two fundamental homomorphism-type operators are provided for elements of $M_n(S)$.

## `Image(a): AlgMatElt -> ModTup`

## `RowSpace(a): AlgMatElt -> ModTup`

Given an element of $M_n(S)$, return the image of the module $S^{(n)}$ under the homomorphism represented by the matrix $a$ (as an element of $S^{(n)}$).

## `Kernel(a): AlgMatElt -> ModTup`

## `NullSpace(a): AlgMatElt -> ModTup`

```magma
Al: MonStgElt                    Default: "Default"
```

Given an element of $M_n(S)$, return the kernel of the homomorphism represented by the matrix $a$ (as an element of $S^{(n)}$).

## `RowNullSpace(a): AlgMatElt -> ModTup`

## `NullspaceOfTranspose(a): AlgMatVElt -> ModTupRng`

Given an element of $M_n(S)$, return the row nullspace of the homomorphism represented by the matrix $a$ (as an element of $S^{(n)}$). This is equal to the kernel of the transpose of $a$.

## `Restrict(a, V): AlgMatElt, ModTupRng -> AlgMatElt`

## `Restrict(a, V): AlgMatElt, ModTupFld -> AlgMatElt`

If $V \simeq S^{(m)}$ is a free submodule of $S^{(n)}$ stable by an element $a$ of $M_n(S)$, returns the restriction of the homomorphism $a$ to the stable submodule $V$, as an element of $M_m(S)$.
