Checking for invertibility of large matrices in MAGMA 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.)  
 A: 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.
A: I can guess that both the rank and the determinant are computed through some kind of (pivoted) LU factorization.
If so, in order to compute the determinant, after computing the LU factorization, you have to take the product of the factors on the diagonal of U, so it is not surprising that it takes more time than computing the rank: there are indeed more operations to do.
A: There are different parameters for the Determinant command when working over the integers. You should take a look at the online documentation:
http://magma.maths.usyd.edu.au/magma/handbook/text/243
It's quite comprehensive.
