What is QR decomposition of a matrix?
Let A be a matrix with linearly independent columns. Using QR decomposition, we can express the matrix A as a product of two matrices Q and R, where Q is an orthogonal matrix and R is an upper triangular matrix.
In our previous articles, we discussed orthogonal matrices and upper triangular matrices. We discussed that An upper triangular matrix is a square matrix in which all the elements below the principal diagonal are zeros. If ai,j is the element of the ith row and jth column of the matrix A, then we can say that the matrix A is an upper triangular matrix if the following condition holds true:
For example, the matrix A given below is an nxn square matrix that is upper triangular.
On the other hand, an orthogonal matrix Q is a square matrix of real numbers such that if we take any two columns or any two rows, the two rows or the two columns will be orthonormal. In other words, if we take any two columns and perform a dot product of the column vectors, the dot product will be zero and the column vectors have unit length. The same is true for any two rows of an orthogonal matrix.
So, in one way, we can say that if Q is an orthogonal matrix, then the following holds true:
Or, we can also say,
The matrices given below are some examples of orthogonal matrices.
How to perform QR decomposition of a matrix using Python?
We can use the following Python code to perform QR decomposition of a matrix A…
0 Comments