Rank of float matrix

asked 2018-05-23 07:05:02 -0500

Ludo gravatar image

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 flag offensive close merge delete

Comments

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.

dan_fulea gravatar imagedan_fulea ( 2018-05-23 11:10:21 -0500 )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.

nbruin gravatar imagenbruin ( 2018-05-23 11:19:03 -0500 )edit
1
vdelecroix gravatar imagevdelecroix ( 2018-05-23 16:21:49 -0500 )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)

Ludo gravatar imageLudo ( 2018-05-24 14:15:49 -0500 )edit