What a real inner product is, how a weighted inner product can change length and angle, and how Cauchy-Schwarz, its equality case and the triangle inequality follow from the axioms.
The vectors (1,1) and (1,−1) have dot product 0, so in the usual geometry they are perpendicular. Now measure differently and let the first coordinate count four times as much as the second in every squared length. The arrows have not moved, yet under the new rule they are no longer perpendicular. This lesson pins down which rules for measuring are allowed, called inner products, and proves from those rules alone the Cauchy-Schwarz inequality and the triangle inequality. As before, a tuple such as (1,1) stands for a column vector.
Key terms
Inner product
Definition Let V be a real vector space. A real inner product on V assigns to each pair of vectors u,v in V a real number ⟨u,v⟩ so that the following inner product axioms hold for all u,v,w in V and every real c.
The first axiom is symmetry, the next two are linearity in the first argument, and the last is positive definiteness. Symmetry carries linearity over to the second argument, so the inner product is linear in each argument while the other is held fixed. Linearity gives ⟨0,v⟩=0, so ⟨v,v⟩≥0 for every v, with equality only for v=0. A real vector space together with a chosen inner product is a real inner product space.
In plain words An inner product is a rule for multiplying two vectors to get a number, and it is what lets a vector space speak about length, distance and right angles. Different rules on the same space give different geometries, so a claim such as “these vectors are orthogonal” means something only once the inner product is named.
Example The dot product ⟨x,y⟩=x⊤y is an inner product on Rn, since x⊤x is a sum of squares that is positive unless every entry is 0. On P2, the polynomials of degree at most 2, compare coefficients in the basis (1,t,t2). For p=a0+a1t+a2t2 and q=b0+b1t+b2t2 set
⟨p,q⟩=a0b0+a1b1+a2b2.
This is an inner product, because coefficients are unique and ⟨p,p⟩=a02+a12+a22 is positive for every nonzero p. For p=1+2t−t2 and q=3+t+t2 it gives 3+2−1=4. Under this rule the polynomials 1+t and 1−t are orthogonal, since 1⋅1+1⋅(−1)=0.
Weighted inner product
Definition Let w1,…,wn be positive real numbers and G=diag(w1,…,wn). The weighted inner product on Rn with these weights is
⟨x,y⟩G=x⊤Gy=w1x1y1+⋯+wnxnyn.
It is symmetric and linear in each argument, and ⟨x,x⟩G=w1x12+⋯+wnxn2>0 for x=0, so it satisfies the axioms. With every weight equal to 1 it is the dot product. The weights must all be positive. If some wk≤0, the formula is still symmetric and linear, but the nonzero vector ek has ⟨ek,ek⟩G=wk≤0, so positive definiteness fails.
In plain words Each coordinate direction gets its own rate for turning coordinates into squared length. The vectors stay where they are and only the way of measuring them changes, so lengths, distances and angles can all change.
Example Take G=diag(4,1), u=(1,1) and v=(1,−1). Then
⟨u,v⟩G=4⋅1⋅1+1⋅1⋅(−1)=3,
while the dot product of the same vectors is 0. They are orthogonal for the dot product but not for this inner product. Doubling every first coordinate turns the weighted rule into the ordinary one, since ⟨x,y⟩G=(Dx)⋅(Dy) with D=diag(2,1), and indeed (2,1)⋅(2,−1)=3. The weights −1 and 1 are not allowed, because e1 would pair with itself to give −1. The weights 1 and 0 are not allowed either, because the nonzero vector e2 would pair with itself to give 0.
Norm from an inner product
Definition In a real inner product space, the norm of a vector v is
∥v∥=⟨v,v⟩,
which is defined because ⟨v,v⟩≥0. It satisfies ∥v∥≥0, with equality only for v=0, and ∥cv∥=∣c∣∥v∥ for every real c. For a weighted inner product we write ∥v∥G. The same inner product defines the distance ∥u−v∥, orthogonality ⟨u,v⟩=0 and, for nonzero u and v, the angle θ in [0,π] with
cosθ=∥u∥∥v∥⟨u,v⟩.
The Cauchy-Schwarz inequality below guarantees that this quotient lies in [−1,1]. Symmetry and linearity give, for every real t,
∥u+tv∥2=∥u∥2+2t⟨u,v⟩+t2∥v∥2.
In plain words Every inner product comes with its own ruler. Length is the square root of a vector’s inner product with itself, and distance and angle are built from the same rule, so changing the inner product can change all three.
Example With G=diag(4,1) the standard vectors have norms ∥e1∥G=2 and ∥e2∥G=1. The unit vectors for this norm are the vectors (x1,x2) with 4x12+x22=1, which lie on an ellipse and include (21,0). For u=(1,1) and v=(1,−1) both norms are 5, so cosθ=53 and the angle is acute, about 0.927 radians. Their distance is ∥(0,2)∥G=2, and the expansion with t=−1 agrees, since 5−2⋅3+5=4.
Cauchy-Schwarz inequality
Definition For all vectors u and v in a real inner product space,
∣⟨u,v⟩∣≤∥u∥∥v∥.
The proof uses only the axioms. If v=0, both sides are 0. If v=0, then ∥v∥2>0, and the expansion above with −t in place of t shows that for every real t
0≤∥u−tv∥2=∥u∥2−2t⟨u,v⟩+t2∥v∥2.
The value t0=⟨u,v⟩/∥v∥2 is where this quadratic in t is smallest. Choosing it makes the last two terms combine, and
0≤∥u−t0v∥2=∥u∥2−∥v∥2⟨u,v⟩2.
Multiplying by ∥v∥2 gives ⟨u,v⟩2≤∥u∥2∥v∥2, and taking nonnegative square roots gives the inequality. Since the proof never uses coordinates, it holds for the dot product, for every weighted inner product and for the coefficient inner product on P2 alike.
In plain words The inner product of two vectors is never larger in size than the product of their lengths. That is exactly what the cosine formula needs to produce a number between −1 and 1, so every inner product gives well-defined angles between nonzero vectors.
Example For G=diag(4,1), u=(1,1) and v=(1,−1) the inequality reads 3≤5⋅5=5. The proof’s choice is t0=53, and the vector
u−53v=(52,58)
has weighted squared norm 4⋅254+2564=516, which equals 5−59 as the formula predicts.
Equality case of Cauchy-Schwarz
Definition For vectors u and v in a real inner product space,
∣⟨u,v⟩∣=∥u∥∥v∥
holds if and only if u and v are linearly dependent, that is, one of them is a scalar multiple of the other. If v=0, the pair is dependent and both sides are 0. If v=0, equality means ∥u−t0v∥2=0 in the proof above, and positive definiteness turns this into u=t0v. Conversely, if u=cv, both sides equal ∣c∣∥v∥2, and the case v=cu is the same with the roles exchanged. For nonzero vectors the cosine is 1 when the multiple is positive and −1 when it is negative.
In plain words The bound is reached exactly when the two vectors lie on one line through the origin. For two nonzero vectors this means they point the same way or opposite ways. For every other pair the inequality is strict.
Example With G=diag(4,1) take u=(2,−2) and v=(−1,1), so u=−2v. Then ⟨u,v⟩G=−8−2=−10, while ∥u∥G=20 and ∥v∥G=5 have product 10. Equality holds and the cosine is −1. The pair (1,1) and (1,−1) from before is independent, and correspondingly 3<5. For that pair the smallest value of ∥(1,1)−t(1,−1)∥G2 is 516, not 0.
Triangle inequality
Definition For all vectors u and v in a real inner product space,
and taking nonnegative square roots gives the inequality. Equality holds exactly when ⟨u,v⟩=∥u∥∥v∥, which happens exactly when one of the vectors is a nonnegative multiple of the other. Applied to u−v and v−w, the inequality gives the distance form
∥u−w∥≤∥u−v∥+∥v−w∥.
In plain words Walking along u and then along v ends at u+v, and the straight route there is never longer than the two legs together. Two nonzero vectors give equality exactly when they point the same way. If they point opposite ways, Cauchy-Schwarz is an equality but the triangle inequality is strict.
Example With G=diag(4,1) and u=(1,1), the vector v=(2,2)=2u gives equality, since ∥(3,3)∥G=45=35 and ∥u∥G+∥v∥G=5+25. The vector w=(−2,−2)=−2u gives equality in Cauchy-Schwarz, because ∣⟨u,w⟩G∣=10=5⋅20. Yet ∥u+w∥G=∥(−1,−1)∥G=5, which is strictly less than 5+20=35.
Check yourself
On R2 use the weighted inner product ⟨x,y⟩=2x1y1+3x2y2. For a=(1,2) and b=(3,−1), find ⟨a,b⟩, ∥a∥ and ∥b∥. Are the vectors orthogonal for this inner product? Are they orthogonal for the dot product?
Show the answer
The inner product is 2⋅1⋅3+3⋅2⋅(−1)=6−6=0, so the vectors are orthogonal for this inner product. The norms are ∥a∥=2+12=14 and ∥b∥=18+3=21. As a check, a+b=(4,1) has squared norm 2⋅16+3⋅1=35=14+21, the Pythagorean identity for orthogonal vectors. The dot product is 3−2=1, so the vectors are not orthogonal in the ordinary sense.
Decide which of these rules on R2 are inner products. (a) ⟨x,y⟩=x1y1+5x2y2. (b) ⟨x,y⟩=x1y1. (c) ⟨x,y⟩=x1y2+x2y1.
Show the answer
All three rules are symmetric and linear in each argument, so only positive definiteness needs a check.
Rule (a) is an inner product. Its weights 1 and 5 are positive, and ⟨x,x⟩=x12+5x22>0 for x=0.
Rule (b) is not. The nonzero vector (0,1) pairs with itself to give 0, so a nonzero vector would have length 0.
Rule (c) is not. Here ⟨x,x⟩=2x1x2, and x=(1,−1) gives −2, a negative squared length.
Use G=diag(4,1), u=(2,k) and v=(1,3). For which k is the Cauchy-Schwarz inequality an equality? For that k, is the triangle inequality an equality too? What changes if u is replaced by (−2,−6)?
Show the answer
Equality in Cauchy-Schwarz holds exactly when the vectors are dependent. Since v=0, that means u=cv, and the first entries force c=2, so k=6. Check that ⟨u,v⟩G=8+18=26, while ∥u∥G=52 and ∥v∥G=13 have product 676=26.
Because u=2v is a positive multiple, the triangle inequality is also an equality. Indeed ∥u+v∥G=∥3v∥G=313, which equals 213+13.
For (−2,−6)=−2v the pair is still dependent, so Cauchy-Schwarz is still an equality, with inner product −26. But the sum is −v, of norm 13, which is strictly less than 313. The triangle inequality is strict, because the multiple is negative.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details