4.5 Inner products and orthogonality
The vector-space axioms — addition and scalar multiplication — let you add and stretch arrows but say nothing about length or angle. Pythagoras’ theorem, the cosine rule, the very idea of “perpendicular” — none of these are part of the bare vector-space structure. To recover them, you need one extra piece of equipment: an inner product.
This lesson defines the inner product, develops the geometric notions it makes possible (length, angle, projection, orthogonality), and walks through the Gram–Schmidt procedure that turns any linearly-independent set of vectors into an orthonormal basis. The same machinery, lifted to function spaces, is what makes Fourier expansion and modal projection work — it is the algebraic structure underlying Foundations 6.5.
The dot product
In the inner product is the familiar dot product:
This is just a single number — the inner product of two vectors is a scalar, not another vector. Three properties pin it down and generalise to other inner-product spaces:
- Symmetric. .
- Bilinear. , and similarly in the second slot.
- Positive definite. , with equality if and only if .
Any operation on a vector space with these three properties is called an inner product, often written in more abstract settings. The integral , for instance, satisfies all three properties (with functions as the “vectors”), and so it is an inner product on the space of integrable functions on . That fact is what makes the Fourier-projection formula in Foundations 6.5 work mechanically the same way as the projection of a 2-D vector onto an axis.
Length and angle
The inner product gives you a norm (length):
In this is just Pythagoras: . The norm satisfies the triangle inequality — a consequence of the Cauchy–Schwarz inequality , which is one of the most-used inequalities in mathematics.
The inner product also encodes the angle between two vectors:
Two vectors are orthogonal (perpendicular) if their inner product is zero. In orthogonality is the algebraic condition ; in function-space settings it becomes . The integral version is what makes the Fourier sine series of Foundations 6.3 work:
— different-mode sines are orthogonal as elements of the function space .
Projection
If is a unit vector (i.e. ), the projection of any vector onto is
The scalar is the length of the projection — how much of points along . The vector is the projection itself, a vector parallel to .
The residual is the component of perpendicular to . Two checks: (so ✓), and (so the decomposition is exact ✓).
Projection is the bread-and-butter geometric operation of linear algebra. If is an orthonormal basis, then any vector decomposes as
That formula is the Fourier expansion of in the basis . When the basis is the modes of a PDE rather than basis vectors, the same formula extracts modal coefficients from initial data; that is the Fourier-projection step in Foundations 6.5.
Gram–Schmidt orthogonalisation
Given a set of linearly-independent vectors , we want to produce an orthonormal set spanning the same space — orthogonal to each other and each of unit length. The Gram–Schmidt procedure does this iteratively, by subtracting projections.
The recipe for two input vectors and :
- . (Normalise the first vector.)
- . (Subtract from its component along .)
- . (Normalise.)
For three or more inputs the procedure continues: subtract from each subsequent vector its components along all previously orthonormalised vectors, then normalise.
Drag the blue and red circles to set the input vectors a and b. Step through the procedure: normalise a, subtract its component from b to get a perpendicular remainder w, then normalise w. The small right-angle marker confirms that the green w is perpendicular to e₁. The output {e₁, e₂} is an orthonormal basis for the same plane that {a, b} spanned.
Drag the blue and red input vectors and . Step through the three operations. The little right-angle marker in step 2 confirms that the green residual is perpendicular to ; in step 3 it gets normalised to . The output basis spans the same plane as the input but with orthogonal axes.
Worked example
▶ Worked example: Gram–Schmidt on three vectors in R³
The problem. Find an orthonormal basis for the span of
These three vectors are linearly independent (verify by computing ) and so span all of ; the output will be an orthonormal basis of .
Step 1 — Normalise .
Step 2 — Subtract the -component from to get .
Check that is orthogonal to : . ✓
Step 3 — Normalise .
Step 4 — Subtract - and -components from .
Check orthogonality: ✓, and ✓.
Step 5 — Normalise .
Step 6 — Final answer. The orthonormal basis is
Each has length 1; each pair is orthogonal; together they span .
Inner products on function spaces
The bridge to PDEs: the same recipe — projection, orthogonality, Gram–Schmidt — works on infinite-dimensional spaces of functions, provided the inner product is the integral
(possibly weighted; the Sturm–Liouville theorem describes which weight functions are appropriate for which differential operators). The functions on are pairwise orthogonal under this inner product, with . Therefore the Fourier sine series
is exactly the orthonormal-basis expansion from the finite-dimensional case, lifted to the function space. The arithmetic is identical; the only difference is that “sum” becomes “integral” in the inner product, and "" plays the role of . This is the deep reason separation of variables and Fourier expansion work: the natural eigenfunctions of self-adjoint differential operators are orthogonal under an appropriate inner product, and the spectral theorem in 4.6 guarantees their completeness as a basis.
What we use this for
Inner products are everywhere across the bookshelf:
- Fourier-projection for mode coefficients (Foundations 6.5) — the formula is an inner product divided by a norm squared.
- Orthogonality of mode shapes in Sound 7.6 — tube modes, Sound 7.7 — cavity modes, Sound 7.8 — room modes — distinct cavity modes are orthogonal under the appropriate volume integral.
- Vector projection in 3-D geometry — every plane-wave acoustic problem involves projecting a wavevector onto direction vectors, computing inner products like to find the phase at a position.
- Inner products of complex signals in Hearing 5.3 — phase-locking — vector strength is a circular-mean inner product of unit vectors, generalising the dot product to complex unit phasors.
- Optimal control and matched filters — the matched filter that maximises signal-to-noise ratio for detecting a signal in noise is the inner product of the received waveform with itself, just as projection extracts the component of one vector along another.
The next lesson, 4.6, ties together everything in the chapter: the eigenvalues of 4.4, the orthogonality of this lesson, and the spectral theorem that guarantees a self-adjoint operator’s eigenvectors form a complete orthonormal basis. That theorem is what makes mode expansions for PDEs not just convenient but mathematically complete.