Skip to main content

Qrdecomposition Calculator

Our free fractions calculator solves qrdecomposition problems. Get worked examples, visual aids, and downloadable results.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

A = QR

Where Q is an orthogonal matrix (Q^T Q = I) with orthonormal columns computed via the Gram-Schmidt process, and R is an upper triangular matrix containing the projection coefficients and norms.

Worked Examples

Example 1: QR Decomposition of a 3x2 Matrix

Problem:Find the QR decomposition of A = [[1,1],[0,1],[1,0]].

Solution:Column 1: a1 = [1,0,1], ||a1|| = sqrt(2)\nq1 = [1/sqrt(2), 0, 1/sqrt(2)]\nr11 = sqrt(2) = 1.4142\n\nColumn 2: a2 = [1,1,0]\nr12 = q1 . a2 = 1/sqrt(2) = 0.7071\nu2 = a2 - r12*q1 = [0.5, 1, -0.5]\nr22 = ||u2|| = sqrt(1.5) = 1.2247\nq2 = u2/r22 = [0.4082, 0.8165, -0.4082]

Result:Q = [[0.7071, 0.4082], [0, 0.8165], [0.7071, -0.4082]], R = [[1.4142, 0.7071], [0, 1.2247]]

Example 2: QR of a Square 2x2 System

Problem:Find QR of [[3,1],[4,2]] to solve 3x+y=5, 4x+2y=6.

Solution:a1 = [3,4], ||a1|| = 5, q1 = [0.6, 0.8]\nr11 = 5, r12 = q1.[1,2] = 0.6+1.6 = 2.2\nu2 = [1,2] - 2.2*[0.6,0.8] = [-0.32, 0.24]\nr22 = 0.4, q2 = [-0.8, 0.6]\nSolve Rx = Q^T b by back substitution

Result:R = [[5, 2.2], [0, 0.4]], Q = [[0.6, -0.8], [0.8, 0.6]]

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy