From an Arbitrary Basis to an Orthonormal One
An orthonormal basis combines two useful features: its vectors describe every vector in the space, and distinct basis vectors are mutually orthogonal and have length one. In a finite-dimensional inner product space, such a basis is not merely a convenient possibility. Starting with any basis, the Gram-Schmidt process constructs one. The key is that each new input vector has its earlier components removed; independence ensures that something nonzero remains to normalize.
Work over \(\mathbb{F}=\mathbb{R}\) or \(\mathbb{C}\). An inner product on a vector space \(V\) is a positive-definite inner product, with the convention that it is linear in its first slot and conjugate-linear in its second slot when \(\mathbb{F}=\mathbb{C}\). Write \(\|\mathbf{v}\|=\sqrt{\langle\mathbf{v},\mathbf{v}\rangle}\). A list is orthonormal if each vector has norm one and distinct vectors have inner product zero. A basis is an ordered, linearly independent list that spans \(V\).
The coefficient in the recursion is chosen so that the corresponding component of \(\mathbf{v}_k\) is removed. The denominator is \(\langle\mathbf{u}_j,\mathbf{u}_j\rangle=\|\mathbf{u}_j\|^2\), which is positive for a nonzero residual. Thus the construction is defined as long as its residuals do not vanish. The next result establishes both that they do not vanish for independent inputs and that the construction preserves the span.
Why the Construction Works
Proof. We proceed in order through the list. For \(k=1\), independence gives \(\mathbf{v}_1\ne\mathbf{0}\), so \(\mathbf{u}_1=\mathbf{v}_1\ne\mathbf{0}\). Normalizing it gives \(\|\mathbf{q}_1\|=1\), and the first spans agree.
Suppose the construction has reached step \(k\), with \(\mathbf{q}_1,\dots,\mathbf{q}_{k-1}\) orthonormal and with the first \(k-1\) spans equal. The recursion gives \(\mathbf{u}_k\). For each \(i<k\), using linearity in the first slot and orthonormality,
Here \(\mathbf{u}_j=\|\mathbf{u}_j\|\mathbf{q}_j\), so the \(j=i\) term in the sum equals \(\langle\mathbf{v}_k,\mathbf{q}_i\rangle\), and every other term is zero. Hence \(\mathbf{u}_k\) is orthogonal to each earlier output.
If \(\mathbf{u}_k=\mathbf{0}\), the recursion would express \(\mathbf{v}_k\) as a linear combination of \(\mathbf{u}_1,\dots,\mathbf{u}_{k-1}\), and therefore of \(\mathbf{q}_1,\dots,\mathbf{q}_{k-1}\). By the span equality at step \(k-1\), it would then be a linear combination of \(\mathbf{v}_1,\dots,\mathbf{v}_{k-1}\), contradicting independence of the input list. Thus \(\mathbf{u}_k\ne\mathbf{0}\), so \(\mathbf{q}_k\) is defined and has norm one. It is orthogonal to every earlier \(\mathbf{q}_i\).
Finally, the recursion expresses \(\mathbf{u}_k\) as \(\mathbf{v}_k\) minus a combination of earlier vectors. Thus \(\mathbf{u}_k\), and hence \(\mathbf{q}_k\), belongs to the span of \(\mathbf{v}_1,\dots,\mathbf{v}_k\). Conversely, rearranging the recursion expresses \(\mathbf{v}_k\) as \(\mathbf{u}_k\) plus a combination of earlier residuals. Since each earlier residual is a nonzero scalar multiple of its normalized output, the two spans through step \(k\) are equal. This completes the induction. \(\square\)
Proof. If \(V\) has dimension zero, its empty basis is orthonormal: there are no vectors whose norms or pairwise inner products need to be checked. Otherwise, since \(V\) is finite-dimensional, it has a basis \((\mathbf{v}_1,\dots,\mathbf{v}_n)\) for some positive integer \(n\). A basis is linearly independent, so the proposition applies. It produces an orthonormal list with the same span as the basis. That span is \(V\), so the output list is an orthonormal basis of \(V\). \(\square\)
The theorem asserts existence, not that a particular orthonormal basis is unique. Different starting bases, or a different ordering of the same basis, can produce different outputs. What is guaranteed is that the process yields \(n\) orthonormal vectors spanning the same \(n\)-dimensional space.
Worked Constructions
Worked Example: An Orthonormal Basis of \(\mathbb{R}^2\)
Use the standard inner product and start with \(\mathbf{v}_1=(1,1)^{\top}\) and \(\mathbf{v}_2=(1,0)^{\top}\). These vectors are independent: if \(a\mathbf{v}_1+b\mathbf{v}_2=\mathbf{0}\), the second coordinate gives \(a=0\), and then the first gives \(b=0\).
The first residual is \(\mathbf{u}_1=\mathbf{v}_1\), with \(\|\mathbf{u}_1\|=\sqrt{2}\). Thus \(\mathbf{q}_1=(1,1)^{\top}/\sqrt{2}\). For the second residual, \(\langle\mathbf{v}_2,\mathbf{u}_1\rangle=1\) and \(\langle\mathbf{u}_1,\mathbf{u}_1\rangle=2\), so
Therefore \(\mathbf{q}_2=(1,-1)^{\top}/\sqrt{2}\). Check the result: each vector has squared norm \((1+1)/2=1\), and their inner product is \((1-1)/2=0\). Also, \(\mathbf{v}_1=\sqrt{2}\mathbf{q}_1\) and \(\mathbf{v}_2=(\mathbf{q}_1+\mathbf{q}_2)/\sqrt{2}\). Thus the outputs span the original basis vectors and form an orthonormal basis.
Worked Example: Three Basis Vectors in \(\mathbb{R}^3\)
Take \(\mathbf{v}_1=(1,1,0)^{\top}\), \(\mathbf{v}_2=(1,0,1)^{\top}\), and \(\mathbf{v}_3=(0,1,1)^{\top}\). They are independent: a zero linear combination gives \(a+b=0\), \(a+c=0\), and \(b+c=0\); these equations imply \(a=b=c=0\).
First, \(\mathbf{u}_1=(1,1,0)^{\top}\), so \(\mathbf{q}_1=(1,1,0)^{\top}/\sqrt{2}\). Since \(\langle\mathbf{v}_2,\mathbf{u}_1\rangle=1\) and \(\|\mathbf{u}_1\|^2=2\),
Hence \(\mathbf{q}_2=(1,-1,2)^{\top}/\sqrt{6}\). For the third input, \(\langle\mathbf{v}_3,\mathbf{q}_1\rangle=1/\sqrt{2}\) and \(\langle\mathbf{v}_3,\mathbf{q}_2\rangle=1/\sqrt{6}\). Subtracting both components gives
Its squared norm is \(4/3\), so \(\mathbf{q}_3=(-1,1,1)^{\top}/\sqrt{3}\). Check orthogonality: the numerators of the three pairwise dot products are \(1-1+0=0\), \(-1+1+0=0\), and \(1-1+0=0\). Each squared norm is one after division by its denominator: for \(\mathbf{q}_1\), \(2/2=1\); for \(\mathbf{q}_2\), \(1+1+4=6\); for \(\mathbf{q}_3\), \(1+1+1=3\). The proposition guarantees the outputs span the three inputs, so this is an orthonormal basis.
Worked Example: A Polynomial Inner Product
Let \(V=P_2\), the real polynomials of degree at most two, with inner product \(\langle f,g\rangle=\int_{-1}^{1}f(x)g(x)\,dx\). Start with the basis \((1,x,x^2)\). Its independence follows because a polynomial \(a+bx+cx^2\) is the zero polynomial only when all three coefficients are zero.
The first vector \(1\) has squared norm \(\int_{-1}^1 1\,dx=2\), giving \(q_1=1/\sqrt{2}\). Since \(\int_{-1}^1x\,dx=0\), the second residual is \(u_2=x\); its squared norm is \(\int_{-1}^1x^2\,dx=2/3\). Therefore \(q_2=\sqrt{3/2}\,x\).
For the third input, \(\langle x^2,q_1\rangle=2/(3\sqrt{2})\), while \(\langle x^2,q_2\rangle=0\), since the integral of \(x^3\) over \([-1,1]\) is zero. The first projection is \(1/3\), so \(u_3=x^2-1/3\). Its squared norm is
Thus \(q_3=\sqrt{45/8}(x^2-1/3)=\frac{\sqrt{10}}{4}(3x^2-1)\). To check, its squared norm is \((10/16)(9(2/5)-6(2/3)+2)=1\). Its inner product with \(q_1\) is a constant multiple of \(3(2/3)-2=0\); with \(q_2\) it is zero because the integrand is odd. Also \(\langle q_1,q_2\rangle=0\). The outputs are orthonormal and, by span preservation, form a basis of \(P_2\).
A Common Mistake: The Projection Denominator
In the \(\mathbb{R}^2\) example, a tempting but incorrect coefficient for removing the component along \(\mathbf{u}_1=(1,1)^{\top}\) is \(\langle\mathbf{v}_2,\mathbf{u}_1\rangle/\|\mathbf{u}_1\|\). That would give \(1/\sqrt{2}\), and the supposed residual would be \((1-1/\sqrt{2},-1/\sqrt{2})^{\top}\). Its dot product with \(\mathbf{u}_1\) is \(1-\sqrt{2}\ne0\), so the component was not removed.
The correct coefficient is \(\langle\mathbf{v}_2,\mathbf{u}_1\rangle/\langle\mathbf{u}_1,\mathbf{u}_1\rangle=1/2\), not a division by the norm. It gives residual \((1/2,-1/2)^{\top}\), whose dot product with \(\mathbf{u}_1\) is \(1/2-1/2=0\). Keep the squared norm in the projection formula; normalization by the norm happens afterward.
What the Theorem Provides
For any basis of a finite-dimensional inner product space, Gram-Schmidt preserves the span of each initial segment while replacing the list by an orthonormal one. Independence is essential: if an input is already in the span of the earlier inputs, its residual is zero and cannot be normalized. For a basis, that case cannot occur. The resulting orthonormal basis supports simpler coordinate calculations because inner products with its vectors directly identify coefficients: if \(\mathbf{v}=\sum_{j=1}^n c_j\mathbf{q}_j\), then \(\langle\mathbf{v},\mathbf{q}_i\rangle=c_i\). This follows by taking the inner product of the sum with \(\mathbf{q}_i\) and using orthonormality.
Check Your Understanding
Use the definitions and the span-preservation argument to answer the following.
- Why must the first vector of a basis have a nonzero norm?
- In the Gram-Schmidt recursion, what denominator is used to remove a component along a nonzero residual?
- Why would a zero residual contradict independence of the input basis?
- What does span preservation imply about the final output list when the inputs form a basis?
- How does the theorem handle an inner product space of dimension zero?