QR-like factorization preserving type?

I think an improved version of function rrqr() would be useful.

  1. Rank revealing QR is superior to standard QR since it gives information about the conditioning of the system. And with a good implementation, it should be faster than SVD.
  2. Educationally, I think RRQR is useful in that it serves to clarify concepts such as column space (range) and null space (kernel).
  3. By relaxing on the requirement that Q should be orthonormal, it is possible to do exact computations. This is useful in quite a few applications.
  4. Most likely, using Rational numbers requires BigInt for larger systems than academic examples. But the idea of rank revealing QR is worthwhile also when using Floats.

If anyone is interested in my code, let me know. It is not huge in any way – a few tens of lines, so I can include it here somewhere. However, it needs improvement in many areas (efficiency, memory allocation, handling types better, better names for variables and functions, etc.). I used the Gram-Schmidt procedure; it would be interesting to check if something similar/better can be achieved with Givens rotation, etc. I’m not good at code optimization – I even struggle with finding errors (huge thanks to the people behind VS code, Julia extension with debugger – it is not perfect, but to me, it represents a milestone).

1 Like