More generally, we can factor a complex m×n matrix A, with m ≥ n, as the product of an m×m unitary matrix Q and an m×n upper triangular matrix R.

This can be reduced in different ways to the solution of a system of linear equations.

Since quite often the solution is very sensitive to roundoff errors, much care must be taken in doing this.

A Householder reflection (or Householder transformation) is a transformation that takes a vector and reflects it about some plane or hyperplane.

We can use this operation to calculate the QR factorization of an m-by-n matrix .

The only difference from QR decomposition is the order of these matrices.

QR decomposition is Gram–Schmidt orthogonalization of columns of A, started from the first column.Analogously, we can define QL, RQ, and LQ decompositions, with L being a lower triangular matrix.There are several methods for actually computing the QR decomposition, such as by means of the Gram–Schmidt process, Householder transformations, or Givens rotations. The RQ decomposition transforms a matrix A into the product of an upper triangular matrix R (also known as right-triangular) and an orthogonal matrix Q.QR decomposition is often used to solve the linear least squares problem, and is the basis for a particular eigenvalue algorithm, the QR algorithm.Q = I) and R is an upper triangular matrix (also called right triangular matrix).f general, optimal f-value small (a "good fit"-problem) If the optimal fit is "bad", then methods based on linearization of Phi are not successful.