<s>[INST] Linear Algebra Matrix and Inverse I have 4x4 matrices:
$$A\begin{bmatrix} 
3&1&3&-4\\
6&4&8&10\\
3&2&5&-1\\ 
-9&5&-2&-4
\end{bmatrix} = 
\begin{bmatrix}
0&1&0&0\\
0&0&0&1\\
0&0&1&0\\
1&0&0&0
\end{bmatrix}
$$
and 
$$\begin{bmatrix}
3&1&3&-4\\
6&4&8&10\\
3&2&5&-1\\
-9&5&-2&-4
\end{bmatrix}
B = \begin{bmatrix}
0&1&0&0\\
0&0&0&1\\
0&0&1&0\\
1&0&0&0
\end{bmatrix}$$
and I need to find $A^{-1}$ and $B^{-1}$.
Now, there's the long way of doing it (augmented matrix with identity on the right side and solving for A, then finding A inverse, B, then B inverse), but I thought this was too much work and there must be an efficient way of doing it.
I've noticed that the right side of the equation for both A[] and []B look like they are just another arrangement of identity matrix, which must provide some useful clue to this problem. 
I have a gut feeling that we must do something with elementary row matrices but don't have a concrete idea to get me started..
Can anyone give me some insight or introduce efficient way of solving this question? 
(Without determinant or long mechanical computation)
Thank you.
 [/INST] The right hand matrix is known as permutation matrix and its inverse is its transpose, i.e.
$$
P^{-1}=\begin{bmatrix}
0&1&0&0\\
0&0&0&1\\
0&0&1&0\\
1&0&0&0
\end{bmatrix}^T=\begin{bmatrix}
0&0&0&1\\
1&0&0&0\\
0&0&1&0\\
0&1&0&0
\end{bmatrix}=[e_2\: e_4\: e_3 \:e_1]=\begin{bmatrix}e_4'\\e_1'\\e_3'\\e_2'\end{bmatrix}
$$
where $e_i$ is elementary column vector and $e_i'$ is elementary row vector. Also $Ae_i$ is the $i$th column of $A$ and $e_i'A$ is the $i$th row of $A$.
So 
$$
A^{-1}=\begin{bmatrix} 
3&1&3&-4\\
6&4&8&10\\
3&2&5&-1\\ 
-9&5&-2&-4
\end{bmatrix}[e_2\: e_4\: e_3 \:e_1]=\begin{bmatrix} 
1&-4&3&3\\
4&10&8&6\\
2&-1&5&3\\ 
5&-4&-2&-9
\end{bmatrix}
$$
And
$$
B^{-1}=\begin{bmatrix}e_4'\\e_1'\\e_3'\\e_2'\end{bmatrix}\begin{bmatrix}
3&1&3&-4\\
6&4&8&10\\
3&2&5&-1\\
-9&5&-2&-4
\end{bmatrix}=\begin{bmatrix}
-9&5&-2&-4\\
3&1&3&-4\\
3&2&5&-1\\
6&4&8&10
\end{bmatrix}
$$
</s>