Matrix Multiplication in Z9 and Z101

Hey, I present to you two problems:

First one:

To find the Inverse of the matrix $\displaystyle A = \begin{matrix} 4 & 2\\7 & 4\end{matrix}$ in $\displaystyle \mathbb{Z}$9.

I have worked out the determinent which is equal to 12, but in $\displaystyle \mathbb{Z}$9 that is equal to 3.

I know I have to inverse the determinent in $\displaystyle \mathbb{Z}$9 but I am a little unsure about how to do that. But I'm stuck at the line:

$\displaystyle A.^-1 = \frac{1}{3}\begin{matrix} 4 & -2\\-7 & 4\end{matrix}$ in $\displaystyle \mathbb{Z}$9

Second one:

Given a matrix:

$\displaystyle M = \begin{matrix} 6 & 31 \\ 37 & 95\end{matrix}$ in $\displaystyle \mathbb{Z}$101. work out $\displaystyle M^2$ and find $\displaystyle M^{2*m*n}$ where m = 34 and n = 84.

I have worked out $\displaystyle M^2$ but I'm not sure how to proceed with the other part, I think I must use Euler's formula, but that specifies for two numbers pq that are prime, clearly 34 and 84 are not.

Regards