The Gram-Schmidt Process
Turn any basis into an orthonormal one by subtracting off projections onto what has already been built, which gives the QR factorisation used by numerical solvers.
What a learner can do afterwards
- Orthonormalise a small basis by hand
- State what the process preserves at every stage
- Read the QR factorisation off the completed process
1 · Read
Gram-Schmidt turns any basis into an orthonormal one by repeated cleanup. Take each vector in turn, subtract off the parts pointing along the vectors you already cleaned, and scale what remains to length one. Each subtraction is a projection, so the formula reads as geometry rather than symbol pushing. Start with a two vector example on paper before trying anything bigger.
Clean (1, 0) and (1, 2). The first vector is already unit length, so keep it. Project (1, 2) onto (1, 0): the dot is 1, so the projection is (1, 0). Subtract to get the remainder (0, 2), which snaps perpendicular to the first vector. As a second drill, normalise (8, 6): its length is 10, so dividing gives (0.8, 0.6). Copy one such example fully by hand, computing each projection yourself.
Watch what never changes during the cleanup: the span of the vectors handled so far always matches the span of the originals. That invariant is the point of the whole process: you gain orthogonality step by step while keeping the same space. Note that the order of the input vectors matters for the intermediate steps, though the final span stays put.
Read the QR factorisation off your work. Projection multipliers fill R above the diagonal, and each residual length fills the diagonal; the cleaned vectors form Q. So A equals Q times R. Orthonormal columns keep lengths, which helps control error growth, and triangular R solves by back substitution.
Subtract projections, scale to unit length, keep the span, and read off Q and R.
More to read
Understanding Linear Algebra
This interactive text builds Gram-Schmidt as repeated cleanup: subtract the parts pointing along earlier vectors, then scale to length one. It shows each subtraction as a projection, so the formula reads as geometry rather than symbol pushing. Run the activities with a 2 vector example first.
Watch what never changes during the cleanup: the span of the vectors handled so far. That invariant is the second skill in this topic, and the text returns to it after every step.
Linear Algebra: An Interactive Introduction
This introduction animates the projection and subtraction steps of Gram-Schmidt on plane vectors. Seeing the remainder snap perpendicular to the first vector makes the algebra memorable. It then normalizes, giving the orthonormal pair.
Use it to practice orthonormalising a small basis by hand, the first skill here. Copy one animated example onto paper, computing each projection yourself.
Intuitive Linear Algebra: A Gateway to Bright Horizons
This book takes the slow intuitive path through orthogonalisation, motivating each subtraction before writing any formula. It explains why normalizing at the end is safe and why the order of the input vectors matters for the intermediate steps but not for the final span. Good bedtime reading after drill.
Read its QR discussion too: projection multipliers fill R above the diagonal, and residual lengths fill its diagonal. That turns your hand computation into a matrix factorisation.
Vector Spaces First: An Introduction to Linear Algebra (4th Edition)
This book presents Gram-Schmidt in general inner product spaces, not just R^n. The extra generality clarifies what the process really preserves: at every stage the span matches the original, while orthogonality is gained step by step. It is the cleanest statement of the preservation property.
Read it for the QR connection. Factoring A into orthonormal Q and upper triangular R is just the whole process written as one matrix equation.
Explore more
2 · Watch
به انگلیسیTake it off screen
Where it sits
Learn first
Optional connections
This opens up
14 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.