QR decomposition is a method in linear algebra that helps us understand
Q is the matrix form of
R is the product of the transpose of Q and the original matrix.
Note: The matrix R is always an upper triangular matrix.
Suppose we have a matrix M. After QR decomposition, we can represent it as:
Before learning how to perform the QR decomposition, we must know the Gram-Schmidt process.
Note: To learn about the Gram-Schmidt process, we can refer to this Answer.
There are two major steps involved in the process of QR decomposition:
Calculating the Q matrix
Calculating the R matrix
To calculate the Q matrix, we perform the following steps:
We extract column vectors from our original matrix.
We find the orthonormal vectors of these vectors using the Gram-Schmidt process.
We combine the orthonormal vectors to form the matrix Q, where each vector forms a column of the Q matrix.
To calculate the R matrix, we perform the following steps sequentially:
We find the transpose of the Q matrix calculated
We multiply the transpose result with the original matrix
Suppose we have a matrix M such that:
Let's find its Q and R matrices using QR decomposition.
Calculating the Q matrix:
Extracting column vectors from M
Finding the orthonormal vectors of the above vectors using the Gram-Schmidt process:
Calculating orthogonal vectors first:
Calculating orthonormal vectors now:
Combining the orthonormal vectors to form the matrix Q:
Calculating the R matrix:
Finding the transpose of the Q matrix calculated:
We multiply the transpose result with the matrix M:
We can verify our QR decomposition as the product of Q and R should be equal to M:
QR decomposition is a valuable tool in linear algebra to effectively resolve our square matrix into two matrices: Q and R. It finds its application in various areas of mathematics to simplify matrix calculations and help us understand matrix factorization.
Free Resources