How many permutations are there in a 3x3 grid? I am trying to understand the symmetry relations of the Wigner 9$j$ symbol (Wikipedia). For this purpose, it is just a 3 by 3 array of distinct elements:
$$ \left\{\begin{array}{ccc} a & b & c\\d & e & f \\ g & h & i \end{array}\right\}, $$
where the symmetry operations are as follows:

*

*even permutation of rows (3)

*even permutation of columns (3)

*odd permutations of rows (includes an additional factor) (3)

*odd permutations of columns (includes an additional factor) (3)

*reflection about $a-e-i$ diagonal (2)

*reflection about $g-e-c$ diagonal (2)

In brackets, I wrote the number of symmetry operations that I understand from the description. Multiplying everything together, we get $3^4 2^2 = 324$ symmetry operations. However, there should only be 72.
Now I assume that some even/odd permutations of rows/columns might be equivalent to each other. I just cannot recognize which and how.

From the list of symmetry operations, how can we see that the Wigner 9$j$ symbol has 72 symmetry operations?

 A: Write our arrays as: $$\left(\begin{array}{ccc}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{array}\right)$$
Combining the 3 odd and 3 even permutations on rows we get 6 permutations which act on rows.  That is if $\sigma$ is a permutation on rows then it takes the array $a_{ij}$ to a new array $(a\sigma )_{ij}$ where: $$(a\sigma )_{ij}=a_{(\sigma i) j}.$$
Similarly if $\tau$ acts on columns then:$$(a\tau )_{ij}=a_{i(\tau j) }.$$
Permutations of rows commute with permutations of columns:\begin{eqnarray*}(a\sigma \tau)_{ij}=(a\sigma)_{i(\tau j)}=a_{(\sigma i) (\tau j)},\\
(a \tau\sigma)_{ij}=(a\tau)_{(\sigma i)j}=a_{(\sigma i) (\tau j)}.
\end{eqnarray*}
Thus if we perform a succession of these symmetries, we can move the row permutations to the left and column permutations to the right, to obtain a symmetry of the form $\sigma\tau$, where as before $\sigma$ is a permutation of rows and $\tau$ is a permutation of columns.
Thus they generate at most 36 symmetries (any of 6 permutations for $\tau$ and any of six permutations for $\sigma$).  To see that these 36 symmetries are all distinct, note that if $\sigma_1\tau_1=\sigma_2\tau_2$ then $\sigma_2^{-1}\sigma_1=\tau_2\tau_1^{-1}$ will be both a permutation of rows and a permutation of columns.  Thus $\sigma_2^{-1}\sigma_1=\tau_2\tau_1^{-1}=1$ as no permutation of rows can move entries in the array to a different column.
Thus we may write combinations of row and column permutations in the form $(\sigma,\tau)$ where $\sigma,\tau$ are permutations of the set $\{1,2,3\}$ and: $$(a(\sigma,\tau))_{ij}=a_{(\sigma i)(\tau j)}$$
Now we introduce $T$ which reflects about the $a_{11}-a_{22}-a_{33}$ diagonal: $$(aT)_{ij}=a_{ji}$$
Note that $T(\sigma,\tau)=(\tau,\sigma)T$:
\begin{eqnarray*}
(a(\sigma, \tau)T)_{ij}=(a(\sigma, \tau))_{ji}=a_{(\sigma j) (\tau i)},
\\
(a T(\tau,\sigma))_{ij}
=(aT)_{(\tau i) (\sigma j)}=a_{(\sigma j) (\tau i)}
.
\end{eqnarray*}
Thus again given a succession of row and column permutations and $T$'s, we may move the permutations to the left and the $T$'s to the right.  Finally note that $T^i=1 $ or $T$, so we have 72 symmetries: 36 of the form $(\sigma,\tau)$ and 36 of the form $(\sigma,\tau)T$.
$T$ is not a combination of row and column permutations, as they do not create new columns (or rows) whereas $T$ creates the new column:$$\left(\begin{array}{c}a_{11}\\a_{12}\\a_{13}\end{array}\right)$$
Thus we cannot have an equality $(\sigma_1,\tau_1)T=(\sigma_2,\tau_2)$, as then:$$T=(\sigma_1^{-1}\sigma_2,\tau_1^{-1}\tau_2),$$
which is impossible.  Thus these 72 symmetries are all distinct.
Finally note that reflection in the other diagonal is just $$((13),(13))T$$ where $(13)$ denotes swapping the numbers 1 and 3.  Thus we do indeed have 72 symmetries.
As a group the symmetries are isomorphic to a semi-direct product of the form $(S_3 \times S_3)\rtimes C_2$, which has order $|S_3|\times |S_3|\times|C_2|=72$ as expected.
