QR Decomposition Calculator

QR Decomposition Calculator

Decompose a 2x2 matrix into an orthogonal matrix Q and an upper triangular matrix R.

Last updated: March 2026 | By ForgeCalc Engineering

QR Decomposition Solver

Gram-Schmidt

Calculation Steps

1.Matrix A = [[1, 2], [3, 4]]
2.Apply the Gram-Schmidt process to the columns of A.
3.Normalize the first orthogonal vector to get q1.
4.Remove the q1 component from the second column and normalize to get q2.
5.Compute R = Q^T A.
Orthogonal Matrix Q
0.316228
0.948683
0.948683
-0.316228
Upper Triangular Matrix R
3.162278
4.427189
0
0.632456

What QR Decomposition Means

QR decomposition rewrites a matrix as a product of an orthogonal matrix and an upper triangular matrix, which is useful in numerical linear algebra.

How to Read QR Decomposition

  1. Use Gram-Schmidt on the columns of A.
  2. Normalize to form the columns of Q.
  3. Compute R using Q^T A.
  4. Read the orthogonal and upper-triangular factors.
A = Q R

Worked Example

Example: QR decomposition separates direction from scale in a matrix.

A = Q R

Frequently Asked Questions

What is Q?

Q is an orthogonal matrix whose columns are orthonormal vectors.

What is R?

R is an upper triangular matrix that stores the projection coefficients.

Does this accept decimals?

Yes. Any finite real matrix entries are accepted.

What if the matrix is singular?

This simplified solver reports an error when the columns are dependent.

Related Tools