Page 1 of 1

Checking for invertibility of large matrices in MAGMA

Posted: Wed Sep 12, 2018 4:08 am
by Daniel_Wilson
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.)

Re: Checking for invertibility of large matrices in MAGMA

Posted: Wed Sep 12, 2018 9:33 am
by mgates3
It's unclear if you are using the MAGMA GPU linear algebra library (this forum), or the MAGMA computational algebra software (http://magma.maths.usyd.edu.au/magma/).

In any case, it's usually a bad idea to compute determinants. Computing the rank is a more reliable way to tell if a matrix is (numerically) non-singular. Or do an LU factorization and check whether U has a zero on the diagonal. (Incidentally, the product of the diagonal of U is a reasonable way to compute the determinant of the original matrix A.)

-mark

Re: Checking for invertibility of large matrices in MAGMA

Posted: Thu Sep 13, 2018 2:11 am
by Daniel_Wilson
okay got it sir. thankss for the reply.

Re: Checking for invertibility of large matrices in MAGMA

Posted: Thu Oct 18, 2018 12:48 pm
by mgates3
Correction: the determinant also requires checking whether the permutation P in ipiv is odd or even. If odd, det(P) = -1, if even, det(P) = +1.
det( A ) = det( P ) * prod( diag( U ) )
But just to check for invertibility, you only need to check that diag( U ) is all non-zero.
-mark