QR Decomposition

Factor a matrix as Q R via Gram-Schmidt

About this calculator

The QR Decomposition Calculator factors a full-column-rank matrix (up to 5×5) into A = Q·R using the Gram-Schmidt process, run in 30-digit decimal arithmetic. Q has orthonormal columns and R is upper triangular with a non-negative diagonal — the canonical, unique QR of a full-rank matrix. The calculator also reports the reconstruction residual max |Q·R − A| and the orthonormality residual max |QᵀQ − I| as built-in verification, and detects linearly dependent columns as rank-deficient input.

How to use the QR Decomposition calculator

  1. Enter the values for your problem into the input fields.
  2. Read the result — it updates instantly as you type.
  3. Check the formula and the visual explanation to follow how the answer was found.
  4. Copy the page URL to share the exact calculation.

Common examples

  • [[3,4],[4,−3]] → Q = [[0.6, 0.8],[0.8, −0.6]], R = [[5, 0],[0, 5]], reconstruction error 0
  • 3×3 [[1,1,0],[1,0,1],[0,1,1]] → R diagonal ≈ 1.414214 (√2), 1.224745, 1.154701
  • Tall 3×2 [[1,0],[1,1],[1,2]] → R = [[1.732051, 1.732051],[0, 1.414214]]
  • Dependent columns [[1,2],[2,4]] → rank-deficient: Gram-Schmidt cannot produce a unit vector

Frequently asked questions

How does the QR Decomposition calculator work?

Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.

When would I use the QR Decomposition calculator?

It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.

How accurate are the results?

Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.

Can I share a specific calculation with someone else?

Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.