Checking the order of a matrix group

Introduction

We are given a set S={g1,g2,,gn}S=\{g_1, g_2,\ldots,g_n\} of m×mm\times m-matrices which generate a faithful mm-dimensional representation DD of a finite group G. Our goals are:

Assuming that the order of GG is not too large, we can solve both problems by explicitly computing all elements of GG in the defining representation DD. The number of found elements is the order of the group. DD is irreducible if and only if gG|TrD(g)|2=ordG.\sum_{g\in G}|\mathrm{Tr}\,D(g)|^2=\mathrm{ord}\,G.

Specification for computationally solving the problem

Module complex numbers

We assume that there is a data structure which can store a real number (or a floating point approximation to it). If the programming language does not provide complex numbers:

Module matrices

If programming the language does not provide matrices:

Main Program

Call of main program on an example