All spaces are finite-dimensional over or .
Throughout the inner-product units or , and is linear in its first argument and conjugate-linear in its second. A different convention reverses some coefficients, so fix one before computing.
Definition
Inner product and orthogonality
An inner product satisfies conjugate symmetry , linearity in the first argument, and for . Put . Vectors are orthogonal if their inner product is zero. For , .
For , put . Expanding yields the Cauchy–Schwarz inequality
with equality exactly when are dependent. The triangle inequality follows by expanding and applying this bound to the cross term. Positive definiteness, not mere symmetry, is essential here.
Gram–Schmidt converts an independent list to an orthonormal list spanning the same successive subspaces:
Each is orthogonal to previous and is nonzero because otherwise would lie in the span of its predecessors. A zero or dependent input requires omitting a vector rather than dividing by zero.
In the following expanded calculation, denotes the orthonormal vector called in the shared argument.
Proof
The two arguments
If , nonnegativity of gives Cauchy–Schwarz; equality occurs exactly when the residual is zero. If , equality and dependence are immediate. In Gram–Schmidt, each residual is orthogonal to all earlier . It cannot be zero, since is not in the span of the preceding vectors. Normalization yields an orthonormal vector without changing the successive span. Induction completes the proof.
In the case , put . Conjugate symmetry and linearity in the first argument give the explicit expansion
Nonnegativity proves the inequality, and equality is equivalent to . For Gram–Schmidt, each satisfies
The independent-input hypothesis excludes a zero residual, so every displayed denominator is positive.
For a subspace with orthonormal basis , define
Then and , so and the projection is independent of the chosen orthonormal basis. For every ,
proving is the unique closest point. Orthogonality gives both existence and optimality.
Worked example
Project onto a plane
In let . These vectors are orthogonal and both have norm . Thus for the projection is and the residual is , whose length is the distance to .
Choosing a method and avoiding mistakes
Use Gram–Schmidt when the given independent basis is not orthogonal; use projection directly once an orthonormal basis is known. For merely orthogonal non-unit , divide each coefficient by . Do not omit conjugation in a complex inner product or apply the finite-dimensional complement theorem to an arbitrary infinite-dimensional subspace without additional hypotheses.
Exercises
- Apply Gram–Schmidt to , in in that order.
- Find the nearest point to in and its distance.
- For use . Compute the projection of onto .
Full solutions
- . Subtracting the first component from gives , so .
- The coefficient on is , so the nearest point is . The residual has length .
- The spanning vector has squared norm , and . The projection is therefore zero.
Connection
Orthogonal projection is a self-adjoint operator. Adjoints generalize the transpose and express how a map interacts with the inner product.