As a small example, suppose I have the following list of $3 \times 3$ matrices:
matlist = {{{-1, -1, 0}, {0, 0, 1}, {0, 1, 1}}, {{-(1/3), -1, -(4/3)}, {2/3,
0, -(1/3)}, {2/3, 1, -(1/3)}}, {{0, -1, -1}, {0, 0, 1}, {1, 1,
0}}, {{-(2/3), -1, -1}, {-(2/3), 0, 1}, {1/3, 1, 0}}, {{-1, -1,
0}, {0, 1, 1}, {0, 0, 1}}, {{-(1/3), -1, -(4/3)}, {2/3,
1, -(1/3)}, {2/3, 0, -(1/3)}}, {{0, -1, -1}, {1, 1, 0}, {0, 0,
1}}, {{-(2/3), -1, -1}, {1/3, 1, 0}, {-(2/3), 0, 1}}, {{-(1/3), -1,
0}, {2/3, 0, -1}, {2/3, 1, 1}}, {{-1, -1, 0}, {0, 0, -1}, {0, 1,
1}}, {{-(2/3), -1, 1/3}, {-(2/3), 0, 1/3}, {1/3, 1, 4/
3}}, {{0, -1, -1}, {0, 0, -1}, {1, 1, 0}}, {{-(1/3), -1, 0}, {2/3,
1, 1}, {2/3, 0, -1}}, {{-1, -1, 0}, {0, 1, 1}, {0, 0, -1}}}
Now I want to define matrices as equivalent (in the same class) to one another if they have the same rows (but allowing for the rows to be interchanged) or some rows are multiplied by -1 (again allowing rows to be interchanged).
In the above list the first and third matrices would be considered equivalent:
$\left( \begin{array}{ccc} -1 & -1 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 1 \\ \end{array} \right)$
and
$\left( \begin{array}{ccc} 0 & -1 & -1 \\ 0 & 0 & 1 \\ 1 & 1 & 0 \\ \end{array} \right)$
Here the first and third rows have been interchanged and each has been multiplied by -1. (second row is unchanged)
A further example would be the 5th matrix
$\left( \begin{array}{ccc} -1 & -1 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \\ \end{array} \right)$
which is the first matrix with the last two rows interchanged.
Similarly the second and sixth matrices are equivalent but are a new matrix equivalence class from the prior mentioned examples.
What I want to do is take a list of matrices, matlist in my example above, and kick out one example for each equivalence class of a matrix found in the list. Or at least separate the list into sublists of matrices of the same equivalence class.
I can code this in some messy use of loops but I think I can use a function like GatherBy though I am unsure how to go about this.
Any help would be much appreciated.