Am 06.06.2022 um 17:29 schrieb Cottrell, Allin:
Is there any general characterization of what it takes for plain QR
not to reveal rank?
It would appear that the presence of all-zero rows and/or columns is
necessary but not sufficient. With m > n you can construct mostly-zero
matrices where diag(R) does give the right answer. E.g.
My general answer is: I don't know. There seems to be an elaborate
literature on this, and I haven't dealt with it in the past. However,
I'm kind of skeptical that there are easy rules, because otherwise they
would be expected to become part of the algorithms.
BTW, it is my (current) understanding that also the QR decomp with
pivoting is not as "safe" as SVD, so there seems to be a tradeoff as
well. But I guess this is always true with numerics.
What might be useful is to check out the database of singular matrices
at San Jose State U. (It's astounding what things exist in science!)
They also have a number of fully dense matrices, i.e. 100% non-zeros,
see here:
http://www.math.sjsu.edu/singular/matrices/html/list_by_nnz_percent_desce...
So I guess it would be interesting to run all those matrices through
your simple QR diag check and see what that yields.
thanks
sven