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 Rn the inner product is the familiar dot product:
u⋅v=u1v1+u2v2+⋯+unvn=k=1∑nukvk.
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.u⋅v=v⋅u.
Bilinear.(αu+βw)⋅v=α(u⋅v)+β(w⋅v), and similarly in the second slot.
Positive definite.v⋅v≥0, with equality if and only if v=0.
Any operation on a vector space with these three properties is called an inner product, often written ⟨u,v⟩ in more abstract settings. The integral ∫0Lf(x)g(x)dx, for instance, satisfies all three properties (with functions f,g as the “vectors”), and so it is an inner product on the space of integrable functions on [0,L]. 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):
∥v∥=v⋅v.
In R2 this is just Pythagoras: ∥(x,y)∥=x2+y2. The norm satisfies the triangle inequality ∥u+v∥≤∥u∥+∥v∥ — a consequence of the Cauchy–Schwarz inequality ∣u⋅v∣≤∥u∥∥v∥, which is one of the most-used inequalities in mathematics.
The inner product also encodes the angle between two vectors:
cosθ=∥u∥∥v∥u⋅v.
Two vectors are orthogonal (perpendicular) if their inner product is zero. In Rn orthogonality is the algebraic condition ∑kukvk=0; in function-space settings it becomes ∫f(x)g(x)dx=0. The integral version is what makes the Fourier sine series of Foundations 6.3 work:
∫0Lsin(mπx/L)sin(nπx/L)dx=2Lδmn,
— different-mode sines are orthogonal as elements of the function space L2[0,L].
Projection
If u is a unit vector (i.e. ∥u∥=1), the projection of any vector v onto u is
proju(v)=(v⋅u)u.
The scalar v⋅u is the length of the projection — how much of v points along u. The vector (v⋅u)u is the projection itself, a vector parallel to u.
The residual w=v−proju(v) is the component of v perpendicular to u. Two checks: u⋅w=u⋅v−(v⋅u)⋅1=0 (so w⊥u ✓), and v=proju(v)+w (so the decomposition is exact ✓).
Projection is the bread-and-butter geometric operation of linear algebra. If {e1,…,en} is an orthonormal basis, then any vector decomposes as
v=k=1∑n(v⋅ek)ek.
That formula is the Fourier expansion of v in the basis {ek}. When the basis is the modes of a PDE rather than Rn basis vectors, the same formula extracts modal coefficients from initial data; that is the Fourier-projection step in Foundations 6.5.
▶Project a vector onto another (acoustic intensity direction)Worked Example
An acoustic intensity vector is v=(3,4,0)W/m2. Find its component along the corridor direction u=(1,1,0)/2.
Both terms vanish at the endpoints, confirming ⟨f,g⟩=0. The first two sine modes are orthogonal — as guaranteed by the Sturm-Liouville theory for different eigenvalues.
Gram–Schmidt orthogonalisation
Given a set of linearly-independent vectors {a1,a2,…,ak}, we want to produce an orthonormal set {e1,e2,…,ek} 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 a and b:
e1=a/∥a∥. (Normalise the first vector.)
w=b−(b⋅e1)e1. (Subtract from b its component along e1.)
e2=w/∥w∥. (Normalise.)
For three or more inputs the procedure continues: subtract from each subsequent vector its components along all previously orthonormalised vectors, then normalise.
Initial input: two linearly-independent vectors a and b.
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 a and b. Step through the three operations. The little right-angle marker in step 2 confirms that the green residual w is perpendicular to e1; in step 3 it gets normalised to e2. The output basis {e1,e2} spans the same plane as the input but with orthogonal axes.
Worked example
▶Worked example: Gram–Schmidt on three vectors in R³Derivation
The problem. Find an orthonormal basis for the span of
a1=(1,1,0),a2=(1,0,1),a3=(0,1,1).
These three vectors are linearly independent (verify by computing det=2=0) and so span all of R3; the output will be an orthonormal basis of R3.
Step 1 — Normalise a1.
∥a1∥=12+12+02=2,e1=21(1,1,0).
Step 2 — Subtract the e1-component from a2 to get w2.
Each has length 1; each pair is orthogonal; together they span R3.
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
⟨f,g⟩=∫abf(x)g(x)dx
(possibly weighted; the Sturm–Liouville theorem describes which weight functions are appropriate for which differential operators). The functions sin(nπx/L) on [0,L] are pairwise orthogonal under this inner product, with ∥sin(nπx/L)∥2=L/2. Therefore the Fourier sine series
is exactly the orthonormal-basis expansion v=∑k(v⋅ek)ek 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 "sin(nπx/L)" plays the role of en. 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 An formula is an inner product divided by a norm squared.
Vector projection in 3-D geometry — every plane-wave acoustic problem involves projecting a wavevector k onto direction vectors, computing inner products like k⋅r 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 eiϕ 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 s(t) in noise is the inner product of the received waveform with s(t) 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.