QR Decomposition


For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n orthogonal matrix Q and an n-by-n upper triangular matrix R so that
A = Q*R.

The QR decompostion always exists, even if the matrix does not have full rank, so MatQR(a()) will never fail. The primary use of the QR decomposition is in the least squares solution of nonsquare systems of simultaneous linear equations. This will fail if isMatQRFullRank(qr) returns false.



qr = MatQR(a())

- This function returns an object which contains the QR Decomposition, computed by Householder reflections. The following funcions return the results of the decomposition.



b = isMatQRFullRank(qr)

- Is the matrix full rank?

c() = MatQRHouseHolderVectors(qr)

- Return the Householder vectors.

c() = MatQROrthogonalFactor(qr)

- Generate and return the (economy-sized) orthogonal factor.

c() = MatQRTriFactor(qr)

- Return the upper triangular factor.

c() = MatQRSolve(qr, b())

- Least squares solution of A*X = B



Linear Algebra







Become a Patron