Without loss of generality, we can work with 2-dimensional matrices.
The Abelian group of order 3 has these elements:
In[429]:= A3 = {IdentityMatrix[2], RotationMatrix[2 \[Pi]/3],
RotationMatrix[4 \[Pi]/3]}
Out[429]= {{{1, 0}, {0, 1}}, {{-(1/2), -(Sqrt[3]/2)}, {Sqrt[3]/
2, -(1/2)}}, {{-(1/2), Sqrt[3]/2}, {-(Sqrt[3]/2), -(1/2)}}}
We can define a function to compute the order of a group element by iterating over matrix multiplication:
In[430]:= groupElementOrder[m_?MatrixQ] :=
Module[{n = 1, e = IdentityMatrix[Length[m]]},
NestWhile[(n++; Dot[#, m]) &, m, # != e &]; n]
NestWhile
does the iteration, and terminates when the matrix product equals the identity matrix. Now, we can test it on the group A3:
In[431]:= groupElementOrder /@ A3
Out[431]= {1, 3, 3}