Remove projections
uₖ = aₖ − Σⱼ<ₖ (qⱼᵀaₖ)qⱼEach subtraction removes the component pointing along an earlier basis vector.
Each column is one vector. Enter integers, decimals, or scientific notation. Display precision does not round intermediate calculations.
For vector aₖ, subtract its projection onto every earlier unit vector, then divide the remaining orthogonal vector uₖ by its length.
The input vectors are the columns of matrix A = [a₁ … aₙ]. The output columns q₁ … qₙ are orthonormal and span the same subspace.
uₖ = aₖ − Σⱼ<ₖ (qⱼᵀaₖ)qⱼEach subtraction removes the component pointing along an earlier basis vector.
qₖ = uₖ / ‖uₖ‖Dividing by the Euclidean norm makes each new basis vector have length 1.
A = QR, QᵀQ = IR is upper triangular and stores projection coefficients plus the residual norms on its diagonal.
A, or paste the whole matrix. For example, the first column contains a₁.Q are the resulting orthonormal basis.R, the projection steps, and both error checks. Copy the summary or download the matrices as CSV if needed.Start with a₁ = (1,1,0), a₂ = (1,0,1), and a₃ = (0,1,1). First, q₁ = (1/√2, 1/√2, 0). Removing the projection of a₂ onto q₁ gives a direction proportional to (1,−1,2), so q₂ = (1,−1,2)/√6. The third normalized residual is q₃ = (−1,1,1)/√3.
The new vectors are linear combinations of the originals, and A = QR reconstructs every original column.
The basis is orthonormal when every qᵢ·qᵢ = 1 and every distinct pair has qᵢ·qⱼ = 0, subject to rounding.
If a vector lies in the span of earlier vectors, its residual is zero and cannot be normalized. Remove the redundant vector or choose an independent set.
This page treats columns as vectors. If your source lists one vector per row, transpose it before entry.
Rounded projection coefficients can spoil later dot products. This calculator keeps full double precision internally and rounds only the display.
It replaces linearly independent vectors with mutually perpendicular unit vectors that span exactly the same subspace.
Distinct orthogonal vectors have dot product zero. An orthonormal set is orthogonal and every vector also has Euclidean norm 1.
After earlier projections were removed, too little of that vector remained to create a reliable new direction. It is zero, dependent, or numerically indistinguishable from the span of earlier vectors at double precision.
Q contains the orthonormal basis vectors as columns. R is upper triangular and records how to combine those columns to reconstruct A.
It updates the residual after every projection, which generally preserves orthogonality better than evaluating the classical formula in its direct computational order. Re-orthogonalization can improve difficult cases further.
Yes. The process works from left to right, so reordering input vectors can produce a different orthonormal basis, although the final span remains the same for an independent set.
Yes. The calculation, clipboard text, and CSV file are created in your browser. This calculator’s code does not transmit or save the entered values.
Last reviewed: August 4, 2026 by the Starlight Tools editorial team.
Inputs must be finite and no larger than 10¹⁰⁰ in magnitude. Dimensions are limited to 8 so the complete working stays readable. Dependence is assessed relative to each vector’s original norm and JavaScript double-precision arithmetic; severely ill-conditioned inputs may require specialist numerical software or higher precision.