I am refactoring an existing algorithm where where a RQ decomposition (as opposed to the more common QR) would be rather useful.

Most common books on the subject (e.g. Golub and Van Loan) discuss QR extensively and provide algorithms for common implementations (e.g. Algorithm 5.2.1 for Householder or Algorithm 5.2.5 for Modified Gram Schmidt).

Unfortunately, it does not discuss RQ, except for a small note regarding LAPACK routines. Wikipedia suggests that the differences are trivial, where "RQ decomposition is Gram–Schmidt orthogonalization of rows of A, started from the last row".

Since the matrices I am working on are column-major, this is not especially attractive.

Are there well-known column-major implementations of RQ, especially using MGS or Householder? Or even if there is some blocking algorithm that is efficient on column data?

Other details: This particular problem does not require pivoting, and I only need R - I do not need Q.

  • 1
    $\begingroup$ Have you considered transposing the matrix as a preprocessing step? Even if you just do it before and after the algorithm, it is much cheaper than QR / RQ factorization itself. $\endgroup$ – Federico Poloni Apr 27 '20 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.