In Rn, where vectors are no longer represented by arrows, its not clear how we should define the angle between two vectors. We could try to define angles by using the formula
which we derived for geometric vectors by using the law of cosines for triangles, but there's a problem: if the right-hand side has to equal the cosine of some angle, how do we know it's between –1 and +1?
It turns out that you can prove it's between –1 and +1, as a consequence of the Cauchy-Schwarz inequality.
Cauchy-Schwarz Inequality | ||
|
||
Proof: If either vector is a scalar multiple of the other, say u = av, then
|
||
If neither vector is a scalar multiple of the other, define the vector w = au + bv for scalars a = –u•v and b = u•u. Calculate w•w and simplify:
Since neither of u and v is a scalar multiple of the other, w can't be 0. Then w•w is positive, so we have
Divide both sides by u•u (which is positive) to get
|
Now, take positive square roots of both sides of this inequality: |u•v| ≤ (u•u)1/2(v•v)1/2, i.e.
|u•v| ≤ |u||v|.
which is equivalent to
– |u||v| ≤ u•v ≤ |u||v|.
Divide both sides by |u||v| to get
.
This last inequality says that its middle can indeed be the cosine of some angle. Our usual formula for the angle between two vectors does make sense in Rn, so we can use it as a definition.
For two non-zero vectors u = (u1, u2, ..., un) and v = (v1, v2, ..., vn) in Rn, |
|
|
The Cauchy-Schwartz inequality also lets us prove one of the essential properties of norms in Rn.
Four essential rules for norms of vectors in Rn | ||
For any vectors u and v in Rn and any scalar k, |
||
|
||
|
||
|
||
|
||
The first three of these rules are easy to prove. To explain the triangle inequality for geometric vectors, we interpreted them as sides of a triangle and use elementary geometry. In Rn, we don't have geometric triangles, but we can still prove this inequality as a consequence of the Cauchy-Schwartz inequality. Proof of the triangle inequality: Calculate:
But (from the Cauchy-Schwarz inequality)
Then
i.e.
Take positive square roots:
|