What is QR factorization?

Decomposing an m×nm \times n matrix AA with linearly independent column vectors into two matrices QQ and RR, where A=QRA = QR, is known as QR factorization.

  • QQ is an m×nm \times n matrix that has orthonormalAll vectors in the set S are orthogonal to each other and have a magnitude of 1. column vectors.

  • RR is an n×nn \times n upper triangularAll the elements below the main diagonal are zero in an upper triangular matrix., invertible matrix with non-zero diagonal elements.

Procedure

Let's consider AA to be a 3×33 \times 3 matrix with the following definition:

The matrix can be decomposed into the following two matrices:

Here, q1,q2,q3q_{1}, q_{2}, q_{3} are orthonormal vectors calculated using the Gram-Schmidt process.

RR will be calculated using the vector dot product between the column vectors of matrix AA and matrix QQ.

Example

Given that the following matrix AA has linearly independent column vectors, we can find its QRQR factorization in the following way:

QQ can be calculated using the Gram-Schmidt process:

Note: To learn about Gram-Schmidt process in detail, click here.

RR is calculated as individual column vectors to depict the process in detail. Here are the steps of this process:

Step 1

The column vector r1r_{1} can be calculated as follows:

Step 2

The column vector r2r_{2} can be calculated as follows:

Step 3

The column vector r3r_{3} can be calculated as follows:

Step 4

The column vectors r1,r2,r3r_{1}, r_{2}, r_{3} give the following matrix RR:

Solution

Matrix AA has been factorized into two matrices, QQ and RR , using QR decomposition:

The calculated matrices follow the equation of the QR decomposition:

Quiz

To test your understanding of the QR concept, attempt the following questions:

Question 1

Find the QR decomposition of the following matrix AA: A=[111101112]A =\begin{bmatrix} 1 & 1 & 1 \\ -1 & 0 & 1 \\ 1 & 1 & 2 \\ \end{bmatrix}

Show Answer
Question 2

Find the QR decomposition of the following matrix AA: A=[110200221]A =\begin{bmatrix} 1 & -1 & 0 \\ 2 & 0 & 0 \\ 2 & 2 & 1 \\ \end{bmatrix}

Show Answer

Applications

QR decomposition makes calculations easier and is used in numerous applications, such as the following:

  • It reduces the order of matrices.

  • It speeds up matrix operations.

  • It is used in successive cancellation detection in MIMO systems.

  • It is used in optimal ordered detection to maximize the signal-to-noise ratio.

Free Resources

Copyright ©2026 Educative, Inc. All rights reserved