Define the projection correctly
The denominator disappears only for a unit direction.[1]
The residual is orthogonal to u because its dot product with u is u·v−(u·v)/(u·u)·(u·u)=0. Projection and normalization are distinct:an orthogonal vector may still have arbitrary length. The formulas below use the real Euclidean inner product.[2]
Build the orthonormal basis step by step
Start with u1=v1 and check ui≠0 before each normalization.[2]
Every subtracted component lies in the previous span, so the total span is preserved. Since earlier q-vectors are orthonormal, the new residual has zero dot product with each. Independence ensures a nonzero residual, whose normalization adds another independent direction. Coordinates need a meaningful common scaling; with compatible physical coordinates, the normalized directions are dimensionless.[1]
QR and floating-point limitations
Collecting q-vectors as columns gives QᵀQ=I and a factorization A=QR with upper-triangular R. In finite precision, classical Gram–Schmidt can lose orthogonality for nearly dependent columns. Modified Gram–Schmidt or Householder QR is more robust. A small residual is therefore not an exact rank proof. A bounded two-vector model must handle near dependence explicitly instead of blindly normalizing tiny residuals.[1][2]
Two worked examples
Two planar vectors
- Given
- v1=(1,1), v2=(1,0).
- Find
- Construct an orthonormal basis.
Normalize the first direction.
Subtract the projection and normalize the residual.
Result: q1 and q2 form an orthonormal basis of the plane.
Check: Their dot product is 0 and both squared norms are 1. Input order determines the resulting direction choice.
A two-dimensional subspace in space
- Given
- v1=(1,0,1), v2=(1,1,0).
- Find
- Describe the span with orthonormal vectors.
Project using the unnormalized first vector.
The residual norm is√(3/2).
Result: Both q-vectors span the same subspace.
Check: The numerator dot product 1+0−1 is zero; the second numerator’s squared norm is 6.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Foundation
Orthonormalize v1=(2,0), v2=(1,3).
Show hint
The first unit direction is(1,0).
Learning goal: Separate projection, residual and normalization.
Error analysis · Application
Is(u·v)u the projection onto any vector u?
Show hint
Check a scaled u.
Learning goal: Check the squared-norm denominator.
Show solution and calculation
Only when||u||=1.
With u=(2,0), v=(1,1), the wrong formula gives(4,0); dividing by u·u=4 gives(1,0).
Interpret · Application
What follows when v2=3v1 with v1≠0?
Show hint
The whole second vector is in the first direction.
Learning goal: Interpret dependence as a zero residual.
Show solution and calculation
The residual is zero.
There is no second independent direction and the residual cannot be normalized; the span needs only one basis vector.
Rearrange · Application
Find R for columns(1,1),(1,0) using Q from the first example.
Show hint
Compute R=QᵀA.
Learning goal: Connect orthogonalization to QR.
Show solution and calculation
The entries are√2,1/√2,0,1/√2; QR reconstructs both original columns.
Transfer · Challenge
Why does a floating-point residual of 10−15 not prove exact dependence?
Show hint
Consider scale and rounding.
Learning goal: Separate numerical rank decisions from exact algebra.
Show solution and calculation
It may reflect true near dependence or numerical error.
Use scale-aware tolerance and a suitable stable method; exact dependence is a different claim.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Useful next steps
Projection coefficients use this basic operation: Dot Product.
To normalize each nonzero residual, you need Magnitude of a Vector (Length).
The QR connection leads to stable fitting through Linear Least Squares.
Sources for this explanation
Quanta · Updated November 8, 2026
- Gilbert Strang, MIT 18.06SC: Orthogonal Matrices and Gram-Schmidt
- LMU München Mathematik 3: Orthogonalisierung
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Developed projection, orthogonality, normalization, QR connections and numerical limits with DE/EN examples and exercises.
Cite this reference page
Quanta. Gram–Schmidt Orthogonalization. Updated November 8, 2026. https://quanta-study.de/en/formula-sheet/gram-schmidt-orthogonalisierung
When citing a specific scientific statement, also cite the specialist source linked to that statement.