# Rank of float matrix

I want to compute the "numerical" rank of 9*18 FLOAT matrix A_float that i know is a good approximation of a REAL matrix A_real.

Is there any method to do that ?

More precisely, i want to know if A_real is of rank at most 8, so i compute all the minors of A_float which happen to be all less (in absolute value) than 10^-32, so i conclude that A_real has good chance to be of rank at most 8.

Is there is any method better than computing the 3 000 000 9*9 minors of A_float (which takes a few minutes) but i want to run this computation over a few thousand of differents A_float.

edit retag close merge delete

Use for instance Gauss elimination, the choice of the pivots (at each step they should have maximal absolute value, for instance) is major to avoid numerical difficulties when minors are "near zero". Sage and many other programs already do the job in a good manner.

( 2018-05-23 18:10:21 +0200 )edit
1

@dan_fuela: no, it does NOT by default. You'll have to go dig for an LU decomposition routine. Floating point linear algebra, even with matrices that are a "good" approximations, is tricky. Depending on what you want to do, a QR decomposition may be better.

( 2018-05-23 18:19:03 +0200 )edit
1
( 2018-05-23 23:21:49 +0200 )edit

@nbruin: I just want to compute dimension of the kernel, i don't want to compute the equation of the kernel. I haven't try the QR tech. I've try the following. I ask Sage to compute the singular value of A_float by asking Sage to compute the eigenvalue of the matrix A.transpose()*A. I've declare that a float less than 10^-10 is zero, and a float bigger than 0.01 is really no zero. And so,i can compute the rank by counting the eigenvalue which are bigger than 0.01. In practice, it work well. But, i wonder if Sage can't compute the singular value in a more efficient way. I've find than if my numbers where in RDF then just A_float.SVD() would do the job, but my float are in RR with 212 bits of precision, so i don't ...(more)

( 2018-05-24 21:15:49 +0200 )edit