QR Decomposition Calculator
Factor any matrix into the product of an orthogonal matrix Q and an upper triangular matrix R using the Gram-Schmidt process. Shows every orthogonalization step.
Input Matrix
Examples
Result
Enter a matrix and click Compute QR
Gram-Schmidt Process
The QR decomposition uses the Gram-Schmidt process to orthogonalize the columns of . Each column is projected onto the previously computed orthonormal vectors, and the projections are subtracted to produce an orthogonal set.
Least Squares
QR decomposition is the preferred method for solving least squares problems . The solution is , which is numerically more stable than the normal equations.
Eigenvalue Algorithms
The QR algorithm — which repeatedly computes then forms — is the foundation of modern eigenvalue computation. It converges to a form revealing the eigenvalues on the diagonal.