i
i
i
i
i
i
i
i
894 A. Some Linear Algebra
Figure A.2. Vector-vector addition is shown in the two figures on the left. They are
called the head-to-tail axiom and the parallelogram rule. The two rightmost figures show
scalar-vector multiplication for a positive and a negative scalar, a and − a, respectively.
u,is||u|| =
u
2
0
+ u
2
1
, which is basically the Pythagorean theorem. To
create a vector of unit length, i.e., of length one, the vector has to be
normalized. This can be done by dividing by the length of the vector:
q =
1
||p||
p,whereq is the normalized vector, which also is called a unit
vector.
For R
2
and R
3
, or two- and three-dimensional space, the dot product
can also be expressed as below, which is equivalent to Expression A.8:
u · v = ||u|| ||v||cos φ (dot product)
(A.15)
Here, φ (shown at the left in Figure A.3) is the smallest angle between u
and v. Several conclusions can be drawn from the sign of the dot product,
assuming that both vectors have non-zero length. First, u ·v =0⇔ u ⊥ v,
i.e., u and v are orthogonal (perpendicular) if their dot product is zero.
Second, if u · v > 0, then it can seen that 0 ≤ φ<
π
2
, and likewise if
u · v < 0then
π
2
<φ≤ π.
Now we will go back to the study of basis for a while, and introduce
a special kind of basis that is said to be orthonormal. For such a basis,
consisting of the basis vectors u
0
,...,u
n−1
, the following must hold:
u
i
· u
j
=
0,i= j,
1,i= j.
(A.16)
This means that every basis vector must have a length of one, i.e.,
||u
i
|| = 1, and also that each pair of basis vectors must be orthogonal, i.e.,
the angle between them must be π/2radians(90
◦
). In this book, we mostly
use two- and three-dimensional orthonormal bases. If the basis vectors are
mutually perpendicular, but not of unit length, then the basis is called
orthogonal. Orthonormal bases do not have to consist of simple vectors.
For example, in precomputed radiance transfer techniques the bases often
are either spherical harmonics or wavelets. In general, the vectors are