TITLE: How to generalize symmetry for higher-dimensional arrays?
QUESTION [7 upvotes]: @BrianM.Scott 's answer to this question Q: 3-dimensional array  suggests that there is no standard concept of symmetry for 3-, 4-, N-dimensional arrays, in constrast to the case for 2-D arrays, as in linear algebra for matrices.  Are there alternative definitions of symmetry for higher-dimensional arrays?  Are there specific definitions that are widely used in certain contexts, e.g. in tensor calculus?
(I don't have a specific need; I'm trying to help implement a symmetry test for a matrix library [core.matrix for the Clojure language].  Since the library allows higher-dimensional arrays, there's a question about whether there is a natural choice for what the symmetry test should return for higher-dimensional arrays.)

REPLY [5 votes]: I would say an $N$-way array is symmetric if an element is the same if the indices is permuted, for all permutations.
So, an array $T$ with elements $t_{i_1, i_2, \dots, i_N}$ is symmetric if for all permutations $\sigma \in S_N$, where $S_N$ is the symmetric group on $\{1, 2, \dots, N\}$, we have 
$$t_{i_1, i_2, \dots, i_N} = t_{i_{\sigma 1}, i_{\sigma 2}, \dots, i_{\sigma N}}$$
for all elements $t_{i_1, i_2, \dots, i_N}$.
For $2 \times 2$ arrays this reduces to just swapping the two indices, leading to the equation $t_{i,j} = t_{j,i}$.
So, if we have a $2 \times 2 \times 2$ array $T$, we want the following equalities to hold:
$$
\begin{align}
t_{1,1,1} \\
t_{1,1,2} = t_{1,2,1} = t_{2,1,1} \\
t_{1,2,2} = t_{2,1,2} = t_{2,2,1} \\
t_{2,2,2}
\end{align}
$$