|
numerics
|
Result of a QR factorization: A = Q * R. More...
#include <qr.hpp>
Public Attributes | |
| Matrix | Q |
| mxm orthogonal | |
| Matrix | R |
| mxn upper triangular | |
Result of a QR factorization: A = Q * R.
Q is an mxm orthogonal matrix (Q^T * Q = I). R is an mxn upper triangular matrix (entries below the diagonal are zero).
For an overdetermined system (m > n), the least-squares solution minimises ||A*x - b||_2 and is obtained by back-substituting into R[:n,:n] * x = (Q^T*b)[:n]. The residual norm is ||(Q^T*b)[n:]||_2.