In 1907, the Baltic German mathematician Erhard Schmidt published a paper in which he introduced an orthogonalization algorithm that has since become known as the classical Gram-Schmidt process. Schmidt claimed that his procedure was essentially the same as an earlier one published by the Danish actuary and mathematician J. P. Gram in 1883. The Schmidt version was the first to become popular and widely used. An algorithm related to a modified version of the process appeared in an 1820 treatise by P. S. Laplace. Although related algorithms have been around for almost 200 years, it is the Schmidt paper that led to the popularization of orthogonalization techniques.
Jørgen Pedersen Gram (1850--1916)
Erhard Schmidt (1876--1959)
The Gram–Schmidt process is a simple algorithm for producing an orthogonal or
orthonormal basis for any nonzero subspace of a finite dimensional inner product space (V, 〈 • , • 〉).
Gram--Schmidt process
The Gram-Schmidt process is an algorithm to transform an ordered set of vectors into an orthogonal or orthonormal set spanning the same subspace, that is generating the same collection of linear combinations.
Example 1:
■
End of Example 1
Example 2:
■
End of Example 2
Example 3:
■
End of Example 3
Theorem 1 (Gram-Schmidt):
Let { v₁, v₂, … vₙ, …} be a (finite or infinite) system of
independent vectors in an inner-product space (V, 〈 • , • 〉)〈 ·∣· 〉 . Then there is an orthogonal
system { e₁, e₂, … eₙ, …} having the following property: For each s
Moreover, the vectors eₙ are unique up to multiplication by scalars.
We begin with e₁ = v₁ and proceed by indeterminate coefficients for the next one: e₂ = v₁ + 𝑎₁ v₂ has to be orthogonal to e₁ = v₁. More generally, since the subspaces generated by the { v₁, v₂, … vₛ} and the { e₁, e₂, … eₛ}
are the same, we have to take
These condition furnish a linear system for the unknown coefficients. The problem is to solve this system at each step. Thanks to the theory of determinants,
there is an elegant way to give the result. Consider the symbolic determinant
which represents a vector es+1 ∈ V. Expanding it according to its last row, we find
\[
\mathbf{e}_{s+1} = g_s \mathbf{v}_{s+1} = \text{a linear combination of $\mathbf{v}_i$ for $i \le s$} ,
\]
where gₛ stands for the Gram determinant of the first s vectors { vₗ }. This determ,inant is nonzero because vectors { vₗ } are linearly independent. We also observe that
Furthermore, distributing the inner products in the last row, we see that for i ≤ s, 〈ei ∣ es+1〉 is given by a determinant having two equal rows, hence zero:
eₛ is orthogonal to the previously constructed ei's.
Example 1:
■
End of Example 1
Example 7:
Gram--Schmidt orthogonalization is a method that takes a non-orthogonal set of
linearly independent function and literally constructs an orthogonal set over an arbitrary interval and with respect to an arbitrary weighting function. Here for convenience, all functions are assumed to be real.
The Hermite polynomial Hₙ(x) can be derived from the orthogonalization of the polynomials
For n ∈ ℤ, let 𝒫≤n⟦x⟧ be a vector space of real-valued polynomials of degree at most n. This space is equipped with the inner product
\[
\langle f \mid g \rangle = \int_0^1 f(x)\,g(x)\,{\text d}x ,
\]
making it an inner product space.
Let us consider the list 𝓜 = (1, x, x², … , xm) for some m ∈ [0..n] = { 0, 1, … , n }.
The Gram-Schmidt Orthogonalization Algorithm produces an orthonormal list of
vectors 𝓞 = { ω₀, ω₁, … ,⃗ωm } such that span(𝓞) = span(𝓜). We show that
Note that vₙ is a monic polynomial of degree n (that is, it is a polynomial in which the leading coefficient (the coefficient of the highest degree term) is exactly equal to 1).
Furthermore, a known property of the algorithm is that vₙ is orthogonal to W.
Polynomial pₙ is of degree n and is monic. For q ∈ W, we have 〈pₙ , q〉 = 0. Hence,
So vₙ − pₙ is orthogonal to W. Because vₙ and pₙ are both monic polynomials of degree n, their difference vₙ − pₙ is a polynomials of degree at most n − 1, so vₙ − pₙ ∈ W. The only vector in W that is orthogonal to W is the zero vector, so vₙ = pₙ.
We have constructed and proved a closed-form formula for outputs of the Gram--Schmidt orthogonalization algorithm for our inner product space and the choice of elementary basis vectors in this vector space given by Eq.(L.1). It should be noted that this expression is closely related to the shifted Legendre polynomials
\( \displaystyle \quad \tilde{P}_n (x) = P_n (2x+1) . \)
■
End of Example 8
Recurrence relation
The Gram–Schmidt process is the canonical constructive method for producing an orthogonal (or orthonormal) sequence from an arbitrary linearly independent list in an inner‑product space. When the initial list consists of polynomials ordered by degree, Gram–Schmidt famously produces the classical orthogonal polynomial families—Legendre, Laguerre, Hermite, and others—each of which satisfies a three‑term recurrence relation.
However, when the initial list is arbitrary and no structural assumptions (such as polynomial degree) are imposed, the Gram–Schmidt process still yields a recurrence, but of a simpler form: a two‑term recurrence expressing each new orthogonal vector as a linear combination of the previous orthogonal vector and the next raw input vector. This recurrence is the algebraic heart of the Gram–Schmidt algorithm and is independent of any special structure of the underlying space.
Let V be an inner‑product space over ℝ or ℂ.
Let { vₙ }n≥0 be a linearly independent sequence in V.
Applying Gram–Schmidt produces an orthogonal sequence { ψₙ }n≥0 defined recursively by
If desired, one may normalize to obtain an orthonormal sequence, but normalization plays no role in the recurrence structure, so we work with the unnormalized ψₙ.
We make the Key Observation: Triangularity of the Gram--Schmidt process.
The Gram–Schmidt formula shows that ψₙ lies in the span of { v₀, v₁, … ,vₙ }.
More importantly, the transformation from the basis { vₙ }n≥0 to the orthogonal basis { ψₙ }n≥0 is upper triangular with nonzero diagonal entries.
This triangularity implies that the inverse transformation is also triangular:
Now orthogonality forces all coefficients to vanish
because { ψₖ } is an orthogonal basis, the only way the above linear combination can vanish is if each coefficient is zero:
\[
a_{n,k} =c_{n,k}\quad (0\leq k\leq n-1).
\]
Thus, the Gram–Schmidt step simplifies to
\[
\psi_n = v_n - a_{n,n-1}\psi_{n-1}.
\]
This is the final two‑term recurrence, so
we have shown that each orthogonal vector ψₙ satisfies
with the initial condition ψ₀ = v₀.
It expresses each new orthogonal vector ψₙ using only:
the new input vector vₙ, and
the immediately preceding orthogonal vector ψn-1.
Nothing else appears explicitly in recurrence \eqref{EqRecurrence}.
This is in contrast to the full-history Gram–Schmidt formula, which subtracts projections onto all previous ψₖ.
This recurrence is universal: it holds for any linearly independent sequence { v₀, v₁, … ,vₙ, … } in any inner‑product space. It is the minimal recurrence compatible with orthogonality and triangularity.
The two‑term recurrence \eqref{EqRecurrence} expresses a simple geometric fact:
to make vₙ orthogonal to all previous ψₖ, it suffices to remove only its component along ψn-1.
Why? Because the triangular structure ensures that vₙ is already orthogonal to ψ₀, ψ₁, … , ψn-2 after subtracting the ψn-1-component. The Gram–Schmidt projections onto earlier vectors are implicitly encoded in the triangular change‑of‑basis coefficients.
Thus, the recurrence is not merely an algebraic convenience; it reflects the geometry of nested subspaces:
The new vector ψₙ must be orthogonal to this subspace, and the only direction in which vₙ can fail to be orthogonal is the direction of ψn-1.
The Gram–Schmidt process, when viewed through the lens of triangularity and orthogonality, naturally yields a two‑term recurrence for the orthogonal sequence \{ \psi _n\} . This recurrence is the minimal algebraic structure required to enforce orthogonality at each step and is independent of any special properties of the initial list.
In contexts where the initial list has additional structure—such as monomials ordered by degree—the two‑term recurrence expands into the familiar three‑term recurrence of orthogonal polynomials. But at its core, Gram–Schmidt always operates through the same geometric mechanism: subtracting the projection onto the most recently constructed orthogonal direction.
Below is a compact, reusable Mathematica snippet that:
takes a list of linearly independent vectors vList = { v₀, v₁, … },
an inner product function ip[.,.],
and returns the orthogonal sequence { ψ₀, ψ₁, … } using only the two‑term recurrence.