qyre#

Purpose#

Computes the orthogonal-triangular (QR) decomposition of a matrix x and returns QY and R.

Format#

{ qy, r, e } = qyre(y, x)#
Parameters:
  • y (NxL matrix) – data

  • x (NxP matrix) – data

Returns:
  • qy (NxL matrix) – unitary matrix

  • r (KxP matrix) – upper triangular matrix. K=min(N,P).

  • e (Px1 vector) – permutation vector

Remarks#

Given X[.,E], where E is a permutation vector that permutes the columns of X, there is an orthogonal matrix Q such that QX[.,E] is zero below its diagonal, i.e.,

QR[.,E]=[R0]

where R is upper triangular. If we partition

Q=[Q1Q2]

where Q1 has P columns, then

X[.,E]=Q1R

is the QR decomposition of X[.,E].

For most problems Q or Q1 is not what is required. Since Q can be a very large matrix, qyre() has been provided for the calculation of QY, where Y is some NxL matrix, which will be a much smaller matrix.

If either QY or Q1Y are required, see qtyre().

If N<P, the factorization assumes the form:

QR[.,E]=[R1R2]

where R1 is a PxP upper triangular matrix and R2 is P×(NP). Thus Q is a PxP matrix and R is a PxN matrix containing R1 and R2.

Source#

qyr.src

See also

Functions qqr(), qre(), qyr()