Main       Download       Commercial support       FAQ       Forum       About Us

QR and LQ decompositions

QR decomposition is a best known decomposition from a whole family of orthogonal factorizations, which includes QR, LQ, RQ and QL decompositions. Here Q denotes orthogonal matrix, R and L denote upper and lower triangular matrices. ALGLIB package contains implementations of two most popular decompositions: QR and LQ. These decompositions may be used to solve full rank least squares problem, as preliminary step in the construction of the SVD decomposition, or for other tasks. QL and RQ decompositions are less popular and they are not implemented in the ALGLIB.

Contents

    1 Aglorithm
    2 Performance
    3 Subroutines
    4 Manual entries

Aglorithm

QR(LQ) decomposition is implemented in LAPACK-similar manner:

Performance

Unlike triangular factorization algorithms (LU, Cholesky), QR/LQ are not implemented in cache oblivious manner. Nevertheless, ALGLIB implementation of QR/LQ is still efficient enough without CPU-specific tuning. Algorithm makes use of ALGLIB BLAS, mostly of rank-k updates.

From performance point of view matrices being factorized may be divided into two classes:

Subroutines

ALGLIB package contains both real and complex QR(LQ) decomposition subroutines. Real subroutines are listed below:

Complex versions of subroutines have similar names:

Manual entries

C++ ortfac subpackage   
C# ortfac subpackage   

This article is intended for personal use only.

Download ALGLIB

C#

C# source.

Downloads page

 

C++

C++ source.

Downloads page

 

C++, multiple precision arithmetic

C++ source. MPFR/GMP is used.

GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.

Downloads page

 

FreePascal

FreePascal version.

Downloads page

 

Delphi

Delphi version.

Downloads page

 

VB.NET

VB.NET version.

Downloads page

 

VBA

VBA version.

Downloads page

 

Python

Python version (CPython and IronPython are supported).

Downloads page

 

 

ALGLIB® - numerical analysis library, 1999-2012.
ALGLIB is a registered trademark of the ALGLIB Project.