Householder reflector
Hₖ = I − 2vₖvₖᵀThe unit vector vₖ is chosen so the reflector maps the active column onto a coordinate axis.
Choose rows ≥ columns. Enter decimals or scientific notation; display rounding never changes the calculation.
At step k, a reflector Hₖ = I − 2vₖvₖᵀ zeros the entries below position (k,k). Multiplying the reflectors produces Q.
For an m × n input with m ≥ n, this calculator returns the thin QR decomposition: Q is m × n, R is n × n, and A = QR.
Hₖ = I − 2vₖvₖᵀThe unit vector vₖ is chosen so the reflector maps the active column onto a coordinate axis.
QᵀQ = IEach reflector is symmetric and orthogonal, so their product is orthogonal too.
R = Hₚ⋯H₂H₁ABecause every Hₖ⁻¹ = Hₖ, the corresponding columns of Q = H₁H₂⋯Hₚ reconstruct A.
The loaded example is A = [[12, −51, 4], [6, 167, −68], [−4, 24, −41]]. Its factors are approximately:
[[−0.85714, 0.39429, −0.33143], [−0.42857, −0.90286, 0.03429], [0.28571, −0.17143, −0.94286]][[−14, −21, 14], [0, −175, 70], [0, 0, 35]]Multiplying these rounded displays gives approximately A; the calculator verifies the full-precision factors before display rounding.
For a full-rank tall matrix, solve Rx = Qᵀb without forming the less stable normal-equation matrix AᵀA.
The columns of Q give orthonormal directions spanning the column space when A has full column rank.
Repeated QR factorizations are a foundation of the QR algorithm for approximating eigenvalues.
It factors A into Q, whose columns are mutually orthogonal unit vectors, and an upper-triangular R such that A = QR.
Yes. This calculator accepts tall matrices and square matrices, from 2 through 8 rows, as long as the number of columns does not exceed the rows.
The decomposition still exists. The calculator reports a lower estimated rank and one or more diagonal entries of R will be zero or numerically small. Some columns of thin Q then complete an orthonormal set rather than uniquely describing the column space.
Both answers may be correct. Negating one column of Q and the corresponding row of R does not change their product.
They zero a complete column segment at each step and generally maintain orthogonality better in floating-point arithmetic than classical Gram–Schmidt.
This page shows a thin factorization. For an m × n matrix, Q is m × n and R is n × n.
Yes. The calculations, clipboard text, and downloaded file are created in your browser. This page does not send or save your entries.
Last reviewed: August 5, 2026 by the Starlight Tools editorial team.
Inputs use JavaScript double-precision arithmetic and must be zero or have magnitude from 10⁻¹⁰⁰ through 10¹⁰⁰. Rank is estimated from the diagonal of R relative to the input scale. Severely ill-conditioned matrices may need higher-precision numerical software.