On Mon, Jun 6, 2022 at 12:13 PM Sven Schreiber <svetosch(a)gmx.net> wrote:
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.
OK, thanks.
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!)
I'll take a look.
Meanwhile (in git), you can now call QR with pivoting, the trigger
being a non-null third (matrix-pointer) argument. That gets you the
ordering of the columns of the input, which can be compared with
seq(1,n) to see if anything has moved. This is available for complex
matrices too.
R = {}
P = {}
Q = qrdecomp(A, &R, &P)
Allin