Inner products & Cauchy–Schwarz
Where length and angle come from; the whole inequality follows from “a projection is never longer”.
about 6 min
Start from a problem
The eight axioms of a vector space mention only addition and scaling. There is no "length" and no "angle". Yet the most basic geometric questions are exactly these: how long is this vector? what is the angle between two vectors? are they perpendicular?
We need to add a structure to a vector space from which length and angle can be defined, and which works just as well in spaces of polynomials, functions or random variables that do not look like arrows.
In the plane, the projection of onto the direction of has length . Whatever is, the projection is never longer than itself. This sounds too obvious to mention, yet it is the entire source of this section's inequality.
Given a "product" with a few natural properties, we can define and . For the latter to make sense we must prove , and "a projection never gets longer" should be the proof.
Definitions
An inner product on a real vector space is a map such that for all and :
- symmetry: ;
- linearity: ;
- positive definiteness: , with equality iff .
A vector space with an inner product is an inner product space.
is the length (norm) of . If , and are orthogonal.
- with (the standard inner product).
- Continuous functions on with .
- Random variables with finite variance, .
All three axioms check out in each case. In the third, is the variance.
Theorem and proof
In any inner product space, with equality iff are linearly dependent.
If both sides are . Let and set , the coefficient of the projection of onto . "What remains after subtracting the projection has non-negative length": Substituting merges the last two terms: Multiply by . Equality holds iff (positive definiteness), i.e. ; together with the case , that is linear dependence.
The proof used exactly two things: lengths are non-negative (axiom 3) and subtract the projection (axioms 1 and 2 to expand). So it holds, word for word, in every inner product space.
.
.
Only with the triangle inequality does deserve the name "length"; only with Cauchy–Schwarz is , so that is defined. Angle grows out of the inner product, not the other way round.
The equality case of Cauchy–Schwarz is "linearly dependent", not "equal". gives equality; so does (then , but the squares agree). And the clause "equality iff " in axiom 3 cannot be dropped: without it could vanish for and the projection coefficient would be undefined.
Applications
Substituting the three examples:
The third says the correlation coefficient lies in . All three are the same proof.
The point of a subspace closest to is the orthogonal projection of onto . The heart of the proof is again "what remains after subtracting the projection is orthogonal to ". That is the entire geometry of linear regression.
This section shows algebra's typical move: do not ask what an inner product is, ask what it satisfies, and let one proof cover every case. The next section, Linear maps, treats "transformation" with the same attitude.