QR Decomposition Steps Calculator

Break down any rectangular matrix into an orthonormal basis and an upper‑triangular factor with clear, auditable working. Enter dimensions, paste values, and see each projection, normalization, and coefficient revealed step by step. Explore numerical stability, rank warnings, and reconstruction error. Copy tables, export results, and learn the Modified Gram–Schmidt process interactively. Includes sample matrices, rounding control, and latex-friendly formatting options.

Matrix Input
Example (3×3): Use classic example Use symmetric example
Tips
  • Rows must be at least as many as columns (m ≥ n).
  • For better readability, adjust the decimals to your preference.
  • If a diagonal entry of R is ~0, the algorithm reports a likely rank deficiency.

How it works

This tool computes the factorization A = Q R using the Modified Gram–Schmidt procedure. Each step removes projections of the current column onto previously constructed orthonormal columns, then normalizes the remainder. The result is a matrix Q whose columns are orthonormal and an upper‑triangular matrix R.

FAQs

It factors a matrix A into an orthonormal matrix Q and an upper‑triangular matrix R, so that A = Q R. It is widely used in least squares, eigenvalue algorithms, and numerical linear algebra.
It uses the Modified Gram–Schmidt process, which is more numerically stable than the classical version for building the orthonormal columns of Q and the entries of R.
You can enter any m×n with m ≥ n up to 12×12. The number format supports integers, decimals, and scientific notation.
If a diagonal entry r[k,k] is near zero, the tool flags a rank warning and sets the corresponding unit vector to zeros. You can still inspect R and the partial orthonormal basis.
Floating‑point arithmetic introduces rounding. The reported Frobenius‑norm residual ||A − Q R|| is a helpful indicator of numerical accuracy; it should be close to zero for well‑conditioned inputs.
Householder reflections are generally more stable and efficient for dense problems but less transparent step‑by‑step. Modified Gram–Schmidt is great for educational insight into orthogonalization.
Yes. The fixed‑width numeric formatting is designed to be copy‑paste friendly. You can change the decimals to match your LaTeX document’s precision requirements.

Related Calculators


Uniform Distribution PDF/PMF Value Calculator
Pareto Distribution Quantile Percent Point Calculator
Cauchy Distribution CDF Value Calculator
Laplace Distribution CDF Value Calculator
Geometric Distribution Moments Mean Variance Calculator
Negative Binomial Distribution PDF/PMF Value Calculator
Square Area Calculator
Rectangle Perimeter Calculator
Rectangle Circumradius Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.