QR Decomposition Calculator

Factor a real matrix as A = QR with orthonormal columns in Q and an upper triangular or trapezoidal R.

Result
—

How to calculate

Orthogonalize the columns of A to construct Q. Find R using QᵀA. If a column supplies no new direction, add an orthogonal unit vector to complete the factorization.

Worked example

Use Matrix A 3, 4 / 4, -3. The result is Q = [3/5, 4/5]; [4/5, -3/5] · R = [5, 0]; [0, 5].

Input and result notes

Enter one row per line and separate values with commas or spaces. Use up to eight rows and eight columns. Fractions and decimals are supported.

MIT on Gram Schmidt and orthogonal matrices

Related calculators