---
title: "The Gram-Schmidt Process"
description: "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."
canonical: https://lightmysky.com/learn/mathematics/the-gram-schmidt-process-mt_nkp231EA_E
source: https://lightmysky.com/learn/mathematics/the-gram-schmidt-process-mt_nkp231EA_E.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# 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.

Subject: Mathematics · Area: Linear Algebra · Ages 20 to 21
Page: https://lightmysky.com/learn/mathematics/the-gram-schmidt-process-mt_nkp231EA_E

## Ready when they can

- Orthonormalise a small basis by hand
- State what the process preserves at every stage
- Read the QR factorisation off the completed process

## Lesson: Cleaning a basis until it shines

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.

**Example.** Clean (1, 0) and (1, 1). The first vector is already unit length, so keep it. Project (1, 1) onto (1, 0): the dot is 1, so the projection is (1, 0). Subtract to get the remainder (0, 1), which snaps perpendicular to the first vector. As a second drill, normalise (6, 8): its length is 10, so dividing gives (0.6, 0.8). 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.

**Tip.** Read the QR factorisation straight off your finished work. The multipliers you used in the subtractions are exactly the entries of R, and the cleaned vectors form Q. So every hand computation is secretly one matrix equation: A equals Q times R, the form numerical solvers rely on.

**Recap.** Subtract projections, scale to unit length, keep the span, and read off Q and R.

## Practice

14 questions on this page, each with its working shown.

## Needs first

- [Linear Independence, Span and Basis](https://lightmysky.com/learn/mathematics/linear-independence-span-and-basis-mt_5RGbip9yC9)
- [Orthogonal Projection and Least Squares](https://lightmysky.com/learn/mathematics/orthogonal-projection-and-least-squares-mt_kGvRrYJrat)

## Opens up

- [Symmetric Matrices and the Spectral Theorem](https://lightmysky.com/learn/mathematics/symmetric-matrices-and-the-spectral-theorem-mt_sdQv4m7Nbk)
