Graphics Reference
In-Depth Information
Definition.
Let
u
,
v
Œ
R
n
. Define the
angle
q
between the vectors
u
and
v
, denoted by
-(
u
,
v
), as follows: If either
u
or
v
is the zero vector, then q is zero; otherwise, q is that
real number such that
uv
uv
,
∑
cos q
=
and
0
££
q
p
.
Note the purely formal aspect of this definition and that we need the Cauchy-
Schwarz inequality to insure that the absolute value of the quotient in (a) is not bigger
than 1 (otherwise there would be no such angle). The motivation behind the defini-
tion is the law of cosines from Euclidean geometry shown in Figure 1.1. To see this,
substitute |
p
|, |
q
|, and |
p
+
q
| for a, b, and c, respectively, and simplify the result.
Now if |
u
| = 1, then
uv v
∑= cos q,
which one will recognize as the length of the base of the right triangle with hypotenuse
v
and base in the direction of
u
. See Figure 1.2. This means that we can give the fol-
lowing useful interpretation of the dot product:
(
)
uv
∑
is the signed length of “the orthogonal projection of on
v
n
”
whenever
u
=
1
Definition.
Let
u
,
v
Œ
R
n
. If the angle between the two vectors
u
and
v
is p/2, then
they are said to be
perpendicular
and we shall write
u
^
v
. If the angle between them
is 0 or p, they are said to be
parallel
and we shall write
u
||
v
.
p
c
q
a
q
b
a
2
+ b
2
- 2ab cos
= c
2
Figure 1.1.
The law of cosines.
θ
v
|v|
q
u
|v| cos q
u·v = |v| cos q
|u| = 1
Figure 1.2.
Interpreting the dot product.