When calculating the inverse of a normal matrix, for for example, you would simply use .
However, if your matrix was in , the inverse would be:
Ok up to here, just forgotten how to calculate
Thanks in advance
For finding an arbitrary modular inverse (if it exists), there is an algorithm using the extended Euclidean algorithm, described here. Also, if you choose the method involving direct exponentiation using Euler's theorem, there are algorithms for fast modular exponentiation, one of which is described in this thread, posts #5 and #7.