Mathematics · Glossary

What is inner product?

Also known as: Euclidean space · Hilbert space

Definition 23.1 University Mathematics — Year 1 · Chapter 23 — Euclidean Spaces

An inner product on EE is a map , ⁣:E×ER\langle\cdot,\cdot\rangle \colon E \times E \to \R that is bilinear, symmetric, and positive definite (x,x>0\langle x, x\rangle > 0 for x0x \neq 0). A finite-dimensional space so equipped is a Euclidean space. The norm of xx is x=x,x\norm{x} = \sqrt{\langle x, x\rangle}, and d(x,y)=xyd(x, y) = \norm{x - y}.

Examples

Example 23.2

On Rn\R^n: the canonical product x,y=xiyi\langle x, y\rangle = \sum x_i y_i. On C([a,b])C(\intcc{a}{b}): f,g=abfg\langle f, g \rangle = \int_a^b fg (positive definiteness is Theorem 15.7 (4)). On Rn[X]\R_n[X]: P,Q=01PQ\langle P, Q\rangle = \int_0^1 PQ, or iP(xi)Q(xi)\sum_{i} P(x_i)Q(x_i) over n+1n+1 distinct points.

Example 23.3 (The angle between two polynomials)

Once an inner product is chosen, any two nonzero vectors have an angle, via cosθ=x,yxy\cos\theta = \frac{\langle x, y\rangle}{\norm x\,\norm y} (a legitimate cosine by Cauchy–Schwarz). For XX and X2X^2 in 01\int_0^1:

X,X2=14,X=13,X2=15,cosθ=1/41/15=1540.968:\langle X, X^2\rangle = \frac14, \qquad \norm X = \frac1{\sqrt3}, \qquad \norm{X^2} = \frac1{\sqrt5}, \qquad \cos\theta = \frac{1/4}{1/\sqrt{15}} = \frac{\sqrt{15}}{4} \approx 0.968 :

an angle of about 14.514.5 degrees — on [0,1]\intcc{0}{1}, the graphs of xx and x2x^2 are “nearly parallel” in the quadratic-mean sense, which is why removing that shared direction (Gram–Schmidt, below) leaves only the small correction X2X+16X^2 - X + \frac16.

Example 23.7 (Orthonormal coordinates, with a Parseval check)

Expand x=(1,2,3)x = (1, 2, 3) in the orthonormal basis of Exercise 23.3,

e1=12(1,1,0),e2=16(1,1,2),e3=13(1,1,1).e_1 = \tfrac{1}{\sqrt2}(1,1,0), \quad e_2 = \tfrac{1}{\sqrt6}(1,-1,2), \quad e_3 = \tfrac{1}{\sqrt3}(-1,1,1).

No system to solve — three inner products:

x,e1=32,x,e2=12+66=56,x,e3=1+2+33=43.\langle x, e_1\rangle = \frac{3}{\sqrt2}, \qquad \langle x, e_2\rangle = \frac{1 - 2 + 6}{\sqrt6} = \frac{5}{\sqrt6}, \qquad \langle x, e_3\rangle = \frac{-1 + 2 + 3}{\sqrt3} = \frac{4}{\sqrt3}.

Certification by the norm formula of the proposition:

92+256+163=27+25+326=14=x2=1+4+9.\frac{9}{2} + \frac{25}{6} + \frac{16}{3} = \frac{27 + 25 + 32}{6} = 14 = \norm{x}^2 = 1 + 4 + 9 .

This sum-of-squared-coordinates check (a finite Parseval identity) costs seconds and catches sign and normalization errors with near certainty — make it a habit whenever an orthonormal expansion is computed; its infinite-dimensional version, for the Fourier coefficients of Example 23.14, is a theorem of the Year 3 volume.

Read in context →
Definition 13.1 University Mathematics — Year 3 · Chapter 13 — Hilbert Spaces

An inner product is a map , ⁣:H×HK\langle \cdot,\cdot\rangle \colon H\times H \to K, linear in the second variable, with y,x=x,y\langle y, x\rangle = \overline{\langle x, y\rangle} and x,x>0\langle x, x\rangle > 0 for x0x \neq 0. It induces the norm x=x,x1/2\norm x = \langle x, x\rangle^{1/2}, the Cauchy–Schwarz inequality x,yxy\abs{\langle x, y\rangle} \leq \norm x\norm y (Year 2’s proof — the discriminant — is unchanged), and the parallelogram law

x+y2+xy2=2x2+2y2.\norm{x + y}^2 + \norm{x - y}^2 = 2\norm x^2 + 2\norm y^2 .

A Hilbert space is an inner-product space complete for this norm. Examples: 2\ell^2 (Problem 8.1) and, the fundamental one, L2(μ)L^2(\mu) with f,g=fˉg ⁣dμ\langle f, g\rangle = \int\bar fg\,\dd\mucomplete by Riesz–Fischer (Theorem 12.4); the inner product is finite by Cauchy–Schwarz (== Hölder at p=q=2p = q = 2).

Examples

Example 13.5 (A projection, computed to the end)

In H=L2([0,1])H = L^2(\intcc01), what is the best approximation of f(x)=x2f(x) = x^2 by an affine function? The subspace F=Vect(1,x)F = \operatorname{Vect}(1, x) is closed (finite-dimensional), and pF(f)=a+bxp_F(f) = a + bx is characterized by orthogonality of the residual to 11 and to xx:

01(x2abx) ⁣dx=0,01x(x2abx) ⁣dx=0,\int_0^1(x^2 - a - bx)\,\dd x = 0, \qquad \int_0^1x\,(x^2 - a - bx)\,\dd x = 0,

i.e. 13=a+b2\frac13 = a + \frac b2 and 14=a2+b3\frac14 = \frac a2 + \frac b3: a=16a = -\frac16, b=1b = 1. So pF(x2)=x16p_F(x^2) = x - \frac16, and the error is

d(f,F)2=01(x2x+16)2 ⁣dx=1180,d(f,F)=165.d(f, F)^2 = \int_0^1\Bigl(x^2 - x + \frac16\Bigr)^2\dd x = \frac1{180}, \qquad d(f, F) = \frac1{6\sqrt5} .

Two remarks worth internalizing. First, the computation is nothing but a 2×22\times2 linear system — the normal equations; for the monomial basis their matrix (1i+j+1)\bigl(\frac1{i+j+1}\bigr) is the notoriously ill-conditioned Hilbert matrix, and orthogonalizing first (Legendre polynomials, Problem 13.1) is the cure. Second, the best uniform approximation of x2x^2 by affine functions is different (x18x - \frac18, by equioscillation): each norm has its own geometry, and only the Hilbertian one answers with a linear system.

Read in context →