Chapter 3. The Geometry of n Dimensions ∗ Vector Spaces
3. Angles and Directions
~ u ~v ~v−~u ¯ 0 h~u, ~vi Figure 16
The inner product ~u ·~v of two vec- tors, as defined in §2, has a simple geometric interpretation (in E2 and E3), when the vectors are represented as directed line segments: it equals the product of the lengths of~u and ~v mul- tiplied by the cosine of the angle be- tween ~u and ~v,
~u·~v =|~u| |~v|cosh~u, ~vi,
where h~u, ~vi denotes that angle. Indeed (see Figure 16), by the law of cosines, |~u|2+|~v|2 −2|~u| |~v|cosh~u, ~vi=|~v−~u|2.
As |~u|2 =~u·~u, |~v|2 =~v·~v, etc., we obtain
~u·~u+~v·~v−2|~u| |~v|cosh~u, ~vi=|~v−~u|2
= (~v−~u)·(~v−~u) =~v·~v+~u·~u−2~u·~v, by the distributive law. Cancelling and reducing, we get
~u·~v =|~u| |~v|cosh~u, ~vi, as asserted. If ~u6=~0 and~v 6=~0, we also obtain
cosh~u, ~vi= ~u·~v
|~u| |~v|.
It is natural to accept this as a definition of an angle in En as well.
Definition 1.
Given two vectors ~u 6= ~0 and ~v 6= ~0 in En, we define the (undirected) angle between them, denotedh~u, ~vi, as the main value of
arccos ~u·~v
|~u| |~v|,
i.e., the (unique) number between 0 and π such that cosh~u, ~vi= ~u·~v
|~u| |~v| (~u6=~0, ~v6=~0). (1)
Note 1. Throughout this and some other sections, we assume the notions and laws of elementary trigonometry to be known. Actually, however, what will be needed are only the cosines of the angles, and we may treat formula (1) as a definition, even without speaking of the “angle” itself. It is only for the sake of geometric interpretation that we speak of “angles”, “cosines”, “perpen- dicularity”, etc., and sometimes express “angles” in degrees instead of radians.
Note 2. By the Cauchy–Schwarz inequality, we always have |~u·~v| ≤ |~u| |~v|. Hence the fraction (~u·~v)/(|~u| |~v|) in formula (1) never exceeds 1 in absolute value, so that an angle with cosh~u, ~vi= (~u·~v)/(|~u| |~v|) does exist. However, it is not defined if ~u=~0 or ~v =~0.
Definition 2.
Two vectors ~u and ~v in En are said to be orthogonal or perpendicular if
~u·~v = 0; or, in terms of coordinates,
n X
k=1
ukvk = 0.
§3. Angles and Directions 143
This notion is defined also if~u =~0 or ~v =~0. In particular,~0⊥~v for every ~v ∈ En; and ~ek ⊥~ei (k 6= i) for the basic unit vectors. (Verify!) If, however,
~u6=~0 and~v 6=~0, then ~u⊥~v also means that cosh~u, ~vi= ~u·~v
|~u| |~v| = 0, i.e., h~u, ~vi=
π 2.
Of special importance are the n angles which a given vector ~v 6= ~0 forms with the basic unit vectors~e1, . . . , ~en, i.e., the anglesh~v, ~eki,k = 1, . . . , n. They
are called the direction angles of ~v, and their cosines are called the direction cosines of ~v. Thus every vector ~v 6=~0 in En has exactly n direction cosines.
Geometrically (inE2 andE3), the direction angles are those between~vand the positive directions of the coordinate axes (~ı, ~, ~k). We now obtain the following result.
Corollary 1. For any vector ~v = (v1, . . . , vn) 6= ~0 in En, the following is
true:
(a) We have
cosh~v, ~eki=
vk
|~v|, k = 1, . . . , n;
i.e., the direction cosines of ~v are obtained by dividing its coordinates vk
by the length |~v| of~v.
(b) The sum of the squares of the direction cosines of~v always equals 1:
n X
k=1
cos2h~v, ~eki= 1. (2)
Proof. By definition, all coordinates of ~ek are 0 except the k-th, which is
1. Thus, computing the length of ~ek, we obtain |~ek| = 1. Similarly, the dot
product~v·~ek equals vk (thek-th coordinates of~v) because, by definition, it is
a sum in which all terms but one, vk×1, are equal to 0. Substituting this in
formula (1), we have
cosh~v, ~eki= ~v·~ek
|~v| |~ek|
= vk
|~v|, proving assertion (a).
Part (b) is obtained by substituting this in (2) and noting that
n X
k=1
vk2 =|~v|2; we leave the details to the reader.
Note 3. In E3, the direction angles of~v are often denoted byα,β,γ. Then
formula (2) simplifies to
Definition 3.
By aunit vector or adirectioninEnis meant any vector of length|~v|= 1. Such are, e.g., the n basic unit vectors~ek (see above).
By dividing any vector~v 6=~0 by its own magnitude|~v| 6= 0,we always obtain a unit vector (called theunit of~v, or thedirection of~v, or thenormalized vector of ~v). Indeed, the resulting ~u =~v/|~v| has length 1 since, by Theorem 2(b′) of
§2, 1 |~v|~v = 1 |~v||~v|= 1.
Tonormalize a vector~v 6=~0 means to divide it by its own magnitude|~v|, i.e., to multiply by 1/|~v|. Of course, this is only possible if~v 6=~0.
We also obtain the following result.
Corollary 2. The direction cosines of any vector ~v 6= ~0 in En are equal to
the corresponding components of its unit~v/|~v|. Hence, if |~v|= 1, these cosines are simply the components of ~v. (It also follows that the components of a unit vector never exceed 1 in absolute value.)
Indeed, the coordinates of~v/|~v|, by definition, are obtained by dividing those of~v by the scalar|~v|. But, by Corollary 1(a), so also are obtained the direction cosines of ~v. Thus our assertion follows.
Examples.
Take two vectors in E4: ~u = (1, −2, 0, −1) and~v = (0, 3, 2, −2). Then |~u|=p12+ (−2)2+ 02+ (−1)2 =√6;
similarly |~v| = √17. Since ~u 6=~0 and~v 6=~0, the angle h~u, ~vi exists and, by definition, cosh~u, ~vi= ~u·~v |~u| |~v| = −3 √ 6·17 = −3 √ 102. To obtain the direction cosines of ~u, we normalize it:
~u |~u| = (1,−2, 0, −1) √ 6 = 1 √ 6, −2 √ 6, 0, −1 √ 6 . These four numbers are the required cosines, by Corollary 2. We leave to the reader the proof of the following proposition.
Corollary 3. The direction cosines of a vector ~v 6=~0 in En do not change if
~v is multiplied by a scalar a > 0; they change sign only if a < 0. Hence the direction cosines of −~v are those of ~v with opposite signs.
§3. Angles and Directions 145 Note 4. The notions of angle and unit vector were defined by using inner products and absolute values. Thus one can define them, in exactly the same manner, not only inEnbut also in other vector spaces (seeNote 3,§1)in which
inner products (satisfying Theorem 1of§2) are defined. Such vector spaces are called Euclidean. For more details, see §9.