Attempt these from memory before reading.
State the three defining properties of an inner product. Why is the conjugate symmetry ⟨ u , v ⟩ = ⟨ v , u ⟩ ‾ \langle u, v\rangle = \overline{\langle v, u\rangle} ⟨ u , v ⟩ = ⟨ v , u ⟩ rather than plain symmetry? Write the norm induced by an inner product. State the Cauchy-Schwarz inequality. What does it let you define? What is the orthogonal complement of a subspace? Check your answers against the text. Prompt 2 is the one that matters for quantum mechanics: without the conjugate, a complex vector space could not have ⟨ v , v ⟩ ≥ 0 \langle v, v\rangle \ge 0 ⟨ v , v ⟩ ≥ 0 .
A vector space has no lengths and no angles. You cannot ask whether two vectors are perpendicular, because nothing in the eight axioms mentions geometry. That is not an oversight — it is what makes the definition apply to so many things.
An inner product is the extra structure that supplies all of it. Given one, you get:
a norm , ∥ v ∥ = ⟨ v , v ⟩ \lVert v\rVert = \sqrt{\langle v, v\rangle} ∥ v ∥ = ⟨ v , v ⟩ ; angles , through the Cauchy-Schwarz inequality ∣ ⟨ u , v ⟩ ∣ ≤ ∥ u ∥ ∥ v ∥ \lvert\langle u,v\rangle\rvert \le \lVert u\rVert\lVert v\rVert ∣⟨ u , v ⟩∣ ≤ ∥ u ∥ ∥ v ∥ , which makes cos θ = ⟨ u , v ⟩ ∥ u ∥ ∥ v ∥ \cos\theta = \frac{\langle u,v\rangle}{\lVert u\rVert\lVert v\rVert} cos θ = ∥ u ∥ ∥ v ∥ ⟨ u , v ⟩ well defined;orthogonality , ⟨ u , v ⟩ = 0 \langle u, v\rangle = 0 ⟨ u , v ⟩ = 0 ;and, most usefully, the ability to decompose a vector into independent pieces. Why the conjugate matters. Over R \mathbb{R} R symmetry is enough. Over C \mathbb{C} C , plain symmetry would force ⟨ v , v ⟩ \langle v, v\rangle ⟨ v , v ⟩ to be complex, and then ∥ v ∥ \lVert v\rVert ∥ v ∥ has no meaning. Requiring conjugate symmetry makes ⟨ v , v ⟩ \langle v,v\rangle ⟨ v , v ⟩ real, so positivity can be stated, and it is the reason quantum mechanical inner products are ⟨ ϕ ∣ ψ ⟩ \langle\phi|\psi\rangle ⟨ ϕ ∣ ψ ⟩ rather than ⟨ ψ ∣ ϕ ⟩ \langle\psi|\phi\rangle ⟨ ψ ∣ ϕ ⟩ .
Orthogonal projection is why any of this is practical. Given a subspace, every vector splits uniquely into a piece inside it and a piece perpendicular to it. The inside piece is the best approximation the subspace can offer — and “best approximation given a subspace” is precisely what least squares asks. The entire theory of fitting data to a model is an orthogonal projection.
An inner product on a vector space V V V over F F F (where F = R F = \mathbb{R} F = R or C \mathbb{C} C ) is a Function ⟨ ⋅ , ⋅ ⟩ : V × V → F \langle \cdot, \cdot \rangle : V \times V \to F ⟨ ⋅ , ⋅ ⟩ : V × V → F satisfying:
Conjugate symmetry : ⟨ u , v ⟩ = ⟨ v , u ⟩ ‾ \langle \mathbf{u}, \mathbf{v} \rangle = \overline{\langle \mathbf{v}, \mathbf{u} \rangle} ⟨ u , v ⟩ = ⟨ v , u ⟩ Linearity in the first argument : ⟨ α u + β w , v ⟩ = α ⟨ u , v ⟩ + β ⟨ w , v ⟩ \langle \alpha\mathbf{u} + \beta\mathbf{w}, \mathbf{v} \rangle = \alpha\langle \mathbf{u}, \mathbf{v} \rangle + \beta\langle \mathbf{w}, \mathbf{v} \rangle ⟨ α u + β w , v ⟩ = α ⟨ u , v ⟩ + β ⟨ w , v ⟩ Positive definiteness : ⟨ v , v ⟩ ≥ 0 \langle \mathbf{v}, \mathbf{v} \rangle \geq 0 ⟨ v , v ⟩ ≥ 0 with equality iff v = 0 \mathbf{v} = \mathbf{0} v = 0 A vector space equipped with an inner product is called an inner product space .
Example. The standard inner product on R n \mathbb{R}^n R n is ⟨ x , y ⟩ = ∑ i = 1 n x i y i \langle \mathbf{x}, \mathbf{y} \rangle = \sum_{i=1}^n x_i y_i ⟨ x , y ⟩ = ∑ i = 1 n x i y i . On C n \mathbb{C}^n C n ⟨ x , y ⟩ = ∑ i = 1 n x i y i ‾ \langle \mathbf{x}, \mathbf{y} \rangle = \sum_{i=1}^n x_i \overline{y_i} ⟨ x , y ⟩ = ∑ i = 1 n x i y i .
Example. On C [ a , b ] C[a,b] C [ a , b ] The L 2 L^2 L 2 inner product is ⟨ f , g ⟩ = ∫ a b f ( x ) g ( x ) d x \langle f, g \rangle = \int_a^b f(x)g(x)\,dx ⟨ f , g ⟩ = ∫ a b f ( x ) g ( x ) d x .
Every inner product induces a norm :
∥ v ∥ = ⟨ v , v ⟩ \lVert \mathbf{v} \rVert = \sqrt{\langle \mathbf{v}, \mathbf{v} \rangle} ∥ v ∥ = ⟨ v , v ⟩ Theorem 7.1 (Cauchy—Schwarz Inequality). For all u , v ∈ V \mathbf{u}, \mathbf{v} \in V u , v ∈ V
∣ ⟨ u , v ⟩ ∣ ≤ ∥ u ∥ ∥ v ∥ \lvert\langle \mathbf{u}, \mathbf{v} \rangle\rvert \leq \lVert \mathbf{u} \rVert \, \lVert \mathbf{v} \rVert ∣⟨ u , v ⟩∣ ≤ ∥ u ∥ ∥ v ∥ With equality if and only if u \mathbf{u} u and v \mathbf{v} v are linearly dependent.
Proof. If v = 0 \mathbf{v} = \mathbf{0} v = 0 Both sides are 0 and the result holds. Assume v ≠ 0 \mathbf{v} \neq \mathbf{0} v = 0 . For any t ∈ R t \in \mathbb{R} t ∈ R (or C \mathbb{C} C ), positive definiteness gives
0 ≤ ⟨ u − t v , u − t v ⟩ = ⟨ u , u ⟩ − t ⟨ v , u ⟩ − t ‾ ⟨ u , v ⟩ + ∣ t ∣ 2 ⟨ v , v ⟩ 0 \leq \langle \mathbf{u} - t\mathbf{v}, \mathbf{u} - t\mathbf{v} \rangle = \langle \mathbf{u}, \mathbf{u} \rangle - t\langle \mathbf{v}, \mathbf{u} \rangle - \overline{t}\langle \mathbf{u}, \mathbf{v} \rangle + \lvert t \rvert^2 \langle \mathbf{v}, \mathbf{v} \rangle 0 ≤ ⟨ u − t v , u − t v ⟩ = ⟨ u , u ⟩ − t ⟨ v , u ⟩ − t ⟨ u , v ⟩ + ∣ t ∣ 2 ⟨ v , v ⟩ Set t = ⟨ u , v ⟩ ⟨ v , v ⟩ t = \frac{\langle \mathbf{u}, \mathbf{v} \rangle}{\langle \mathbf{v}, \mathbf{v} \rangle} t = ⟨ v , v ⟩ ⟨ u , v ⟩ (the value that minimises the right side):
0 ≤ ∥ u ∥ 2 − ∣ ⟨ u , v ⟩ ∣ 2 ∥ v ∥ 2 0 \leq \lVert \mathbf{u} \rVert^2 - \frac{\lvert\langle \mathbf{u}, \mathbf{v} \rangle\rvert^2}{\lVert \mathbf{v} \rVert^2} 0 ≤ ∥ u ∥ 2 − ∥ v ∥ 2 ∣⟨ u , v ⟩ ∣ 2 Rearranging: ∣ ⟨ u , v ⟩ ∣ 2 ≤ ∥ u ∥ 2 ∥ v ∥ 2 \lvert\langle \mathbf{u}, \mathbf{v} \rangle\rvert^2 \leq \lVert \mathbf{u} \rVert^2 \lVert \mathbf{v} \rVert^2 ∣⟨ u , v ⟩ ∣ 2 ≤ ∥ u ∥ 2 ∥ v ∥ 2 . Taking square roots gives the result. Equality holds iff u − t v = 0 \mathbf{u} - t\mathbf{v} = \mathbf{0} u − t v = 0 I.e., u \mathbf{u} u and v \mathbf{v} v are linearly dependent. ■ \blacksquare ■
Theorem 7.2 (Triangle Inequality).
∥ u + v ∥ ≤ ∥ u ∥ + ∥ v ∥ \lVert \mathbf{u} + \mathbf{v} \rVert \leq \lVert \mathbf{u} \rVert + \lVert \mathbf{v} \rVert ∥ u + v ∥ ≤ ∥ u ∥ + ∥ v ∥ Proof.
∥ u + v ∥ 2 = ⟨ u + v , u + v ⟩ = ∥ u ∥ 2 + 2 R e ⟨ u , v ⟩ + ∥ v ∥ 2 \lVert \mathbf{u} + \mathbf{v} \rVert^2 = \langle \mathbf{u} + \mathbf{v}, \mathbf{u} + \mathbf{v} \rangle = \lVert \mathbf{u} \rVert^2 + 2\,\mathrm{Re}\langle \mathbf{u}, \mathbf{v} \rangle + \lVert \mathbf{v} \rVert^2 ∥ u + v ∥ 2 = ⟨ u + v , u + v ⟩ = ∥ u ∥ 2 + 2 Re ⟨ u , v ⟩ + ∥ v ∥ 2 By Cauchy—Schwarz, R e ⟨ u , v ⟩ ≤ ∣ ⟨ u , v ⟩ ∣ ≤ ∥ u ∥ ∥ v ∥ \mathrm{Re}\langle \mathbf{u}, \mathbf{v} \rangle \leq \lvert\langle \mathbf{u}, \mathbf{v} \rangle\rvert \leq \lVert \mathbf{u} \rVert \lVert \mathbf{v} \rVert Re ⟨ u , v ⟩ ≤ ∣⟨ u , v ⟩∣ ≤ ∥ u ∥ ∥ v ∥ So
∥ u + v ∥ 2 ≤ ∥ u ∥ 2 + 2 ∥ u ∥ ∥ v ∥ + ∥ v ∥ 2 = ( ∥ u ∥ + ∥ v ∥ ) 2 \lVert \mathbf{u} + \mathbf{v} \rVert^2 \leq \lVert \mathbf{u} \rVert^2 + 2\lVert \mathbf{u} \rVert \lVert \mathbf{v} \rVert + \lVert \mathbf{v} \rVert^2 = (\lVert \mathbf{u} \rVert + \lVert \mathbf{v} \rVert)^2 ∥ u + v ∥ 2 ≤ ∥ u ∥ 2 + 2 ∥ u ∥ ∥ v ∥ + ∥ v ∥ 2 = (∥ u ∥ + ∥ v ∥ ) 2 Taking square roots gives the result. ■ \blacksquare ■
Two vectors u , v \mathbf{u}, \mathbf{v} u , v are orthogonal if ⟨ u , v ⟩ = 0 \langle \mathbf{u}, \mathbf{v} \rangle = 0 ⟨ u , v ⟩ = 0 . We write u ⊥ v \mathbf{u} \perp \mathbf{v} u ⊥ v .
An orthonormal set { e 1 , … , e k } \{e_1, \ldots, e_k\} { e 1 , … , e k } satisfies ⟨ e i , e j ⟩ = δ i j \langle e_i, e_j \rangle = \delta_{ij} ⟨ e i , e j ⟩ = δ ij .
Theorem 7.3 (Pythagorean Theorem). If u ⊥ v \mathbf{u} \perp \mathbf{v} u ⊥ v Then
∥ u + v ∥ 2 = ∥ u ∥ 2 + ∥ v ∥ 2 \lVert \mathbf{u} + \mathbf{v} \rVert^2 = \lVert \mathbf{u} \rVert^2 + \lVert \mathbf{v} \rVert^2 ∥ u + v ∥ 2 = ∥ u ∥ 2 + ∥ v ∥ 2 Proof. ∥ u + v ∥ 2 = ∥ u ∥ 2 + 2 ⟨ u , v ⟩ + ∥ v ∥ 2 = ∥ u ∥ 2 + ∥ v ∥ 2 \lVert \mathbf{u} + \mathbf{v} \rVert^2 = \lVert \mathbf{u} \rVert^2 + 2\langle \mathbf{u}, \mathbf{v} \rangle + \lVert \mathbf{v} \rVert^2 = \lVert \mathbf{u} \rVert^2 + \lVert \mathbf{v} \rVert^2 ∥ u + v ∥ 2 = ∥ u ∥ 2 + 2 ⟨ u , v ⟩ + ∥ v ∥ 2 = ∥ u ∥ 2 + ∥ v ∥ 2 . ■ \blacksquare ■
Proposition 7.4. Every orthonormal set is linearly independent.
Proof. If ∑ i = 1 k α i e i = 0 \sum_{i=1}^k \alpha_i e_i = \mathbf{0} ∑ i = 1 k α i e i = 0 Then taking the inner product with e j e_j e j : α j = ⟨ ∑ α i e i , e j ⟩ = ⟨ 0 , e j ⟩ = 0 \alpha_j = \langle \sum \alpha_i e_i, e_j \rangle = \langle \mathbf{0}, e_j \rangle = 0 α j = ⟨ ∑ α i e i , e j ⟩ = ⟨ 0 , e j ⟩ = 0 for each j j j . ■ \blacksquare ■
The Gram—Schmidt process converts a linearly independent set { v 1 , … , v n } \{\mathbf{v}_1, \ldots, \mathbf{v}_n\} { v 1 , … , v n } into an orthonormal set { e 1 , … , e n } \{e_1, \ldots, e_n\} { e 1 , … , e n } :
u 1 = v 1 , e 1 = u 1 ∥ u 1 ∥ \mathbf{u}_1 = \mathbf{v}_1, \quad e_1 = \frac{\mathbf{u}_1}{\lVert \mathbf{u}_1 \rVert} u 1 = v 1 , e 1 = ∥ u 1 ∥ u 1 u k = v k − ∑ i = 1 k − 1 ⟨ v k , e i ⟩ e i , e k = u k ∥ u k ∥ \mathbf{u}_k = \mathbf{v}_k - \sum_{i=1}^{k-1} \langle \mathbf{v}_k, e_i \rangle e_i, \quad e_k = \frac{\mathbf{u}_k}{\lVert \mathbf{u}_k \rVert} u k = v k − i = 1 ∑ k − 1 ⟨ v k , e i ⟩ e i , e k = ∥ u k ∥ u k Proposition 7.5. At each step, s p a n { e 1 , … , e k } = s p a n { v 1 , … , v k } \mathrm{span}\{e_1, \ldots, e_k\} = \mathrm{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} span { e 1 , … , e k } = span { v 1 , … , v k } .
Proof. By construction, u k \mathbf{u}_k u k is v k \mathbf{v}_k v k minus its projection onto s p a n { e 1 , … , e k − 1 } = s p a n { v 1 , … , v k − 1 } \mathrm{span}\{e_1, \ldots, e_{k-1}\} = \mathrm{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_{k-1}\} span { e 1 , … , e k − 1 } = span { v 1 , … , v k − 1 } . So u k ∈ s p a n { v 1 , … , v k } \mathbf{u}_k \in \mathrm{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} u k ∈ span { v 1 , … , v k } and v k = u k + ∑ i = 1 k − 1 ⟨ v k , e i ⟩ e i ∈ s p a n { u 1 , … , u k } \mathbf{v}_k = \mathbf{u}_k + \sum_{i=1}^{k-1}\langle \mathbf{v}_k, e_i \rangle e_i \in \mathrm{span}\{\mathbf{u}_1, \ldots, \mathbf{u}_k\} v k = u k + ∑ i = 1 k − 1 ⟨ v k , e i ⟩ e i ∈ span { u 1 , … , u k } . Since each e i e_i e i is a scalar multiple of u i \mathbf{u}_i u i The spans coincide. ■ \blacksquare ■
The orthogonal projection of v \mathbf{v} v onto a subspace W W W with orthonormal basis { e 1 , … , e k } \{e_1, \ldots, e_k\} { e 1 , … , e k } is
p r o j W ( v ) = ∑ i = 1 k ⟨ v , e i ⟩ e i \mathrm{proj_W}(\mathbf{v}) = \sum_{i=1}^k \langle \mathbf{v}, e_i \rangle e_i pro j W ( v ) = i = 1 ∑ k ⟨ v , e i ⟩ e i Theorem 7.6 (Best Approximation). Among all vectors in W W W The orthogonal projection p r o j W ( v ) \mathrm{proj_W}(\mathbf{v}) pro j W ( v ) minimises the distance to v \mathbf{v} v :
∥ v − p r o j W ( v ) ∥ ≤ ∥ v − w ∥ f o r a l l w ∈ W \lVert \mathbf{v} - \mathrm{proj_W}(\mathbf{v}) \rVert \leq \lVert \mathbf{v} - \mathbf{w} \rVert \quad \mathrm{for}~all~ \mathbf{w} \in W ∥ v − pro j W ( v )∥ ≤ ∥ v − w ∥ for a l l w ∈ W Proof. For any w ∈ W \mathbf{w} \in W w ∈ W Write v − w = ( v − p r o j W ( v ) ) + ( p r o j W ( v ) − w ) \mathbf{v} - \mathbf{w} = (\mathbf{v} - \mathrm{proj_W}(\mathbf{v})) + (\mathrm{proj_W}(\mathbf{v}) - \mathbf{w}) v − w = ( v − pro j W ( v )) + ( pro j W ( v ) − w ) . The first term is orthogonal to W W W (hence to the second term, which lies in W W W ), so by the Pythagorean theorem:
∥ v − w ∥ 2 = ∥ v − p r o j W ( v ) ∥ 2 + ∥ p r o j W ( v ) − w ∥ 2 ≥ ∥ v − p r o j W ( v ) ∥ 2 \lVert \mathbf{v} - \mathbf{w} \rVert^2 = \lVert \mathbf{v} - \mathrm{proj_W}(\mathbf{v}) \rVert^2 + \lVert \mathrm{proj_W}(\mathbf{v}) - \mathbf{w} \rVert^2 \geq \lVert \mathbf{v} - \mathrm{proj_W}(\mathbf{v}) \rVert^2 ∥ v − w ∥ 2 = ∥ v − pro j W ( v ) ∥ 2 + ∥ pro j W ( v ) − w ∥ 2 ≥ ∥ v − pro j W ( v ) ∥ 2 With equality iff w = p r o j W ( v ) \mathbf{w} = \mathrm{proj_W}(\mathbf{v}) w = pro j W ( v ) . ■ \blacksquare ■
A fundamental application of orthogonal projection is fitting functions to data. Given a subspace W W W of an inner product space V V V and a target v ∈ V \mathbf{v} \in V v ∈ V The best approximation in W W W Is the orthogonal projection p r o j W ( v ) \mathrm{proj_W}(\mathbf{v}) pro j W ( v ) .
Problem. Apply the Gram—Schmidt process to v 1 = ( 1 , 1 , 0 ) \mathbf{v}_1 = (1, 1, 0) v 1 = ( 1 , 1 , 0 ) v 2 = ( 1 , 0 , 1 ) \mathbf{v}_2 = (1, 0, 1) v 2 = ( 1 , 0 , 1 ) , v 3 = ( 0 , 1 , 1 ) \mathbf{v}_3 = (0, 1, 1) v 3 = ( 0 , 1 , 1 ) in R 3 \mathbb{R}^3 R 3 with the standard inner Product.
Solution u 1 = v 1 = ( 1 , 1 , 0 ) \mathbf{u}_1 = \mathbf{v}_1 = (1, 1, 0) u 1 = v 1 = ( 1 , 1 , 0 ) , ∥ u 1 ∥ = 2 \lVert \mathbf{u}_1 \rVert = \sqrt{2} ∥ u 1 ∥ = 2 , e 1 = 1 2 ( 1 , 1 , 0 ) e_1 = \frac{1}{\sqrt{2}}(1, 1, 0) e 1 = 2 1 ( 1 , 1 , 0 ) .
u 2 = v 2 − ⟨ v 2 , e 1 ⟩ e 1 = ( 1 , 0 , 1 ) − 1 2 ⋅ 1 2 ( 1 , 1 , 0 ) = ( 1 , 0 , 1 ) − 1 2 ( 1 , 1 , 0 ) = ( 1 2 , − 1 2 , 1 ) \mathbf{u}_2 = \mathbf{v}_2 - \langle \mathbf{v}_2, e_1 \rangle e_1 = (1, 0, 1) - \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 1, 0) = (1, 0, 1) - \frac{1}{2}(1, 1, 0) = (\frac{1}{2}, -\frac{1}{2}, 1) u 2 = v 2 − ⟨ v 2 , e 1 ⟩ e 1 = ( 1 , 0 , 1 ) − 2 1 ⋅ 2 1 ( 1 , 1 , 0 ) = ( 1 , 0 , 1 ) − 2 1 ( 1 , 1 , 0 ) = ( 2 1 , − 2 1 , 1 )
∥ u 2 ∥ = 1 / 4 + 1 / 4 + 1 = 3 / 2 \lVert \mathbf{u}_2 \rVert = \sqrt{1/4 + 1/4 + 1} = \sqrt{3/2} ∥ u 2 ∥ = 1/4 + 1/4 + 1 = 3/2 , e 2 = 1 3 / 2 ( 1 2 , − 1 2 , 1 ) = 1 6 ( 1 , − 1 , 2 ) e_2 = \frac{1}{\sqrt{3/2}}(\frac{1}{2}, -\frac{1}{2}, 1) = \frac{1}{\sqrt{6}}(1, -1, 2) e 2 = 3/2 1 ( 2 1 , − 2 1 , 1 ) = 6 1 ( 1 , − 1 , 2 ) .
u 3 = v 3 − ⟨ v 3 , e 1 ⟩ e 1 − ⟨ v 3 , e 2 ⟩ e 2 \mathbf{u}_3 = \mathbf{v}_3 - \langle \mathbf{v}_3, e_1 \rangle e_1 - \langle \mathbf{v}_3, e_2 \rangle e_2 u 3 = v 3 − ⟨ v 3 , e 1 ⟩ e 1 − ⟨ v 3 , e 2 ⟩ e 2
⟨ v 3 , e 1 ⟩ = 1 2 ( 0 + 1 + 0 ) = 1 2 \langle \mathbf{v}_3, e_1 \rangle = \frac{1}{\sqrt{2}}(0 + 1 + 0) = \frac{1}{\sqrt{2}} ⟨ v 3 , e 1 ⟩ = 2 1 ( 0 + 1 + 0 ) = 2 1
⟨ v 3 , e 2 ⟩ = 1 6 ( 0 − 1 + 2 ) = 1 6 \langle \mathbf{v}_3, e_2 \rangle = \frac{1}{\sqrt{6}}(0 - 1 + 2) = \frac{1}{\sqrt{6}} ⟨ v 3 , e 2 ⟩ = 6 1 ( 0 − 1 + 2 ) = 6 1
u 3 = ( 0 , 1 , 1 ) − 1 2 ⋅ 1 2 ( 1 , 1 , 0 ) − 1 6 ⋅ 1 6 ( 1 , − 1 , 2 ) = ( 0 , 1 , 1 ) − 1 2 ( 1 , 1 , 0 ) − 1 6 ( 1 , − 1 , 2 ) \mathbf{u}_3 = (0, 1, 1) - \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 1, 0) - \frac{1}{\sqrt{6}} \cdot \frac{1}{\sqrt{6}}(1, -1, 2) = (0, 1, 1) - \frac{1}{2}(1, 1, 0) - \frac{1}{6}(1, -1, 2) u 3 = ( 0 , 1 , 1 ) − 2 1 ⋅ 2 1 ( 1 , 1 , 0 ) − 6 1 ⋅ 6 1 ( 1 , − 1 , 2 ) = ( 0 , 1 , 1 ) − 2 1 ( 1 , 1 , 0 ) − 6 1 ( 1 , − 1 , 2 )
= ( − 1 2 − 1 6 , 1 − 1 2 + 1 6 , 1 − 1 3 ) = ( − 2 3 , 2 3 , 2 3 ) = (-\frac{1}{2} - \frac{1}{6}, 1 - \frac{1}{2} + \frac{1}{6}, 1 - \frac{1}{3}) = (-\frac{2}{3}, \frac{2}{3}, \frac{2}{3}) = ( − 2 1 − 6 1 , 1 − 2 1 + 6 1 , 1 − 3 1 ) = ( − 3 2 , 3 2 , 3 2 )
∥ u 3 ∥ = 4 / 9 + 4 / 9 + 4 / 9 = 4 / 3 = 2 / 3 \lVert \mathbf{u}_3 \rVert = \sqrt{4/9 + 4/9 + 4/9} = \sqrt{4/3} = 2/\sqrt{3} ∥ u 3 ∥ = 4/9 + 4/9 + 4/9 = 4/3 = 2/ 3 , e 3 = 3 2 ( − 2 3 , 2 3 , 2 3 ) = 1 3 ( − 1 , 1 , 1 ) e_3 = \frac{\sqrt{3}}{2}(-\frac{2}{3}, \frac{2}{3}, \frac{2}{3}) = \frac{1}{\sqrt{3}}(-1, 1, 1) e 3 = 2 3 ( − 3 2 , 3 2 , 3 2 ) = 3 1 ( − 1 , 1 , 1 ) .
Verification: ⟨ e 1 , e 2 ⟩ = 1 12 ( 1 − 1 + 0 ) = 0 \langle e_1, e_2 \rangle = \frac{1}{\sqrt{12}}(1 - 1 + 0) = 0 ⟨ e 1 , e 2 ⟩ = 12 1 ( 1 − 1 + 0 ) = 0 . ✓ \checkmark ✓ ⟨ e 1 , e 3 ⟩ = 1 6 ( − 1 + 1 + 0 ) = 0 \langle e_1, e_3 \rangle = \frac{1}{\sqrt{6}}(-1 + 1 + 0) = 0 ⟨ e 1 , e 3 ⟩ = 6 1 ( − 1 + 1 + 0 ) = 0 . ✓ \checkmark ✓ ⟨ e 2 , e 3 ⟩ = 1 18 ( − 1 − 1 + 2 ) = 0 \langle e_2, e_3 \rangle = \frac{1}{\sqrt{18}}(-1 - 1 + 2) = 0 ⟨ e 2 , e 3 ⟩ = 18 1 ( − 1 − 1 + 2 ) = 0 . ✓ \checkmark ✓
The orthonormal basis is { 1 2 ( 1 , 1 , 0 ) , 1 6 ( 1 , − 1 , 2 ) , 1 3 ( − 1 , 1 , 1 ) } \left\{\frac{1}{\sqrt{2}}(1,1,0),\ \frac{1}{\sqrt{6}}(1,-1,2),\ \frac{1}{\sqrt{3}}(-1,1,1)\right\} { 2 1 ( 1 , 1 , 0 ) , 6 1 ( 1 , − 1 , 2 ) , 3 1 ( − 1 , 1 , 1 ) } . ■ \blacksquare ■
Caution
the input vectors are Linearly dependent, one of the u k \mathbf{u}_k u k will be the zero vector, and the process will fail (attempting to divide by zero in the normalisation step).
Problem. Find the orthogonal projection of v = ( 3 , − 1 , 2 ) \mathbf{v} = (3, -1, 2) v = ( 3 , − 1 , 2 ) onto the plane W W W spanned by ( 1 , 0 , 1 ) (1, 0, 1) ( 1 , 0 , 1 ) and ( 0 , 1 , 1 ) (0, 1, 1) ( 0 , 1 , 1 ) in R 3 \mathbb{R}^3 R 3 with the standard inner product. Also find the distance from v \mathbf{v} v to W W W .
Solution First, apply Gram—Schmidt to obtain an orthonormal basis for W W W .
u 1 = ( 1 , 0 , 1 ) \mathbf{u}_1 = (1, 0, 1) u 1 = ( 1 , 0 , 1 ) , ∥ u 1 ∥ = 2 \lVert \mathbf{u}_1 \rVert = \sqrt{2} ∥ u 1 ∥ = 2 , e 1 = 1 2 ( 1 , 0 , 1 ) e_1 = \frac{1}{\sqrt{2}}(1, 0, 1) e 1 = 2 1 ( 1 , 0 , 1 ) .
u 2 = ( 0 , 1 , 1 ) − ⟨ ( 0 , 1 , 1 ) , e 1 ⟩ e 1 = ( 0 , 1 , 1 ) − 1 2 ⋅ 1 2 ( 1 , 0 , 1 ) = ( 0 , 1 , 1 ) − 1 2 ( 1 , 0 , 1 ) = ( − 1 2 , 1 , 1 2 ) \mathbf{u}_2 = (0, 1, 1) - \langle (0,1,1), e_1 \rangle e_1 = (0, 1, 1) - \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 0, 1) = (0, 1, 1) - \frac{1}{2}(1, 0, 1) = (-\frac{1}{2}, 1, \frac{1}{2}) u 2 = ( 0 , 1 , 1 ) − ⟨( 0 , 1 , 1 ) , e 1 ⟩ e 1 = ( 0 , 1 , 1 ) − 2 1 ⋅ 2 1 ( 1 , 0 , 1 ) = ( 0 , 1 , 1 ) − 2 1 ( 1 , 0 , 1 ) = ( − 2 1 , 1 , 2 1 ) .
∥ u 2 ∥ = 1 / 4 + 1 + 1 / 4 = 3 / 2 \lVert \mathbf{u}_2 \rVert = \sqrt{1/4 + 1 + 1/4} = \sqrt{3/2} ∥ u 2 ∥ = 1/4 + 1 + 1/4 = 3/2 , e 2 = 1 6 ( − 1 , 2 , 1 ) e_2 = \frac{1}{\sqrt{6}}(-1, 2, 1) e 2 = 6 1 ( − 1 , 2 , 1 ) .
Now compute the projection:
⟨ v , e 1 ⟩ = 1 2 ( 3 + 0 + 2 ) = 5 2 \langle \mathbf{v}, e_1 \rangle = \frac{1}{\sqrt{2}}(3 + 0 + 2) = \frac{5}{\sqrt{2}} ⟨ v , e 1 ⟩ = 2 1 ( 3 + 0 + 2 ) = 2 5
⟨ v , e 2 ⟩ = 1 6 ( − 3 − 2 + 2 ) = − 3 6 \langle \mathbf{v}, e_2 \rangle = \frac{1}{\sqrt{6}}(-3 - 2 + 2) = \frac{-3}{\sqrt{6}} ⟨ v , e 2 ⟩ = 6 1 ( − 3 − 2 + 2 ) = 6 − 3
p r o j W ( v ) = 5 2 ⋅ 1 2 ( 1 , 0 , 1 ) + − 3 6 ⋅ 1 6 ( − 1 , 2 , 1 ) \mathrm{proj_W}(\mathbf{v}) = \frac{5}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 0, 1) + \frac{-3}{\sqrt{6}} \cdot \frac{1}{\sqrt{6}}(-1, 2, 1) pro j W ( v ) = 2 5 ⋅ 2 1 ( 1 , 0 , 1 ) + 6 − 3 ⋅ 6 1 ( − 1 , 2 , 1 )
= 5 2 ( 1 , 0 , 1 ) + − 3 6 ( − 1 , 2 , 1 ) = ( 5 2 , 0 , 5 2 ) + ( 1 2 , − 1 , − 1 2 ) = ( 3 , − 1 , 2 ) = \frac{5}{2}(1, 0, 1) + \frac{-3}{6}(-1, 2, 1) = (\frac{5}{2}, 0, \frac{5}{2}) + (\frac{1}{2}, -1, -\frac{1}{2}) = (3, -1, 2) = 2 5 ( 1 , 0 , 1 ) + 6 − 3 ( − 1 , 2 , 1 ) = ( 2 5 , 0 , 2 5 ) + ( 2 1 , − 1 , − 2 1 ) = ( 3 , − 1 , 2 )
The residual is v − p r o j W ( v ) = ( 0 , 0 , 0 ) \mathbf{v} - \mathrm{proj_W}(\mathbf{v}) = (0, 0, 0) v − pro j W ( v ) = ( 0 , 0 , 0 ) So the distance is 0. This means v ∈ W \mathbf{v} \in W v ∈ W itself. Indeed, v = 3 ( 1 , 0 , 1 ) − ( 0 , 1 , 1 ) ∈ s p a n { ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) } \mathbf{v} = 3(1, 0, 1) - (0, 1, 1) \in \mathrm{span}\{(1,0,1), (0,1,1)\} v = 3 ( 1 , 0 , 1 ) − ( 0 , 1 , 1 ) ∈ span {( 1 , 0 , 1 ) , ( 0 , 1 , 1 )} . ■ \blacksquare ■
Problem. Find the constant function c c c (i.e., the best approximation by a degree-0 polynomial) That minimises ∫ 0 1 ( e x − c ) 2 d x \int_0^1 (e^x - c)^2\,dx ∫ 0 1 ( e x − c ) 2 d x .
Solution We want the orthogonal projection of f ( x ) = e x f(x) = e^x f ( x ) = e x onto the subspace W = s p a n { 1 } W = \mathrm{span}\{1\} W = span { 1 } in the L 2 [ 0 , 1 ] L^2[0,1] L 2 [ 0 , 1 ] inner product space. The orthonormal basis for W W W is e 1 = 1 e_1 = 1 e 1 = 1 (since ∥ 1 ∥ 2 = ∫ 0 1 1 d x = 1 \lVert 1 \rVert^2 = \int_0^1 1\,dx = 1 ∥ 1 ∥ 2 = ∫ 0 1 1 d x = 1 ).
p r o j W ( f ) = ⟨ f , 1 ⟩ ⋅ 1 = ( ∫ 0 1 e x d x ) ⋅ 1 = ( e − 1 ) ⋅ 1 \mathrm{proj_W}(f) = \langle f, 1 \rangle \cdot 1 = \left(\int_0^1 e^x\,dx\right) \cdot 1 = (e - 1) \cdot 1 pro j W ( f ) = ⟨ f , 1 ⟩ ⋅ 1 = ( ∫ 0 1 e x d x ) ⋅ 1 = ( e − 1 ) ⋅ 1
So the best constant approximation is c = e − 1 ≈ 1.718 c = e - 1 \approx 1.718 c = e − 1 ≈ 1.718 .
Verification: The error is e x − ( e − 1 ) e^x - (e-1) e x − ( e − 1 ) . Expanding e x e^x e x as a Taylor series around x = 1 / 2 x = 1/2 x = 1/2 : The constant term is e 1 / 2 ≈ 1.649 e^{1/2} \approx 1.649 e 1/2 ≈ 1.649 But our answer e − 1 ≈ 1.718 e - 1 \approx 1.718 e − 1 ≈ 1.718 is the L 2 L^2 L 2 -optimal constant, not the Taylor approximation. The two optimisation criteria differ. ■ \blacksquare ■
An inner product generalises the familiar dot product to abstract vector spaces, including function spaces. It gives you two crucial pieces of information: the length of a vector (via the induced norm) and the angle between vectors (via the inner product value). Without an inner product, you can measure linear structure but not geometric structure.
The Cauchy-Schwarz inequality is the foundation: it says the “correlation” between two vectors is bounded by their lengths, just as the cosine of an angle is bounded between negative one and one. Orthogonal projection is the geometric operation of finding the closest point in a subspace, which generalises the idea of “shadow” from physical light to arbitrary dimensions. The Gram-Schmidt process is the systematic way to build an orthonormal basis, analogous to aligning coordinate axes with the principal directions of your data. In function spaces like L 2 L^2 L 2 , the inner product measures how similar two functions are, which is the basis of Fourier analysis and signal processing.
The Cauchy—Schwarz inequality is not the triangle inequality. Cauchy—Schwarz bounds the inner product by the product of norms; the triangle inequality bounds the norm of a sum by the sum of norms. They are related (the triangle inequality follows from Cauchy—Schwarz) but distinct.Gram—Schmidt is numerically unstable. For floating-point computation, modified Gram—Schmidt or Householder reflections are preferred.Orthogonal projection decomposes v \mathbf{v} v uniquely. v = p r o j W ( v ) + v ⊥ \mathbf{v} = \mathrm{proj_W}(\mathbf{v}) + \mathbf{v}^\perp v = pro j W ( v ) + v ⊥ where v ⊥ ∈ W ⊥ \mathbf{v}^\perp \in W^\perp v ⊥ ∈ W ⊥ . This decomposition is unique and is called the orthogonal decomposition .Claim True? Counterexample Every norm comes from an inner product no the ℓ 1 \ell^1 ℓ 1 and ℓ ∞ \ell^\infty ℓ ∞ norms on R 2 \mathbb{R}^2 R 2 do not; only the ℓ 2 \ell^2 ℓ 2 norm does Orthogonal vectors are independent no only if they are non-zero ; ⟨ 0 , v ⟩ = 0 \langle 0, v\rangle = 0 ⟨ 0 , v ⟩ = 0 for every v v v An orthogonal set is automatically a basis no it must also span; orthogonality gives independence for free but not spanning Cauchy-Schwarz is a special case of something stronger yes it is the case k = 2 k=2 k = 2 of Hölder’s inequality, and the proof technique is the same Gram-Schmidt changes the span no it produces an orthonormal basis for the same space at every step The orthogonal projection is the closest point yes and this is a theorem, not a definition — it is what makes least squares meaningful Inner products are unique no ⟨ u , v ⟩ = u T v \langle u,v\rangle = u^Tv ⟨ u , v ⟩ = u T v and ⟨ u , v ⟩ = 2 u T v \langle u,v\rangle = 2u^Tv ⟨ u , v ⟩ = 2 u T v both satisfy the axiomsTwo vectors with zero inner product must have zero length no ⟨ ( 1 , 0 ) , ( 0 , 1 ) ⟩ = 0 \langle (1,0), (0,1)\rangle = 0 ⟨( 1 , 0 ) , ( 0 , 1 )⟩ = 0 and both have length one
The first row is the one that shapes functional analysis. A norm comes from an inner product exactly when it satisfies the parallelogram law, and spaces whose norms fail that — ℓ 1 \ell^1 ℓ 1 , ℓ ∞ \ell^\infty ℓ ∞ , C [ 0 , 1 ] C[0,1] C [ 0 , 1 ] with the sup norm — are the ones where orthogonal projection and least squares stop working. That is why L 2 L^2 L 2 is the Hilbert space that appears in quantum mechanics rather than L p L^p L p for other p p p .
Hilbert spaces. Completing an inner product space gives a Hilbert space, and everything finite-dimensional carries over except compactness of the unit ball. That is the boundary crossed on the functional analysis track .Numerical stability of Gram-Schmidt. The classical algorithm is numerically unstable and the modified version is not; why, and what that costs, is an active question in numerical analysis.Frames. Generalising bases to overcomplete spanning sets, which is what makes robust signal representation possible; the theory is still developing.Reproducing kernel Hilbert spaces. Inner products on spaces of functions, which is the mathematical foundation of Gaussian processes and kernel methods in machine learning.Quantum information. The geometry of the Bloch sphere is inner-product geometry, and distinguishing quantum states is a question about how their inner products behave.Mix these with Eigenvalues and Eigenvectors , Vectors and Vector Spaces , Quantum Operators , Inner Product and Hilbert Spaces and Spectral Theory .
(Axioms.) Show that ⟨ u , v ⟩ = u T ( 2 0 0 1 ) v \langle u, v\rangle = u^T \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix} v ⟨ u , v ⟩ = u T ( 2 0 0 1 ) v satisfies the inner product axioms on R 2 \mathbb{R}^2 R 2 , and find the unit circle under the norm it induces. (Norms.) Show that the ℓ 1 \ell^1 ℓ 1 norm on R 2 \mathbb{R}^2 R 2 fails the parallelogram law, and conclude that it does not come from an inner product. (Gram-Schmidt.) Apply Gram-Schmidt to { ( 1 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 ) } \{(1,1,0), (1,0,1), (0,1,1)\} {( 1 , 1 , 0 ) , ( 1 , 0 , 1 ) , ( 0 , 1 , 1 )} in R 3 \mathbb{R}^3 R 3 , and verify the result is orthonormal. Then explain why the third vector changes when the first is rescaled. (Least squares.) Show that the least-squares solution of A x = b Ax = b A x = b solves the normal equations A T A x = A T b A^TAx = A^Tb A T A x = A T b , by writing b b b as its projection onto the column space plus an orthogonal remainder. (Quantum mechanics.) Show that the Born rule P ( a n ) = ∣ ⟨ a n ∣ ψ ⟩ ∣ 2 P(a_n) = |\langle a_n|\psi\rangle|^2 P ( a n ) = ∣ ⟨ a n ∣ ψ ⟩ ∣ 2 is a statement about orthogonal projection, and explain why probabilities must be projection norms rather than inner products. (Spectral theory.) Show that a self-adjoint operator has orthogonal eigenvectors for distinct eigenvalues, using the inner product rather than determinants. That is the finite-dimensional seed of the spectral theorem. Eigenvalues and Eigenvectors : The spectral theorem for symmetric matrices guarantees an orthonormal eigenbasis, which is an inner product space concept.Vectors and Vector Spaces : Inner product spaces are vector spaces equipped with an inner product that generalises the dot product.Singular Value Decomposition : The SVD decomposes a matrix using orthonormal bases derived from inner products on A T A A^T A A T A and A A T AA^T A A T .