Odd or even permutation with matrices I know that the number of transpositions would determine the parity of a permutation like:
A = (1,2,3,4,5) = (1,5),(1,4),(1,3),(1,2) = even
But how would that apply to a matrix?
Example:

1  2  3  4  5  6  7  8
4  2  1  6  5  8  7  3

How would I then transpose these?
 A: Make comparison with each column. 
1.Starting from the first column, you have $1\rightarrow4$.
2.Then seek which column top has $4$, which is the fourth column and you have $4\rightarrow6$, etc...
3.Eventually you have $(14683)$ for the first cycle. 
4.Then check if any other element left in this cycle. Take one if you have and repeat the previous progress.
A: You are asking how to determine the parity of a permutation if it is written in Cauchy's two-line notation, right?
There are several methods. You can write the permutation, $\sigma$, in cycle notation, lets say $\sigma=(a_1,a_2\ldots,a_{r_1})(b_1,b_2\ldots,b_{r_2})\ldots (c_1,c_2\ldots,c_{r_k})$. Then the parity of $\sigma$ is the parity of $(r_1+1)+(r_2+1)+\ldots+(r_k+1)\in\mathbb N$.
Or, if the permutation is $\sigma=\begin{pmatrix}
1&2&\ldots&n\\
s_1&s_2&\ldots&s_n
\end{pmatrix}$, 
then the parity of $\sigma$ is the parity of $\sum_{i=1}^{n-1}\operatorname{card}(L_{s_i})$ where $L_{s_i}$ are the sets 
$$
L_{s_i}=\{s_j:j=i+1,i+2,\ldots,n, \ s_i<s_1\}.
$$
In your example $\sigma=\begin{pmatrix}
1&2&3&4&5&6&7&8\\
4&2&1&6&5&8&7&3
\end{pmatrix}$ and $L_{4}=\{2,1,3\},\ 
L_2=\{1\}, \ L_1=\emptyset, \ L_6=\{5,3\}, \ L_5=\{3\}, \ L_8=\{7,3\}, \ L_7=\{3\}$. Therefore $\sigma$ is even.
