[Math] how to find inverse of a matrix in $\Bbb Z_5$

abstract-algebrainverselinear algebramatrices

how to find inverse of a matrix in $\Bbb Z_5$
please help me explicitly how to find the inverse of matrix below, what I was thinking that to find inverses separately of the each term in $\Bbb Z_5$ and then form the matrix?

$$\begin{pmatrix}1&2&0\\0&2&4\\0&0&3\end{pmatrix}$$

Thank you.

Best Answer

Perhaps the easiest way here (though not the easiest way in general) is to write $$A^{-1} = \left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array}\right)$$ and then do the multiplication $A \cdot A^{-1} = I$. Some nice cancellation happens (which does not occur in general), and there is your inverse.

More generally speaking, you can always do row operations to find your matrix. You do need to be a bit careful since, say, division by $2$ is not defined, though multiplication by $3$ is defined. Row operations are permitted in general, though not every element in $\mathbb{Z}_n$ is invertible. Since $n = 5$ is prime, then $\mathbb{Z}_5$ is a field, and hence every nonzero unit is invertible.