If you have a number of large matrices, and you wish to determine whether each matrix has determinant zero or not, what is the most efficient way to do this in MAGMA


(it appears that calculating the rank is slightly more efficient than calculating the determinant).


\*\*EDIT: \*\*In case it helps, the matrix entries are rational functions in two commuting variables, which come from the coefficients of a power series in a third, noncommuting variable: the aim is to get some sort of indication of when a power series represents a rational function, which requires checking the determinant of progressively larger matrices until it starts being zero. (Although the overall setting is noncommutative, everything in the matrices themselves is commutative so there's no need to worry about left/right determinants, quasi-determinants, etc.) 



Checking for invertibility of large matrices in MAGMA
I don't know about Magma specifically, but in general, computing the determinant modulo a bunch of primes is the way to go (bunch = enough small primes so that their product exceeds the Hadamard bound, but of course, once the determinant is nonzero modulo some prime, you can safely halt).


**EDIT** Just a remark: the above is particularly fast for checking that your matrices are NOT singular, since if the determinant is really zero, you will have to do a lot more checking to be sure. On the other hand, computing the rank will ALWAYS be much slower than this.


