title: Mystified by qr.Q(): what is an orthonormal matrix in "compact" form?
body: <p>R has a <code>qr()</code> function, which performs QR decomposition using either LINPACK or LAPACK (in my experience, the latter is 5% faster). The main object returned is a matrix "qr" that contains in the upper triangular matrix R (i.e. <code>R=qr[upper.tri(qr)]</code>). So far so good. The lower triangular part of qr contains Q "in compact form". One can extract Q from the qr decomposition by using <code>qr.Q()</code>. I would like to find the inverse of <code>qr.Q()</code>. In other word, I do have Q and R, and would like to put them in a "qr" object. R is trivial but Q is not. The goal is to apply to it <code>qr.solve()</code>, which is much faster than <code>solve()</code> on large systems.</p>